Opened 6 years ago

Closed 6 years ago

#4987 closed defect (fixed)

Update Scroll Bug In Player/GameList In Lobby

Reported by: fpre_O_O_O_O_O_O Owned by: fpre_O_O_O_O_O_O
Priority: Must Have Milestone: Alpha 23
Component: UI & Simulation Keywords:
Cc: Patch: Phab:D1232

Description (last modified by fpre_O_O_O_O_O_O)

When playerlist receives update due to changed playerlist when player joins or leaves, the selected player from the list, if one is selected, should be kept consistend after the list is updated, so it gets reselected in updatePlayerList() in lobby.js, if it is still in the list.

The problem is that we currently loose with it our current scroll view due to UpdateAutoScroll() from CList.cpp with the selection change.

So to keep the selected player consistent on playerlist update, while also keeping the scroll view, we need an unscrolled selection attribute in the gui list, that just sets the selected item in the list without autoscrolling to it.


Same for gamelist update.


Code is ready to commit.

Change History (8)

comment:1 by fpre_O_O_O_O_O_O, 6 years ago

Owner: set to fpre_O_O_O_O_O_O
Status: newassigned

comment:2 by fpre_O_O_O_O_O_O, 6 years ago

Description: modified (diff)

comment:3 by elexis, 6 years ago

Perhaps we could just set every ticket to alpha 23 that we have a WIP patch for?

comment:4 by fpre_O_O_O_O_O_O, 6 years ago

i guess so put focus on it, the bugs are severe and nothing changing

comment:5 by elexis, 6 years ago

Why isn't the commit or ticket referenced that introduced the bug? r18935

comment:6 by elexis, 6 years ago

I don't think anyone will add generic support for calling GUI object type specific C++ functions from JS, especially if it's only used for this barely noticeable feature.

So there are only the two options to work with what we have or to remove the feature completely.

Since

  1. the feature is kind of fixing a defect (getting annoyed by the user selecting an item indirectly but intentionally without the item becoming focused) and
  2. what we have (settings system) is sufficient to implement conditional autofocusing.

We could add a property autoscroll that could only be set from JS and that is immediately set to false if it was set to true and calls the autoscroll C++ function.

comment:7 by elexis, 6 years ago

Patch: https://code.wildfiregames.com/D1232Phab:D1232
Priority: Release BlockerMust Have

comment:8 by elexis, 6 years ago

Resolution: fixed
Status: assignedclosed

In 20958:

Implement an auto-scroll setting for GUI lists.

Patch By: fpre / ffffffff
Fixes #4987, refs #4254

This allows the replay menu and lobby to focus the selected element if, but only if it is expected by the user.
Replaces rP18935 which scrolled the selected player into view every single time a new playerlist was received by the lobby server.

Note: See TracTickets for help on using tickets.