Repository navigation
Conversation
The games table and the other name-bearing tables let TanStack Table pick the sorting function for their string columns. Its built-in `text` and `alphanumeric` comparators compare with `>` / `<`, i.e. by UTF-16 code unit, so the Esperanto hat letters (U+0108 and friends) sorted after `z` instead of after their base letters: the whole Ĉ/Ĝ/Ŝ block landed past Zola at the bottom of the list. `compareStrings` and its `Intl.Collator` were already correct — ICU has a real `eo` tailoring — but nothing on these columns ever reached it. The pre-sort in MetaContainer did use it and was then discarded by the table's own sorted row model. Add `stringColumnSortingFn(locale)` next to `compareStrings` and wire it into every game-name and player-name column, matching the existing inline `sortingFn`s that already call `compareStrings`. Where a column memo did not already depend on `i18n.language`, add it so the comparator does not keep a stale locale after a language switch. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015FTzbDm2gyDKiek71vA3wE
Two loose ends from the previous commit. The designers columns in the meta-game table and the explore view hold people's names and had the same code-unit sort as the game-name columns, so a designer whose name carries a hat letter or any other non-ASCII character sorted past Z. Their accessors already return a joined string, so they take the same `stringColumnSortingFn`. MetaContainer's alphabetized meta-game list memoized on `i18n.language` alone. The Esperanto bundles arrive over HTTP after the language tag is already set, so the list was sorted while `getGameDisplayName` still returned English names and never re-sorted once the real names landed. Depend on `getUiLocaleBundleKey` as well, matching how the other translated-label memos in the codebase are keyed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015FTzbDm2gyDKiek71vA3wE
Adding `sortingFn` to the name columns moved them off TanStack's built-in `alphanumeric` comparator, which does natural number sorting, onto an `Intl.Collator` constructed with the default `numeric: false`. Nothing regressed in the current data — the only digit-bearing game names are "C1" and "Kunligu 6" — but "Connect 10" would have sorted before "Connect 2" the moment such a name was added. Set `numeric: true` so digit runs compare by value. Verified against the real corpora in all six UI locales: game names, category tag and full labels, and display names are byte-identical before and after. Variant labels and variant groups do change, and change for the better — board sizes now read 8×8, 9×9, 13×13 instead of 13×13, 8×8, 9×9, and piece counts 2, 4, 6, 12 instead of 12, 2, 4, 6. This collator backs every `compareStrings` caller, so the change reaches the variant and challenge pickers too. Every call site is a display sort or a table `sortingFn`; the four places that build an identity key from sorted variants use a bare `.sort()` and are unaffected. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015FTzbDm2gyDKiek71vA3wE
Brings the branch up to AbstractPlay/front develop (51c5911) ahead of a pull request against it. Two textual conflicts, both trivial: - src/components/Ratings.js: upstream hoisted columnHelper to module scope and trimmed the columns memo deps to [globalMe, t]; kept that shape and re-added i18n.language, which the new sortingFn reads. - src/components/StandingChallenges.js: upstream and this branch each added an import on the same line; kept both. The other six overlapping files auto-merged. Upstream's new sortingFn in StandingChallenges.js belongs to its new matchWinRate column, not to any column this branch touches. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015FTzbDm2gyDKiek71vA3wE
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.
Also updated to sort
numeric: true, which lets stuff alphabetize as3, 20, 131instead of131, 20, 3.