Page MenuHomeWildfire Games

Show game where player is listed by selecting in playerlist
ClosedPublic

Authored by ffffffff on Mar 11 2017, 4:09 AM.

Details

Summary

When clicking on a playername in the lobby playerlist, the game where that playername participates or participated should be selected

If the playername is found as an active player, that game must be selected (even if he is present as an offline player or observer somwhere else).
If the playername is not found as an active player but as an observer and an offline player, the game where that player is observing should be selected (so that the user might want to join that game too).

Test Plan
  1. Scroll through the playerlist and check that the correct gamelist entries are selected.
  2. Join a game as a player, leave that game, join another game as an observer. Join the lobby with another account and select that player and ensure that the game is selected, where the player observers.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ffffffff created this revision.Mar 11 2017, 4:09 AM
ffffffff edited the summary of this revision. (Show Details)Mar 11 2017, 4:18 AM
ffffffff edited the summary of this revision. (Show Details)Mar 11 2017, 4:20 AM
ffffffff edited the summary of this revision. (Show Details)
elexis retitled this revision from Show game where player is listed by selecting in playerlist and also select player by tabbing name in chat to Show game where player is listed by selecting in playerlist.Mar 11 2017, 6:29 AM
elexis edited the summary of this revision. (Show Details)
elexis accepted this revision.Mar 11 2017, 7:28 AM
elexis edited the test plan for this revision. (Show Details)

The patch was reviewed in about 20 iterations on irc and the feature was discussed with scythetwirler.
We agreed that it is a nice feature to select the according game when selecting a player and rejected the autocomplete part as the text input field is not expected to influence the selection.
The use case of that chat field is to type chat, one often wants to autocomplete playernames to mention them in the chat, not to change the selection. The addition of that feature would make it impossible to keep some relevant game selected and use the autocomplete feature.

I do agree though that we should have a way to find a playername or specific game by entering 2 or 3 keystrokes, rather than looking through the entire game or playerlist for the entry we search.
This might be added as a player- and gamelist search, similar to the replay menu where we can also search for specific playernames and also autocomplete them. (In that case we need to find some more GUI space for 1024x768).

Also some whitespace issues.

./gui/lobby/lobby.js
408 ↗(On Diff #755)

Select the game listing the selected player when toggling the full games filter

418 ↗(On Diff #755)

Select the game where the given player is currently playing, observing or offline.
Selects in that order to account for players that occur in multiple games.

424 ↗(On Diff #755)

let

429 ↗(On Diff #755)

missing semicolon

433 ↗(On Diff #755)

Comment not needed anymore as it's stated in the function descripion

This revision is now accepted and ready to land.Mar 11 2017, 7:29 AM
This revision was automatically updated to reflect the committed changes.