-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tweak main menu server list behavior #15736
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer a more narrow fix which specifically prevents the server selected after searching from being incompatible. So essentially just 1fefc3a, probably ideally without the possibly unwanted change of trying to keep the selection when searching.
The reason for this is that:
- The correctness of the "narrow" fix is easier to see.
- There is nothing to discuss about preferences: It is just a bugfix and can thus go into 5.11. Everyone can agree that selecting an incompatible server, putting you at the bottom of the compatible servers section, isn't helpful but just weird.
In particular, the pre_search_selection
is somewhat problematic in my opinion, both in terms of UX and current implementation: I can have (explicitly) selected a many servers, but when I then clear my search, suddenly some server from a while ago I don't remember selecting will be selected again. I think that's an unexpected side effect.
(You can of course still PR the other changes, but I would treat them as "Request / Suggestion" rather than "Bugfix" PRs.)
Just to verify that I've got you right, you suggest splitting this up into two separate PRs? I agree that the "cosmetics" can be made into a separate PR, the core goal was to fix the broken search anyway. What would be the easiest route then? Leaving this open and repurposing it for the cosmetic suggestions while creating a new one with only the bug fix? |
Yes
Either way is fine by me, the end result just needs to be that one PR contains precisely the bugfix while the other contains only the "cosmetics". |
Split PR is open. |
d940137
to
eb87904
Compare
Sorry, made a mess when trying to rebase. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works:
- The last manual selection (incl. ones selected after searching) is used when resetting search.
- Adding a favorite keeps the server selected.
- Removing the favorite selects the next server in the favorites.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works.
Add compact, short information about your PR for easier understanding:
This PR resolves some buggy behavior when searching or removing favorites.
Provide a more intuitive user experience when searching or deleting favorites.
It saves the current selection before searching so that it can be reused if a user should clear the search bar.
When searching, it now also checks if the selected server is among the search results; if not, it will select the first compatible.
Instead of keeping the selection when removing a server from favorites, now the selection will be moved to the server below.
Fixes [Discussion] Behavior of parts of the main menu #15545
2.3 hopefully
Preview
This PR:
![image](https://private-user-images.githubusercontent.com/97843108/408237141-204349a4-3243-4697-925e-32c7430c8d1f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMTA3NjIsIm5iZiI6MTczOTExMDQ2MiwicGF0aCI6Ii85Nzg0MzEwOC80MDgyMzcxNDEtMjA0MzQ5YTQtMzI0My00Njk3LTkyNWUtMzJjNzQzMGM4ZDFmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDE0MTQyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVhMWZkNzhjZDk1YTI1NzgwNWU3MjVmOTJkMDRiZjBlNzc0MzgxNGI1MGZiNTVkNjhiMjYwM2Q3ZDdjZjM1N2QmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.fPzFCU1ginfBCKWtafpknhK0c3NkH_uCM3NLBp47RLU)
![image](https://private-user-images.githubusercontent.com/97843108/408237509-f9cfe908-d4f6-4171-ab3a-20556b11b13b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMTA3NjIsIm5iZiI6MTczOTExMDQ2MiwicGF0aCI6Ii85Nzg0MzEwOC80MDgyMzc1MDktZjljZmU5MDgtZDRmNi00MTcxLWFiM2EtMjA1NTZiMTFiMTNiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDE0MTQyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ1YmNiMzExOGRjZTczYzc1MmZjM2FkMzUwMGUyNGM0ZTlmMThkZjgxODM0YjQxY2VkODViODQ4MTU4Y2VlN2YmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.n1KvBeBOSwALD_I4542taKLHGPFhefI-9BM10d5-BMA)
Current Master:
How to test
Search servers (maybe the same as in the issue), remove favorites.
Notice how the selection is kept when clearing the search.