Fix case-sensitive profile sorting#8741
Closed
Houmgaor wants to merge 1 commit intoFreeTubeApp:developmentfrom
Closed
Fix case-sensitive profile sorting#8741Houmgaor wants to merge 1 commit intoFreeTubeApp:developmentfrom
Houmgaor wants to merge 1 commit intoFreeTubeApp:developmentfrom
Conversation
Replace case-sensitive string comparison with localeCompare() so that profiles sort alphabetically regardless of capitalization (e.g. "Aa" before "AB" instead of after). Fixes FreeTubeApp#8711
auto-merge was automatically disabled
March 6, 2026 09:48
Pull request was closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Pull Request Type
Related issue
Description
Profile names were sorted using JavaScript's
<and>operators, which compare strings by Unicode code point. This causes uppercase letters to sort before all lowercase letters (e.g. "AB" before "Aa").This replaces the comparison with
String.prototype.localeCompare()usingsensitivity: 'base', which performs a case-insensitive, locale-aware alphabetical sort.Screenshots
Before: Profiles sorted as
AB, Aa, Ab, Ac(uppercase takes priority)After: Profiles sorted as
Aa, AB, Ab, Ac(proper alphabetical order)Testing
Desktop
Additional context
The previous PR attempt (#8727) was closed. This is a minimal one-line fix using
localeComparewhich is the idiomatic JavaScript approach for locale-aware string sorting.