Skip to content

[rebrand] Brand-track legacy lab shell + Blockly SVG + viz resize bar#74002

Merged
alex-m-brown merged 4 commits into
stagingfrom
alex/spritelab-viz-column-workspace-bg
Jul 22, 2026
Merged

[rebrand] Brand-track legacy lab shell + Blockly SVG + viz resize bar#74002
alex-m-brown merged 4 commits into
stagingfrom
alex/spritelab-viz-column-workspace-bg

Conversation

@alex-m-brown

@alex-m-brown alex-m-brown commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Migrate the visualization column background, workspace surrounds, and Blockly workspace SVG in every legacy lab to brand-aware semantic tokens. Also swap the visualization resize bar's ⋮⋮ grabber color from a hardcoded gray to a semantic token so it tracks the active brand.

Scope: three files.

  1. dashboard/app/assets/stylesheets/application.scss — adds body.pin_bottom { background-color: var(--background-neutral-secondary) }. pin_bottom is applied at runtime by every legacy lab entry point (StudioApp.js, WebLab.js, Javalab.js, Ailab.js, Fish.js, netsim.js) and NEVER by Lab2-based labs — so this scopes the brand-aware wrapper background to legacy labs only.
  2. apps/style/common.scss — swaps #visualizationResizeBar color: $lighter_gray (#c6cacd) → var(--borders-neutral-strong). Semantic role match (resizable edge accent), brand-aware.
  3. apps/src/blockly/addons/cdoCss.ts — registers .blocklySvg { background-color: var(--background-neutral-secondary) !important } alongside the existing Blockly workspace overrides from PR [rebrand] Migrate blockly workspace to design-system semantic tokens #73785. The .blocklySvg rule ships in Blockly's baked-in compiled CSS (hardcoded white); overriding via Blockly.Css.register is the same mechanism we already use for .blocklyToolbox, .blocklyFlyoutBackground, etc.

Mapping

Before After
body.pin_bottom inherited from body { background-color: #f2f2f2 } — legacy raw hex, stayed gray under any brand body.pin_bottom { background-color: var(--background-neutral-secondary) }#f0f2f5 under default brand (essentially indistinguishable), pink under audit, dark under dark theme
svg.blocklySvg { background-color: white } (Blockly-baked default) — white rectangle in the middle of a themed workspace under audit / dark theme svg.blocklySvg { background-color: var(--background-neutral-secondary) !important } via Blockly.Css.register — blends with the wrapper background so the whole lab shell tracks the brand as one continuous surface
#visualizationResizeBar { color: $lighter_gray } (#c6cacd) — legacy hex, dots stayed gray under any brand #visualizationResizeBar { color: var(--borders-neutral-strong) } — slightly darker gray on default (#b7bfc8 vs #c6cacd), pink on audit

Scope rationale — why body.pin_bottom and not body or .wrapper:

  • body alone would ripple across every dashboard page (marketing, curriculum, teacher dashboard, sign-in, etc.). Too broad.
  • .wrapper is the ancestor of #codeApp in the lab shell; scoping there works but requires knowing the .wrapper structure. body.pin_bottom is simpler and covers the same territory since .wrapper is transparent and inherits body's background.
  • body.pin_bottom (specificity 0,1,1) cleanly beats the base body { background-color: #f2f2f2 } rule (0,0,1) at common.scss:55 without touching the base.

In scope (legacy labs — every lab that runtime-adds pin_bottom):

  • All classic Blockly labs via StudioApp.js: Sprite Lab, Game Lab, App Lab, Studio, Maze, Turtle, Flappy, Bounce, Craft, Jigsaw, Poetry.
  • Non-Blockly legacy labs: Web Lab (classic), Java Lab, AI Lab, Fish, NetSim.

Links

Testing story

Before screenshot — Sprite Lab under ?brand=codeai-audit: viz column + workspace surround visibly gray (body #f2f2f2 bleeding through), blocklySvg area a stark white rectangle in the middle of the pink workspace chrome, resize bar ⋮⋮ dots gray.
pr8-before-spritelab-audit

After screenshot — same page: whole lab shell (viz column background + wrapper around workspace + workspace SVG) reads as one continuous light-pink surface; resize bar dots are pink; Blocks toolbox stays its own slightly-deeper pink for contrast. Under default brand: subtle light gray shell, essentially unchanged visually.
pr8-after-spritelab-audit
Code.org Brand
pr8-after-spritelab-default
CodeAI Brand
pr8-after-spritelab-codeai-next

Manual QA — please walk through:

  • Sprite Lab loads under ?brand=codeai-audit: viz column background, workspace surround, and workspace SVG all resolve to the same light-pink #fff0f7. No stark white rectangle around the "when run" block.
  • Visualization resize bar ⋮⋮ grabber is pink and visible against the light-pink shell.
  • Under default brand (no ?brand=): viz column + workspace + resize bar all look essentially identical to today — no visible regression to the current gray-ish look.
  • Cross-lab spot check: Game Lab, App Lab, Studio, Maze — same brand-aware shell applies everywhere.
Screenshot 2026-07-21 at 10 32 37 AM
  • Minecraft labs remain unchanged as they have their own specific theming.
Screenshot 2026-07-21 at 10 46 40 AM
  • Non-lab pages (homepage, teacher dashboard, curriculum viewer, sign-in): body background is still #f2f2f2. No visual change.
  • Lab2 pages (Music Lab: /musiclab, Python Lab, Web Lab 2): unchanged. They don't set pin_bottom so the new rule doesn't apply.
  • Firefox and Safari.

Make sure you ask @moshebaricdo:

  • Chose --background-neutral-secondary (neutral-gray-5 = #f0f2f5 on default) for the shell. That's the closest semantic token to legacy #f2f2f2. Confirm it's the right choice vs --background-neutral-primary (base white) or --background-neutral-tertiary (slightly deeper gray).
  • Chose --borders-neutral-strong for the resize bar ⋮⋮ color. Semantic role fits (resizable edge accent). Confirm it's what you want vs a lighter subtle-chrome option.

@alex-m-brown
alex-m-brown marked this pull request as ready for review July 21, 2026 17:41
@alex-m-brown
alex-m-brown requested review from a team and moshebaricdo July 21, 2026 17:42

@ebeastlake ebeastlake 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.

Approved in design office hours!

@alex-m-brown
alex-m-brown merged commit a6cd683 into staging Jul 22, 2026
8 checks passed
@alex-m-brown
alex-m-brown deleted the alex/spritelab-viz-column-workspace-bg branch July 22, 2026 19:20
@moshebaricdo

Copy link
Copy Markdown
Contributor

so much pink 🩷

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