Skip to content

feat(onboarding): Add platform kind for SCM card display labels#114596

Merged
jaydgoss merged 3 commits intomasterfrom
jaygoss/platform-kind-field
May 1, 2026
Merged

feat(onboarding): Add platform kind for SCM card display labels#114596
jaydgoss merged 3 commits intomasterfrom
jaygoss/platform-kind-field

Conversation

@jaydgoss
Copy link
Copy Markdown
Member

@jaydgoss jaydgoss commented May 1, 2026

The SCM onboarding platform card was rendering raw PlatformIntegration.type as a muted subtitle, which produced nonsense labels like "language" under React Native (a framework) and "framework" under Android (an OS). Add a sidecar getPlatformKind(key, type) lookup that returns a corrected display kind, and wire the card through it.

Why a sidecar instead of a field on PlatformIntegration

Two related but separate concepts. type is misnamed but load-bearing for the framework-suggestion modal gate, so it cannot be re-tagged in place. A kind field on PlatformIntegration was the first cut, but it leaked into every consumer's type while only the SCM card read it. Pulling it into static/app/data/platformKinds.tsx keeps PlatformIntegration honest and limits the new concept to the surface that needs it.

Override list

Only platforms whose type is wrong for display get an override entry; everything else falls back to its existing type.

Platform type kind
android framework platform
apple, apple-ios, apple-macos language platform
dotnet language platform
nintendo-switch, playstation, xbox console platform
cordova, electron, react-native language framework
dart framework language

jaydgoss added 2 commits May 1, 2026 13:23
…display labels

The existing `type` field on PlatformIntegration is a misnomer in many entries
(React Native is `language`, Android is `framework`, iOS is `language`, etc.)
and is also load-bearing for the framework-suggestion modal gating. Rather
than risk breaking that gate by re-tagging entries, add a parallel `kind`
field with a corrected taxonomy:

- `language` for actual programming languages
- `framework` for app frameworks and SDK wrappers
- `library` for drop-in libraries
- `platform` (new) for OSes, runtimes, and consoles

Use `kind` to render the muted subtitle on the SCM onboarding platform card,
replacing the raw `type` string which was producing nonsense labels like
"language" under the React Native card.
Replace the `kind` field on PlatformIntegration with a standalone
`getPlatformKind(key, type)` helper in `static/app/data/platformKinds.tsx`.
Only platforms whose existing `type` is incorrect for display need an
override entry; everything else falls back to `type` directly.

Keeps PlatformIntegration honest about the data it actually carries (the
field was leaking into every consumer's type but only the SCM card read
it) and avoids burdening unrelated callers with a concept they don't need.
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 1, 2026
@jaydgoss jaydgoss marked this pull request as ready for review May 1, 2026 18:30
@jaydgoss jaydgoss requested a review from a team as a code owner May 1, 2026 18:30
Copy link
Copy Markdown
Contributor

@Abdkhan14 Abdkhan14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: platformKinds can just be a ts file

The file contains no JSX, so .ts is the correct extension.
@jaydgoss jaydgoss enabled auto-merge (squash) May 1, 2026 19:26
@jaydgoss jaydgoss merged commit d7d9aea into master May 1, 2026
71 checks passed
@jaydgoss jaydgoss deleted the jaygoss/platform-kind-field branch May 1, 2026 19:31
cleptric pushed a commit that referenced this pull request May 5, 2026
)

The SCM onboarding platform card was rendering raw
`PlatformIntegration.type` as a muted subtitle, which produced nonsense
labels like "language" under React Native (a framework) and "framework"
under Android (an OS). Add a sidecar `getPlatformKind(key, type)` lookup
that returns a corrected display kind, and wire the card through it.

**Why a sidecar instead of a field on `PlatformIntegration`**

Two related but separate concepts. `type` is misnamed but load-bearing
for the framework-suggestion modal gate, so it cannot be re-tagged in
place. A `kind` field on `PlatformIntegration` was the first cut, but it
leaked into every consumer's type while only the SCM card read it.
Pulling it into `static/app/data/platformKinds.tsx` keeps
`PlatformIntegration` honest and limits the new concept to the surface
that needs it.

**Override list**

Only platforms whose `type` is wrong for display get an override entry;
everything else falls back to its existing `type`.

| Platform | `type` | `kind` |
|---|---|---|
| android | framework | platform |
| apple, apple-ios, apple-macos | language | platform |
| dotnet | language | platform |
| nintendo-switch, playstation, xbox | console | platform |
| cordova, electron, react-native | language | framework |
| dart | framework | language |
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.

2 participants