Skip to content
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

Implement settings section sorting option #5010

Merged

Conversation

kommunarr
Copy link
Collaborator

@kommunarr kommunarr commented Apr 24, 2024

Implement settings section sorting option

Pull Request Type

  • Feature Implementation

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

Screenshot_20240423_224504

Testing

  • Sort works in arbitrary language (see note above: make sure to reload page)
  • Sort does not re-trigger when changing to a language with a different alphabetical sort order
  • (Optional) REG: set usingElectron to false to test that the same settings sections will not appear

Desktop

  • OS: OpenSUSE
  • OS Version: TW

@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Apr 24, 2024
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) April 24, 2024 03:59
@kommunarr kommunarr requested a review from absidue April 24, 2024 17:45
@FreeTubeBot FreeTubeBot merged commit 2208393 into FreeTubeApp:development Apr 25, 2024
5 checks passed
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Settings Section order
5 participants