Repository navigation
fix(site): landing theme-lab scroll jump, livelier hero, sketchbook polish (+ SwatchGroup) - #124
Merged
Merged
Conversation
…olish Adds SwatchGroup to @codeatlasdev/ui (non-overlapping swatch hit areas), uses it on the landing, keeps the theme lab layout stable while entering brand mode, adds a live Northwind hero (reduced-motion safe), replaces the amber corner glow with a brand pencil hatch, plain-language copy and a calmer sketchbook grid.
mvilacad
marked this pull request as ready for review
October 15, 2026 04:11
mvilacad
force-pushed
the
fix/122-site-landing-scroll-jump-in-theme
branch
from
October 15, 2026 04:11
ccfa658 to
630eec7
Compare
Contributor
|
Site preview: https://pr-124.codeatlas-ui.pages.dev |
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.
Closes #122
Root causes
presets: [...]) to the code snippet. The chapter copy column is vertically centered against the lab, so the whole section moved ~10px and the document grew 21px under the reader's scroll (CLS 0.0035).::aftertap pad on a 26px dot at a 34px pitch, so each pad overlapped its neighbours. A click aimed at violet landed on emerald (Playwright:<button aria-label="emerald"> intercepts pointer events), i.e. selecting a color silently failed or picked the wrong one.Changes
packages/ui(core)SwatchGroup(role="radiogroup", roving tabindex, preset or customcolor,size,disabled, forced-colors styles). Underpointer: coarsethe swatch itself is the 44px target, so hit areas can never overlap. Tests inSwatchGroup.svelte.test.ts(axe, click/onchange, keyboard, paint, no tap area reaches a neighbour). Documented in AGENTS.md, README, llms.txt and the generatedAPI.md. Changeset: minor.site/SwatchGroup; the snippet has the same number of lines in every mode; focusing the hex field no longer flips to brand mode (only a valid typed hex does).prefers-reduced-motionthere are no timers, no draw-in and the release resolves immediately; markup is the final state, so e2e/VRT are deterministic. Uses the package'stoast/Toaster,SegmentedControl,Switch,StatusChip.Regression tests (test first)
site/tests/landing-theme-lab.spec.ts(3 tests) andSwatchGroup.svelte.test.ts.Before (current code / old pad design):
After:
landing-theme-lab.spec.ts3/3 pass;SwatchGroup.svelte.test.ts5/5 pass.Verification
bun run validatepasses (pre-push gate).landing.spec.ts+landing-theme-lab.spec.ts(desktop + mobile),layout.spec.tsfor/(390, 768, 1024, 1280, 844x390),routes.a11y.spec.tsfor/(dark, light, forced-colors), keyboard, responsive, scroll-lock, theme, network-idle: all green.Screenshots (1440x900)
(Images live on the throwaway branch
pr-assets/122; delete it after merge.)Maintainer notes
/must be regenerated (hero, copy and grid changed): runbun run test:vrt:updateon this branch; thevisualjob commits__screenshots__/.site/src/content/docsis untouched; aswatch-group.mdxpage is requested from the Docs owner.Checklist
bun run validatepassesSwatchGroup)