Skip to content

ref(replays): use shared platform icon resolver#115705

Merged
priscilawebdev merged 1 commit into
masterfrom
priscilawebdev/ref/consolidate-replay-platform-icon-resolution
May 21, 2026
Merged

ref(replays): use shared platform icon resolver#115705
priscilawebdev merged 1 commit into
masterfrom
priscilawebdev/ref/consolidate-replay-platform-icon-resolution

Conversation

@priscilawebdev
Copy link
Copy Markdown
Member

@priscilawebdev priscilawebdev commented May 18, 2026

Stacked on #115701.

generatePlatformIconName used to maintain its own PLATFORM_ALIASES table — a strict subset of LOGO_MAPPING in contextIcon.tsx, kept in sync by hand. With the migration to platformicons, the canonical mapping now lives in getLogoImage. This change drops the duplicate table and delegates to getLogoImage, also clearing the @ts-expect-error from the previous keyed access.

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 18, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 18, 2026

📊 Type Coverage Diff

✅ No new type safety issues introduced. Coverage: 93.56%

Base automatically changed from priscilawebdev/ref/de-1262-migrate-contexticon-to-platformicons to master May 19, 2026 09:30
Delegate generatePlatformIconName to getLogoImage (LOGO_MAPPING in
contextIcon) instead of keeping a parallel PLATFORM_ALIASES map.
Drops the duplicated alias table and the @ts-expect-error escape.

Note: this consolidates onto the canonical events-context mapping,
which differs in a few edge cases (e.g. 'ipod' -> 'apple-iphone').
For browser/OS strings produced by replay SDKs these names are
unlikely to surface.
@priscilawebdev priscilawebdev force-pushed the priscilawebdev/ref/consolidate-replay-platform-icon-resolution branch from 1a58a0c to 0e8b3ea Compare May 20, 2026 11:50
@priscilawebdev priscilawebdev marked this pull request as ready for review May 20, 2026 12:01
@priscilawebdev priscilawebdev requested a review from a team as a code owner May 20, 2026 12:01
@priscilawebdev priscilawebdev requested a review from a team May 20, 2026 12:02
Copy link
Copy Markdown
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

🧼

@priscilawebdev priscilawebdev merged commit 7edca82 into master May 21, 2026
72 checks passed
@priscilawebdev priscilawebdev deleted the priscilawebdev/ref/consolidate-replay-platform-icon-resolution branch May 21, 2026 05:43
JonasBa pushed a commit that referenced this pull request May 21, 2026
Stacked on #115701.

`generatePlatformIconName` used to maintain its own `PLATFORM_ALIASES`
table — a strict subset of `LOGO_MAPPING` in `contextIcon.tsx`, kept in
sync by hand. With the migration to platformicons, the canonical mapping
now lives in `getLogoImage`. This change drops the duplicate table and
delegates to `getLogoImage`, also clearing the `@ts-expect-error` from
the previous keyed access.
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.

3 participants