fix(web): share compact CTA hover and inline showcase keycaps - #2771
Merged
Conversation
Add c-button-compact so compact accent pills hover with bg-accent-hover instead of brightness-110, and render undo/redo as chips in the step sentence so the content module no longer calls detectPlatform. Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Visible chips already expand Mod; the sr-only sentence now does too so undo/redo does not leak the raw keymap token to screen readers. Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Finishes the two cleanups PR #2770 deferred, plus the PostHog follow-up for the assist event rename.
hover:bg-accent-hover.c-buttonstays the tall elevated default (h-11+ lift). A newc-button-compactutility is the row-height variant: focus ring, disabled state, no forced height or shadow. Call sites in the checklist, welcome pills, anonymous calendar tooltip, calendar list header, and tasks-removal notice now pair it withc-button-primary(orc-button-secondaryfor Log in). Changing--color-accent-hoverreaches all of them. The welcome Log in pill drops hardcoded hex in favor ofc-button-secondary.ShowcaseStep.bodycan be the existingShortcutTipPart[]model. OnlyundoRedouses it — converting every step would duplicate the chip row already rendered fromkeycaps.ShortcutTipPartsis the shared renderer (sidebar tips now use it too).MOD_KEY/detectPlatform()are gone fromshowcase.steps.ts, and redo finally renders viaKEYMAP.redo.keycaps. Accessible copy expandsModto Cmd/Ctrl the same way the chips do.shortcut_showcase_assist_shown. Added Showcase assist used by step (shortcut_showcase_assist_usedbroken down bystep) and Showcase time on step (median seconds between consecutiveshortcut_showcase_step_completedevents, usingstarted/redoneas the previous beat). Both stay empty until production traffic exists. Did not restore the idle/failed-attempt assist hook.Simplicity
c-button-compactrather than stripping height fromc-button: the default CTA still wants 44px and the lift/shadow; compact sidebar/checklist pills do not. Optional parts onbodyrather than reshaping every step.Automated validation
bun test:web: 2190 pass, 0 fail.bun run type-check: clean.bun run lint: 11 pre-existing warnings, none in changed files.bun run dev:web): welcome Sign up 30px, Log in 32px (bordered secondary, not hex gray), checklist Sign up 28px, anon tooltip Sign up 23px. Checklist hover backgroundrgb(135, 203, 230)vs restrgb(124, 198, 228)—bg-accent-hover, not brightness. Undo/redo step shows inline Ctrl/Shift/Z chips in the sentence with no duplicate keycap row; sr-only copy isCtrl+Z/Ctrl+Shift+Z. Console errors were only backendERR_CONNECTION_REFUSED(anonymous IndexedDB mode).Independent review
A read-only reviewer flagged that sr-only undo/redo copy still said
Mod. Fixed by expanding Mod to Cmd/Ctrl ingetPartsPlainText. No other confirmed defects.Test plan
Browser: welcome Sign up / Log in hover, showcase step 9 inline undo+redo chips, checklist accent Sign up pill, anon calendar tooltip Sign up.