Skip to content

Sticky highlight the game showing in the More Info popup#260

Draft
FaceCrap wants to merge 2 commits into
WillyJL:mainfrom
FaceCrap:sticky_highlight
Draft

Sticky highlight the game showing in the More Info popup#260
FaceCrap wants to merge 2 commits into
WillyJL:mainfrom
FaceCrap:sticky_highlight

Conversation

@FaceCrap

Copy link
Copy Markdown
Contributor

When using the More Info popup's Left/Right buttons, the game currently showing in the popup, will have the 'CTRL-Click' highlight applied. Since it uses the Ctrl-Click select highlight, it will remain 'selected' when the popup is closed. This makes it easier to localize the last-viewed game when the list or view contains many games even when the game is off-screen when the popup is closed.

In Kanban view, this may act a little differently than expected, since the popup will follow the list order, and the last viewed game may be in a totally different Kanban column than where you started viewing.

I've included a small screen recording to show this in action

sticky800.webm

FaceCrap and others added 2 commits March 18, 2026 22:00
When using the More Info popup's Left/Right buttons, the game currently showing in the popup, will have the 'CTRL-Click' highlight applied.
Since it uses the Ctrl-Click select highlight, it will remain 'selected' when the popup is closed. This makes it easier to localize the last-viewed game when the list or view contains many games even when  the game is off-screen when the popup is closed.

In Kanban view, this may act a little differently than expected, since the popup will follow the list order, and the last viewed game may be in a totally different Kanban column than where you started viewing.
@FaceCrap

FaceCrap commented Mar 22, 2026

Copy link
Copy Markdown
Contributor Author

Changed it so that when you close the More Info popup, you can immediately click either the last selected game or another game to re-open the More Info popup instead of first having to click-deselect the game marked as selected.
This is done with if self.last_selected_game != None:, if it isn't, we first deselect that game before marking the next clicked game as selected, then update it with the clicked game so we can deselect it right before re-opening the More Info popup with another game.
Also changed the if any(game.selected for game in globals.games.values()): statement to reuse the already present self.selected_games_count so we don't need to first loop through games to check if any are selected before looping again to deselect them.

This does require either a CTRL-Click on the last selected game or a tab switch to remove the select highlight if you don't plan on opening another More Info popup.
But then again, that's inherent if you want the last viewed game to remain highlighted after closing the popup.

@WillyJL

WillyJL commented Jun 8, 2026

Copy link
Copy Markdown
Owner

personally, i dont like that clicking a game both selects it and opens the popup. but, i guess i can see how it would help you to remember where you were in the list after opening the more info popup.

also, when selecting multiple games and clicking more info in the context menu, they remain selected and become deselected as you cycle through them. i suppose we could just deselect all games when using "more info" with multiple items selected, and just select the currently shown one. but, this does mean that the selection is inevitably lost.

im not sure where to lean on this tbh

@WillyJL WillyJL marked this pull request as draft June 8, 2026 20:32
@WillyJL WillyJL added the enhancement New enhancement or request label Jun 8, 2026
@FaceCrap

FaceCrap commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

I realize that with the way the More Info now follows Kanban order, the way the highlighting is done breaks the view order in Kanban view. So it needs to be rewritten from the ground up.

I also am aware that the way it's implemented now, resets any multi-selection. But then again, why multi-select games and then decide to view details of an individual game. I need to disable the way it's done now to see what would normally happen if you open the popup with multiple games selected.

At this point there's two choices, kill this PR (if possible) or force push a new one, but I'm not sure if I can fully replace the previous changes with a force push. I'll probably need to reset the history to the initial point when the branch got made to fully replace the PR.

For now consider this dead code.

@FaceCrap

FaceCrap commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

I've gone back to the drawing board and came up with an independent way to highlight the game viewed in the More Info popup which does not destroy any present (multi-)selection when More Info is activated from the context menu. The only thing is when closing the More Info popup, the last viewed game is also highlighted, but not part of the selection. Meaning, whatever bulk operation you would apply to the selected games, does not affect the last view-highlighted game.

It's possible to remove the view-highlight by ctrl-clicking it (or any other game for that matter), but since it's not truly selected, the first click actually selects whichever game you clicked while removing the view-highlight, so you would need to ctrl-click the clicked game again to remove that highlight... a true chicken and egg situation here. Personaly, I'm not too bothered by it since this is also reflected in the Selected games count, which should be one less than the visible highlights.

And then there's the question what is expected to happen when multiple games are selected and someone doesn't perform a bulk operation but just clicks any other game. As expected, it'll reset the selection, but some people may also expect the same click to open the More Info popup straight away. It's never been that way, but something could be said to have it happen that way. Would need some doing as simply removing the else: and combining the two parts, (resetting the selection and going straight through) still blocks acting on the left-click.
Scratch that last bit. Not going to meddle with existing functionality. A single click (without Ctrl or Shift pressed) resetting the selection without it opening the More Info popup, is how it works now, so best leave it like that. If they really want to have it open the More Info popup, they can click a second time or use the context menu without resetting the selection.

Furthermore, if the user changes the selection, Ctrl-click or Shift-click will remove the view-highlight as soon as a new game is added to the selection. This also applies to the view-highlighted game itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New enhancement or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants