Skip to content

[Rebrand] SL-1904: Migrate PhoneFrame colors to DSCO semantic tokens#73055

Merged
ebeastlake merged 2 commits into
stagingfrom
rebrand/applab-phone-frame-dsco
Jun 12, 2026
Merged

[Rebrand] SL-1904: Migrate PhoneFrame colors to DSCO semantic tokens#73055
ebeastlake merged 2 commits into
stagingfrom
rebrand/applab-phone-frame-dsco

Conversation

@ebeastlake

@ebeastlake ebeastlake commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Migrate apps/src/applab/PhoneFrame.jsx and phone-frame.module.scss to the design system: legacy color.scss Sass vars → semantic CSS variables from frontend/packages/component-library-styles/colors.css, and the transient "PAUSED" debugger-overlay label → MUI <Typography>.

The shared RunButton / ResetButton from apps/src/templates/GameButtons.jsx are intentionally not migrated here — they're used by every lab (applab, p5lab, dance, maze, flappy, turtle, craft, javalab, music), so their migration belongs in its own ticket, not in a per-component PhoneFrame rebrand.

Color mapping (verified by hex)

Legacy hex Closest primitive Semantic token used
$lighter_gray #c6cacd --neutral-gray-30 (#c6ced6) --background-neutral-quinary
$charcoal #5b6770 --neutral-gray-90 (#576575) --background-neutral-octonary (gray-80, #69788a) — see ask below
$white #fff --neutral-base-white (#ffffff) --text-neutral-white-fixed
$brand_secondary_default #8C52BA --brand-purple-50 (#9657c7) --background-brand-purple-primary / --borders-brand-purple-primary

Typography

The "PAUSED" debugger overlay was a bare <div> styled with font-size: 20px. Swapped to <Typography variant="body1" component="div">; body1 in the code.org theme is 1.25rem (20px) / Figtree / 400 — a faithful match for the previous rendering. The .paused class is kept on the Typography (rather than moved to sx) so the white text color stays in the stylesheet and overrides MUI Typography's default --text-neutral-primary.

Links

  • Jira: SL-1904 (epic SL-1892)

Testing story

Hey, human! Add screenshots here.

Before screenshot

Screenshot 2026-06-05 at 9 10 40 PM Screenshot 2026-06-05 at 9 15 05 PM

After screenshot

Screenshot 2026-06-05 at 9 10 32 PM Screenshot 2026-06-05 at 9 14 57 PM Screenshot 2026-06-11 at 5 33 49 PM

Then, make sure you manually test the following:

  • AppLab preview area renders inside the rounded phone frame, top and bottom bars present.
  • Light (default) frame fill looks unchanged vs. prod.
  • Dark frame fill — compare against prod; expect a slight lightening (see ask below).
  • Run the AppLab app, then hit Pause in the debugger — the white "PAUSED" label should appear centered in the top frame bar, same size and weight as before.
  • Run / Reset buttons still work; the responsive #topResetButton purple state still triggers at compressed heights.
  • Check at widths 1568 / 1280 / 1024 / 768.
  • Try all of the above on Firefox and Safari.
  • Keyboard nav into the Run/Reset buttons still focuses cleanly.

Make sure you ask @moshebaricdo:

  • The semantic neutral background scale jumps --background-neutral-octonary (gray-80, #69788a) → --background-neutral-primary-inverse (base-black, #292f36), with no token mapping to --neutral-gray-90 (#576575) — which is the exact match for legacy $charcoal (#5b6770). For the dark phone frame I picked octonary (slightly lighter than the original). Do you want me to (a) keep octonary and accept the lightening as part of the rebrand, (b) switch to primary-inverse (markedly darker), or (c) add a new --background-neutral-* token pointing at --neutral-gray-90 and use that here?
  • PAUSED is now <Typography variant="body1"> (20px / regular weight) — a faithful match to the legacy font-size: 20px div. Alternative is h5 (20px / 600 bold), which would read more "alert"-y as a debugger overlay. Keep body1, or switch to h5?

🤖 Generated with Claude Code

SL-1904 (epic SL-1892). Replace legacy color.scss vars in
apps/src/applab/phone-frame.module.scss with semantic CSS variables
from component-library-styles/colors.css. No JSX changes — the
component has no text or buttons of its own.

Mapping (verified by hex):
  $lighter_gray (#c6cacd)            -> --background-neutral-quinary  (#c6ced6)
  $charcoal (#5b6770)                -> --background-neutral-octonary (#69788a)
  $white (#fff)                      -> --text-neutral-white-fixed    (#ffffff)
  $brand_secondary_default (#8C52BA) -> --background-brand-purple-primary (#9657c7)
                                        --borders-brand-purple-primary    (#9657c7)

No exact semantic-token match exists for $charcoal; --background-
neutral-octonary is the closest (gray-80 vs the original gray-90-ish
value) and is flagged for design review in the PR.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@ebeastlake ebeastlake changed the title Rebrand: migrate PhoneFrame colors to DSCO semantic tokens (SL-1904) [Rebrand] SL-1904: Migrate PhoneFrame colors to DSCO semantic tokens Jun 6, 2026
@ebeastlake
ebeastlake marked this pull request as ready for review June 6, 2026 04:22
@ebeastlake
ebeastlake requested review from a team and moshebaricdo June 6, 2026 04:23
@ebeastlake

ebeastlake commented Jun 6, 2026

Copy link
Copy Markdown
Contributor Author
Screenshot 2026-06-05 at 9 20 25 PM

Does the "Paused" 1Typography here need to be updated, too? @moshebaricdo

@ebeastlake
ebeastlake removed the request for review from a team June 6, 2026 04:26
@moshebaricdo

Copy link
Copy Markdown
Contributor
Screenshot 2026-06-05 at 9 20 25 PM Does the "Paused" 1Typography here need to be updated, too? @moshebaricdo

I think it makes sense to update! Unless this PR stays color focused and a follow up maybe refactors "paused" to use MUI typography and the button to use MUI buttons?

@moshebaricdo moshebaricdo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🥳

PR feedback for SL-1904. The PAUSED debugger-paused overlay was a
bare <div> with font-size: 20px in CSS. Swap to MUI <Typography
variant="body1" component="div">; body1 in the code.org theme is
1.25rem (20px) / Figtree / 400, matching the previous rendering.

The .paused class is retained on the Typography (rather than moved
to sx) so that the white text color stays in the stylesheet and
overrides MuiTypography root's --text-neutral-primary default.

The shared RunButton / ResetButton (apps/src/templates/GameButtons)
are intentionally untouched - they are used by every lab and are
out of scope for SL-1904.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@ebeastlake
ebeastlake merged commit c90bb3a into staging Jun 12, 2026
8 checks passed
@ebeastlake
ebeastlake deleted the rebrand/applab-phone-frame-dsco branch June 12, 2026 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants