Skip to content

fix(onboarding): Sort SCM platform picker alphabetically - #122102

Open
jaydgoss wants to merge 4 commits into
masterfrom
jaygoss/scm-platform-picker-alpha
Open

fix(onboarding): Sort SCM platform picker alphabetically#122102
jaydgoss wants to merge 4 commits into
masterfrom
jaygoss/scm-platform-picker-alpha

Conversation

@jaydgoss

@jaydgoss jaydgoss commented Aug 14, 2026

Copy link
Copy Markdown
Member

TLDR

The SCM create-project SDK dropdown listed its roughly 130 platforms in raw platforms.tsx insertion 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 localeCompare puts the .NET family at the top of the list, while the legacy picker deliberately sorts names starting with punctuation last. That comparator moved out of platformPicker into comparePlatformNames in sentry/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

  • PR 1 (this): fix(onboarding): Sort SCM platform picker alphabetically
  • PR 2: feat(onboarding): Support grouped options in ScmVirtualizedMenuList
  • PR 3: feat(onboarding): Section the SCM platform picker into Popular and Other

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
jaydgoss force-pushed the jaygoss/scm-platform-picker-alpha branch from 658ea9f to 2621d52 Compare August 14, 2026 23:18
@jaydgoss
jaydgoss marked this pull request as ready for review August 14, 2026 23:20
@jaydgoss
jaydgoss requested a review from a team as a code owner 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant