Skip to content

Design B, Phase 0: new_look flag, shared timer logic, bottom sheet (no visible change) - #153

Draft
ShuhaoZQGG wants to merge 9 commits into
devfrom
claude/redesign-b-a6e1b9
Draft

ShuhaoZQGG wants to merge 9 commits into
devfrom
claude/redesign-b-a6e1b9

Conversation

@ShuhaoZQGG

Copy link
Copy Markdown
Contributor

Plan 13, Phase 0 of design B (the redesigned Zoom side panel). No issue; the design boards are the
"Timer panel layouts" canvas, and the plan is docs/plans/13-design-b-new-look.md (local).

Why

Design B redraws the whole Zoom panel: one timer card, a "Look & sound" section of sheets, the ⋯ More
menu, no footer. Building it in one go would mean one huge PR. This phase lays the groundwork so later
phases can merge to dev while the design is still unfinished, with the code that talks to Zoom
written once and shared by both looks.

What changes

Nothing visible: with new_look off, which it is everywhere, the panel is today's panel.

  • new_look release flag (worker/flags.js, fallback false). App.jsx picks ClassicShell
    (today's markup, unchanged) or a lazily loaded NewLookShell. For now NewLookShell is today's
    panel; Phase 1 fills it in.
  • useNewLook: while flags are still loading it uses this device's last answer, so someone on the
    new look doesn't see the old panel flash at every open.
  • FLAGS_FORCE can set single flags, e.g. "1,new_look=0" or "pro=0", so a dev test run can
    pick production's mix instead of every flag on. The production guard now fails on any flag forced
    on.
  • Refactors, no behaviour change:
    • LiveTab's state, effects and handlers move into useLiveTimer. Logic and JSX are byte-for-byte
      what they were (checked with a diff), and LiveTab.test.jsx passes unchanged.
    • VideoPreviewLayer: the count-up chip and club badge, with their drag, size and hide controls,
      moved out of TimerDisplay.
    • CardSetsPanel and SoundsPanel: the dialog bodies. CardImagesModal and SoundsModal render
      exactly as before around them.
  • Sheet (apps/zoom-app/src/b/): design B's bottom sheet. A modal dialog that moves focus in
    and back out, traps Tab, and closes on Escape or a press on the dimmed panel. Unused until Phase 1.

Security

None. No new routes. FLAGS_FORCE is a Worker var, and production's value is guarded by a test.

Production impact

None while new_look is off. Don't turn it on in PostHog yet: until Phase 1 it shows today's panel
anyway. Rollback is a revert.

Testing

  • npm test: 124 files, 2373 tests pass. New: useNewLook, useLiveTimer, VideoPreviewLayer,
    Sheet, standalone CardSetsPanel / SoundsPanel, FLAGS_FORCE parsing and per-key resolution.
  • npm run test:e2e: 56 passed.
  • npm run test:specs: 13 specs valid, no drift.
  • Oracle: n/a (not a factory issue).

Evidence (real Zoom client)

Not run yet; see below.

Not verified

The real-client run for this phase: timer-core, timer-sounds, club-card-sets and
announcement-banner (their covers include changed files), all with new_look off. Blocked:
the test device is held for #145's CC-10 tonight. Its club token has to age past 2026-11-15 02:29Z
untouched, and dev has to keep serving #145's fix, so this branch can't be deployed to dev or opened
on that Mac until CC-10 is done. timer-core and announcement-banner are marked stale until then
(the other two already were). Labelled needs:zoom-test.

Look here first

  • worker/flags.js: parseFlagsForce, and resolveFlags laying the forced keys over the result.
  • apps/zoom-app/src/hooks/useNewLook.js and the shell switch in apps/zoom-app/src/App.jsx.
  • apps/zoom-app/src/hooks/useLiveTimer.js: only one view may call it at a time (it owns the
    overlay effect).

new_look (fallback false) gates design B, the redesigned Zoom panel (plan 13).
FLAGS_FORCE now takes per-key entries after an optional base, e.g.
"1,new_look=0" or "pro=0", so a dev test run can pick the mix production
has instead of every flag at once. The production guard now fails on any flag
forced on, not only "1".
App picks ClassicShell (unchanged) or the lazily loaded NewLookShell. Until
flags land, useNewLook answers this device's last answer, so the new look
does not flash the old one at every open. NewLookShell is today's panel until
Phase 1 fills it in; the flag is off everywhere.
…seLiveTimer

A straight move: the logic and the JSX are byte-for-byte what they were, and
LiveTab.test.jsx passes unchanged. Design B's timer card will call the same
hook, so the overlay pushes and video handling exist once.
…ge layer

Out of TimerDisplay unchanged, so design B's 16:9 preview shares the drag,
size and hide gesture. New tests pin commit-on-release, clamping, and which
controls show when.
The dialogs render exactly as before around the extracted bodies. Design B's
Cards and Sounds sheets will show the same panels, with the own-background
picker left to its own sheet.
A modal dialog that rises from the bottom: focus in on open and back to the
opener on close, Tab trapped, Escape and the dimmed panel close. Unused until
Phase 1.
…al and SoundsModal

Steps unchanged: the behaviour did not move, only the files it lives in.
…l Phase 0 runs in Zoom

The test device is held for #145's CC-10 tonight, so the real-client run for
plan 13 Phase 0 waits. Steps unchanged.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs:zoom-test Factory: waiting for the real-Zoom station

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant