Skip to content

[rebrand] Modernize puzzle-complete feedback dialog paint#74085

Open
alex-m-brown wants to merge 6 commits into
stagingfrom
alex/spritelab-puzzle-complete-feedback-rebrand
Open

[rebrand] Modernize puzzle-complete feedback dialog paint#74085
alex-m-brown wants to merge 6 commits into
stagingfrom
alex/spritelab-puzzle-complete-feedback-rebrand

Conversation

@alex-m-brown

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

Copy link
Copy Markdown
Contributor

Repaints the shared puzzle-complete feedback dialog (opened by FeedbackUtils.displayFeedback after Run in any Blockly/Droplet lab) with semantic design-system tokens. No LegacyDialog shell swap - CSS-only paint plus small source-level color swaps in LegacyButton.jsx

Scope: puzzle-complete dialog specifically. Everything else scoped under .dash_modal so it doesn't touch react-bootstrap modals in PD/account/teacher-tools surfaces.

What changed

  • Close X: dropped the giant 61x59 PNG close-button mixin; renders a small fa-solid fa-xmark in --text-neutral-quaternary, transparent bg. Same treatment as the qtip PR. One line in LegacyDialog.js adds <i class="fa-solid fa-xmark"> inside the button.
  • Title / body typography: .congrats and .lines-of-code-message swap legacy $neutral_dark + main-font-semi-bold for --font-family-main + --font-size-body-lg + --font-weight-semi-bold/-regular + --text-neutral-primary. Targets specific classes so the Show Code panel's own p/pre inside .generated-code-container is untouched.
  • Show Code toggle: .show-code > summary gets semantic tokens + DS type. !important needed because CodeWritten writes inline styles on the summary.
  • Buttons row: #feedbackButtons is a right-aligned flex row (24px gap, align-items: center so K1 Replay sits centered against the tall Continue arrow). The button colors themselves are set at source in LegacyButton.jsx (see below), so no !important color overrides in the SCSS.
  • BUTTON_TYPES.legacyPrimary (LegacyButton.jsx): color.orange -> var(--background-brand-purple-primary) for bg + border. Radium's inline style passes the CSS var through; the browser resolves it. This is the only reason the K1 Continue arrow head recolors automatically - the head reads config.style.backgroundColor at render time. Blast radius: legacyPrimary is only used by DialogButtons for the Continue button, and Continue only renders when the caller passes nextLevel={true} - which is only displayFeedback in puzzle-complete. No other button in the app changes color.
  • BUTTON_TYPES.cancel (LegacyButton.jsx): neutral_white / neutral_dark / neutral_dark20 -> --background-neutral-primary / --borders-neutral-strong / --text-neutral-primary / --background-neutral-tertiary (hover). Blast radius: ~15 dialog Cancel/Replay buttons across weblab/javalab/applab/levelbuilder/data-browser plus feedback's Replay. Visual delta is subtle in light theme (#292F36 -> #9ea5ad border tint); semantically correct.
  • Puzzle rating row: kept in the DOM (downstream tests depend on it) and rebranded to match - --borders-neutral-primary separator, Geist 16px --text-neutral-tertiary label, heart/frown icons in --text-neutral-quaternary at rest / --text-neutral-primary when hovered or enabled.

Testing story

Before screenshots
Screenshot 2026-07-24 at 1 55 32 PM
Screenshot 2026-07-24 at 1 55 37 PM
Screenshot 2026-07-24 at 1 56 46 PM

After screenshot
Screenshot 2026-07-24 at 2 02 30 PM
Screenshot 2026-07-24 at 2 02 55 PM
Screenshot 2026-07-24 at 2 03 11 PM
Screenshot 2026-07-24 at 2 03 30 PM

Then manually test:

  • Complete a puzzle in any Blockly/Droplet lab (Artist, Maze, Play Lab, App Lab, Sprite Lab) and confirm the dialog renders with modern typography, purple Continue, outlined Replay, small fa-xmark close, and rebranded puzzle rating row.
  • Complete a K1 puzzle (Course A or B kindergarten level) and confirm Continue is a purple arrow (body + head both purple), Replay is the K1 chunky outlined variant vertically centered against the arrow, and the puzzle rating row still renders.
  • Click the heart / frown - confirm the enabled state darkens correctly and only one is selected at a time.
Screenshot 2026-07-24 at 2 10 33 PM Screenshot 2026-07-24 at 2 11 08 PM
  • Expand "Show code" and confirm the code panel inside is unchanged (dark text on neutral gray, monospace, Berkeley/Harvard links still work).
  • Close the dialog via the X, via Escape (Bootstrap modal default), and via Continue / Replay.
  • Trigger a Cancel button elsewhere in the app (any weblab/javalab/applab/levelbuilder/data-browser dialog with a Cancel) and confirm the subtle border-color shift looks OK (was near-black, now medium-gray).
  • Sanity-check a non-lab surface (a PD dialog, an account settings modal) to confirm the rebranded typography does NOT leak in (everything CSS-side is scoped to .dash_modal).
  • Try RTL (html[dir=rtl]): X should flip to left, layout should mirror, K1 arrow should still point in the correct direction.
  • Firefox and Safari.

Make sure you ask @:

  • Continue uses --background-brand-purple-primary; Replay is --background-neutral-primary with --borders-neutral-strong border. Confirm this is the right pairing for the puzzle-complete surface.
  • Cancel button retokenization softens the near-black border to a medium-gray across ~15 dialogs (list in "What changed" above). Confirm this is acceptable collateral rebrand or if you'd prefer we keep those legacy and only paint feedback's Replay.

alex-m-brown and others added 6 commits July 24, 2026 09:02
Repaints the shared puzzle-complete feedback dialog (opened by
FeedbackUtils.displayFeedback after Run in any Blockly/Droplet lab)
with semantic design-system tokens. No LegacyDialog shell swap - the
qtip-style paint approach: CSS tokens on the surface, minimal JS.

Scoped under .dash_modal so nothing leaks to react-bootstrap modals
in PD/account/teacher-tools surfaces.

- .x-close: dropped the 61x59 PNG close-button mixin; renders a small
  fa-xmark in --text-neutral-quaternary, transparent bg (matches the
  qtip close X). One-line JS in LegacyDialog.js adds <i class="fa-solid
  fa-xmark"> inside the close button.
- .congrats / .lines-of-code-message: MUI-mirroring typography via
  --font-family-main, --font-size-body-lg, --font-weight-semi-bold /
  -regular; --text-neutral-primary color. Targets specific class names
  so the Show Code panel's own p/pre inside .generated-code-container
  is untouched.
- .show-code > summary: semantic tokens, DS type. !important is needed
  because CodeWritten sets inline styles on the summary element.
- #feedbackButtons: right-aligned flex row (via the inner DialogButtons
  wrapper), 12px gap. Continue = --background-brand-purple-primary
  filled, Replay = outlined via --borders-neutral-strong. !important
  needed to beat LegacyButton's Radium inline styles.
- #puzzleRatingButtons: display: none, per product ask to drop the
  "Did you like this puzzle?" row.

Followups: LegacyButton -> MUI Button (retire the Radium !important
dance); K1 arrow Continue button retains its arrow shape here.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Downstream tests depend on #puzzleRatingButtons being in the DOM, so
keep the row and paint it to match the rest of the modernized dialog:
- Separator: --borders-neutral-primary
- Label: Geist, 16px, --text-neutral-tertiary
- Heart/frown icons: --text-neutral-quaternary at rest,
  --text-neutral-primary on hover/enabled

Overrides apps/style/common.scss:652 via .dash_modal scope + !important
on the id-specific fills.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@alex-m-brown
alex-m-brown requested review from a team and moshebaricdo July 24, 2026 18:24
@alex-m-brown
alex-m-brown marked this pull request as ready for review July 24, 2026 18:24
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.

2 participants