Paint the menu's panel chrome from the token contract and restyle the demo (3.0.0-beta.2) - #115
Merged
Merged
Conversation
…contract The v2 demo painted the off-canvas nav and the mega / sub panels, added gutters and drew the angle icons from its theme CSS by reaching into Emotion internals. v3 dropped all of that with no token to replace it, so panels rendered transparent over page content, the desktop nav row sat outside the painted shell, mobile-only back links showed on desktop and nothing had a gutter. The shipped stylesheet now owns that chrome: - New tokens: --rmm-panel-bg, --rmm-panel-border, --rmm-panel-shadow, --rmm-panel-padding, --rmm-link-radius, --rmm-icon-stroke, --rmm-gutter, --rmm-column-min-width and --rmm-line-height, each defaulting to a Topiary token with a fallback. - Removed --rmm-hamburger-top / --rmm-hamburger-left: the hamburger now sits inline at the right of a single 4rem top bar, so the mobile shell is one row (--rmm-menu-height defaults to --rmm-topbar-height). - At the large breakpoint the top bar and main list share one row and each mega panel drops down full-width as a grid of columns; sub lists render inline and the mobile-only heading rows are hidden. - Links drop Topiary's underline inside the menu and hover as a rounded pill; chevrons are drawn from borders so no icon assets ship. styleContract.test.js asserts every panel surface paints from --rmm-panel-bg and that the removed tokens are gone; the README token table is updated and stays contract-tested. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017NynwxzG7ZKWBaHW4QAmcp
The library half (panel chrome, single-row shell, grid mega panels) is a contract change, so the package moves to 3.0.0-beta.1 and both demos reinstall from the repacked tarball. Vite demo: a hero with a monospace prop readout, feature cards in a grid, and each switcher in its own card, all styled from Topiary tokens so the four data-theme values re-skin the page and the menu together. The five override themes gain --rmm-panel-bg / -border / -shadow so Dark, Monokai, Retro and Synthwave panels match their bars (Synthwave also steps its pixel font down a size). Next demo: page padding clears the fixed top bar. docs/release/v3.0.0.md records what changed since beta.0 and that beta.1 still needs publishing; the README migration section explains that v3 paints its own panels. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017NynwxzG7ZKWBaHW4QAmcp
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…as() enhancement Review follow-up. Comments only in the stylesheet (the panel's containing block at the large breakpoint must stay the fixed shell, and the :has() active tint is an enhancement), a corrected comment on the demo's top padding, and the tarball / demo lockfiles repacked so the committed artifact matches the source. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017NynwxzG7ZKWBaHW4QAmcp
…irection="right" A second Vite entry (slide-right/index.html -> src/slide-right.tsx) renders the same App with defaultSlideDirection="right", so each slide side has a sharable page instead of only the in-page toggle. The Slide direction card cross-links the two pages and the demo README documents the entry. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017NynwxzG7ZKWBaHW4QAmcp
Vercel installs only demo/, so vite.config.ts cannot rely on @types/node being hoisted from the repo root; the node:url / import.meta.url entry resolution failed its typecheck there. Relative input paths resolve against the Vite root and need no Node imports. Verified by hiding the repo root node_modules and running the demo's tsc -b and vite build. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017NynwxzG7ZKWBaHW4QAmcp
The nav honoured slideDirection but the mega and sub panels that slide over it always entered from the left, so a right-sliding menu fought itself at every level below the first. Under rmm__nav--slide-right the panels now rest off the right edge and animate with the mirror-image keyframes, with matching reduced-motion transforms and large-breakpoint overrides at one class higher specificity than the left-slide rules. styleContract.test.js asserts the right-slide panel rules; the README props row and release notes say the prop covers every level. Verified in a real browser on both demo pages: mid-animation the mega and sub panels enter from positive offsets under slideDirection="right" and negative ones under "left", and reduced motion rests closed panels off the matching edge. Tarball repacked; both demos reinstalled. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017NynwxzG7ZKWBaHW4QAmcp
The right-slide-panel fix (215e856) is correct in the source and in a from-scratch production build verified twice locally, but the reporter still saw Store and Outdoors slide in from the left on the deployed Vercel preview after a hard refresh in an incognito window. beta.1's tarball changed content three times (panel chrome, doc comments, then the panel slide-direction fix) while keeping one version string, which risks a file:-dependency install cache resolving by path/version and serving stale content instead of noticing the tarball changed. Bumping to 3.0.0-beta.2 removes that risk: every install now resolves a genuinely new dependency rather than relying on a cache correctly detecting changed content at an unchanged specifier. Repacked the tarball, pointed both demos at it, and reinstalled and rebuilt both clean. docs/release/v3.0.0.md records why and the going-forward rule: repack and bump together on every content change, not just the first one per beta. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017NynwxzG7ZKWBaHW4QAmcp
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.
Why
The demo worked but looked broken. In v2 the demo's theme CSS painted the off-canvas nav and the mega / sub panels, added gutters and swapped in the angle icons by reaching into Emotion internals. The v3 migration dropped all of that and left no token to replace it, so on
maintoday:What changed
Library (
src/styles/style.css,rmmTokens.js, README token table)--rmm-panel-bg,--rmm-panel-border,--rmm-panel-shadow,--rmm-panel-padding,--rmm-link-radius,--rmm-icon-stroke,--rmm-gutter,--rmm-column-min-width,--rmm-line-height.--rmm-hamburger-top/--rmm-hamburger-left: the hamburger now sits inline at the right of a single 4rem top bar, so--rmm-menu-heightdefaults to--rmm-topbar-height.auto-fillgrid of columns with a border and shadow; sub lists render inline; the mobile-only heading rows are hidden.--rmm-panel-bg, heading rows get a back chevron and a rule, forward items get a chevron.slideDirectionnow applies to every level: underrmm__nav--slide-rightthe mega and sub panels rest off the right edge and animate with the mirror-image keyframes (with matching reduced-motion transforms and large-breakpoint overrides), so a right-sliding menu enters from the same side at every depth.--rmm-menu-textso dark override themes stay legible.styleContract.test.jsnow asserts every panel surface paints from--rmm-panel-bg, that the removed tokens are gone, and that the right-slide panel rules use the right keyframes. README token table updated (still contract-tested).Demos
3.0.0-beta.1, then to3.0.0-beta.2(see note below); both demos reinstall from the repacked tarball.data-themere-skins page and menu together. The five override themes gain panel tokens so Dark / Monokai / Retro / Synthwave panels match their bars./slide-right/(slide-right/index.html→src/slide-right.tsx, a second Vite entry) mounts the same app withslideDirection="right"from the first render, so each slide side has a sharable URL. The Slide direction card cross-links the two pages. The entries are resolved with relative paths on purpose: Vercel installs onlydemo/, so the config cannot rely on@types/nodehoisted from the repo root.docs/release/v3.0.0.mdrecords what changed since beta.0 and that beta.2 still needs publishing; README migration notes explain that v3 paints its own panels.Why beta.2: the panel slide-direction fix (previous commit) verified correct locally in both dev and from-scratch production builds, but the reporter still saw the old left-slide behavior on the deployed Vercel preview after a hard refresh in an incognito window. The tarball's content had changed three times under the single version string
3.0.0-beta.1, which risks afile:-dependency install cache resolving by path/version and serving stale content. Bumping to3.0.0-beta.2forces every install, including Vercel's, to resolve genuinely fresh tarball content.docs/release/v3.0.0.mdnow says to repack and bump together on every content change going forward.Verification
npm test: 11 suites, 114 tests pass (includes axe scans, the new panel-chrome and slide-direction contract tests, README contract).scripts/a11y-walkthrough/walk.cjsagainst the rebuilt harness: ALL PASS (rows 13 / 13a / 13c, both reduced-motion settings).tsc -b, eslint,vite buildclean, also with the repo-rootnode_moduleshidden to mirror Vercel; screenshotted in all four Topiary themes and all five override themes at 1400px and 390px with Store and Outdoors open. Panels never show page content through them.tsc -b && vite build, served withvite preview, matching what Vercel runs): under"right"the nav, the Store mega panel and the Outdoors sub panel all enter from positive x offsets (from the right); under"left"all three enter from negative offsets. Withprefers-reduced-motion: reducethe closed panels rest off the matching edge and the open ones sit at x = 0. Re-verified after the beta.2 bump from a fully clean install (deletednode_modules, the tarball, anddistfirst).next buildclean;next startSSR output carriesdata-themeand the menu markup.3ee6a68).Before / after
Before (main): the Store panel overprints the page; on the Dark override the nav links are invisible.
After: see the screenshots attached in the session; happy to add them here on request.
🤖 Generated with Claude Code
https://claude.ai/code/session_017NynwxzG7ZKWBaHW4QAmcp