Implement settings section sorting option #5010
Merged
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.
Implement settings section sorting option
Pull Request Type
Related issue
Closes #1739
Description
Implement programmatic list of the settings sections, which makes it easy to reference them in dynamic ways that will be useful in the future (ex: #4387). This makes something like sorting them very easy.
Setting an alphabetical ordering is a good choice for the users who forget the arbitrary section ordering and need to find a particular section (as opposed to us die-hard contributors who remember them by heart). This will be more apparent with the sections collapsed, and/or any menu-type component added for #4387.
This code was salvaged from #4231. Only A-Z sorting is implemented, as was determined in the discussion under that PR. The setting is disabled by default.
Note
Changing the language causes the sort to not refresh until the route is reloaded or the setting is toggled off & on. This ends up being a nice and easy way to prevent the sections from jumping sporadically (& losing your place) when changing the language.
Screenshots
Testing
usingElectron
to false to test that the same settings sections will not appearDesktop