Fix buggy behavior in parts of the main menu #15736
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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.