Skip to content

feat(web): fade the sketch chrome in with the entry glide - #109

Open
petergstfsn wants to merge 1 commit into
mainfrom
claude/sketch-mode-crossfade-e14af5
Open

feat(web): fade the sketch chrome in with the entry glide#109
petergstfsn wants to merge 1 commit into
mainfrom
claude/sketch-mode-crossfade-e14af5

Conversation

@petergstfsn

Copy link
Copy Markdown
Contributor

Increment 4.2 of the sketch-flow & camera plan. CSS only — 36 lines, based on main, independent of #108.

What the measurement showed

The plan entry said "toolbar crossfade in the top bar", but driving the app showed the top bar doesn't swap on sketch entry at all. What actually happens: the sketch rail and palette were the only sketch-mode chrome with no entrance animation. They snapped to full opacity on frame one while the camera glided head-on for 800 ms — out of step both with that camera move and with the "Editing Sketch" tool card beside them, which already fades in via tool-card-in.

The change

Both now fade over --dur-base (200 ms) with --ease-out:

  • .sketch-rail — new sketch-chrome-in, carrying the same 6 px lift tool-card-in uses (its translateX(-50%) centring is preserved through the keyframe, so it does not jump sideways).
  • .sketch-palettesketch-palette-in, fade only: it is right-anchored with no transform to preserve.
  • Both get the [data-reduced-motion='true'] override the tool card has, on top of the global prefers-reduced-motion collapse in tokens.css.

Enter-only, on purpose

Matching the tool card. A fade-out needs the element to outlive React's unmount, and the rail's props come from interaction.session, which is gone the instant the session ends — so an exit animation means holding a stale session past the effect cleanup. That is the same pattern the interaction-feel audit deliberately left undone for the gizmo exit, and I would rather not introduce it inside a polish change. Recorded in the plan with that reasoning rather than left implicit.

Verification

  • pnpm typecheck ✓ · pnpm lint 0 errors · pnpm test:web 748 passed
  • modeling + workspace-polish e2e locally: 49 passed (Playwright waits for element stability, so a new 200 ms entrance was the plausible source of timing shifts — there were none)
  • Live: three consecutive frames after picking a plane show the rail and palette ramping up together mid-glide instead of popping.

🤖 Generated with Claude Code

The sketch rail and palette were the only sketch-mode chrome with no
entrance: they snapped to full opacity on the first frame while the camera
flew head-on for 800 ms, out of step with the tool card beside them, which
already fades. Both now fade over --dur-base with the shared ease, the rail
carrying the same 6px lift the tool card uses and the palette fading only,
having no transform of its own to preserve.

Enter-only, matching that card. A fade-out needs the element to outlive
React's unmount, and the rail's props come from interaction.session, which
is gone the moment the session ends — so an exit means holding a stale
session past the cleanup, the pattern the interaction audit deliberately
left undone for the gizmo exit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 27, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
openzcad d7759a6 Aug 27 2026, 04:38 PM

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.

1 participant