fix(onboarding): Sort SCM platform picker alphabetically - #122102
Open
jaydgoss wants to merge 4 commits into
Open
fix(onboarding): Sort SCM platform picker alphabetically#122102jaydgoss wants to merge 4 commits into
jaydgoss wants to merge 4 commits into
Conversation
This was referenced Aug 14, 2026
The SCM create-project SDK dropdown was using raw platforms.tsx insertion order, so the long list looked random. Sort options by display name as a stopgap until the dropdown gets labeled sections.
Plain localeCompare put the .NET family at the top of the SCM dropdown, while the legacy picker's All tab pushes names starting with punctuation to the end. Extract that comparator from platformPicker into comparePlatformNames in sentry/utils/platform and use it in both places so the two surfaces order identically.
The exactly-once test sits over a plain toSorted().map(), which cannot drop or duplicate entries, so it only proved Array methods work. It moves to the sections PR where the Popular/Other partition makes it a real invariant. Also drop the sort call-site comment; the comparePlatformNames JSDoc already records the non-obvious ordering rule.
jaydgoss
force-pushed
the
jaygoss/scm-platform-picker-alpha
branch
from
August 14, 2026 23:18
658ea9f to
2621d52
Compare
jaydgoss
marked this pull request as ready for review
August 14, 2026 23:20
The test name pointed at the legacy picker All tab, which a reader must go look up. State the observable behavior instead; the legacy-picker provenance stays in the comparePlatformNames JSDoc.
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.
TLDR
The SCM create-project SDK dropdown listed its roughly 130 platforms in raw
platforms.tsxinsertion order, so the list read as random. It is now sorted by display name with the exact ordering of the legacy platform picker's All tab.Details
This is the stopgap layer of a small stack; the follow-up PRs section the dropdown into a curated Popular list plus a sorted remainder. Matching the legacy picker matters because plain
localeCompareputs the .NET family at the top of the list, while the legacy picker deliberately sorts names starting with punctuation last. That comparator moved out ofplatformPickerintocomparePlatformNamesinsentry/utils/platform, and both surfaces now use it, so there is one ordering source. The new spec pins the order and the punctuation rule.Stack