fix(demo): render components in demo + correct install-table bundle list - #626
Conversation
|
Important Review skippedNo new commits to review since the last review. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe demo now loads the full stylesheet bundle, the install table lists only the optimal and full bundles, and the demo sidebar width increases from 12rem to 15rem. ChangesBundle and demo updates
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The demo showcases the complete API — 105 .sf-btn, 38 .sf-card and 51 .sf-surface-* usages, plus utilities — but linked dist/slashed.optimal.css, the lean bundle that deliberately excludes optional/components.css, optional/tokens.components.css and optional/utilities.css. As a result every .sf-btn--* variant (danger, primary, gradient, …) collapsed to the browser default button — identical grey boxes — and cards/surfaces/utilities were unstyled too. Point the demo at dist/slashed.full.css, which bundles the component and utility layers. Verified in headless Chromium: .sf-btn--danger now renders red, .sf-btn--primary blue, .sf-btn--success green, and .sf-card picks up the surface fill. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q3UL7qbysdtGPFpVMo6eiY
The install table advertised slashed.optimal-components.css and slashed.optimal-utilities.css, but those tiers were retired when the bundle set was reduced to optimal + full (see tests/button.spec.js, tests/card.spec.js). Only slashed.optimal.css and slashed.full.css are actually built and published. List just the two real bundles: optimal (core + classless forms) and full (optimal + component and utility layers). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q3UL7qbysdtGPFpVMo6eiY
The desktop nav sits in .sf-sidebar at --sf-sidebar-width: 12rem (192px), but its links are white-space: nowrap and the longest nested entries need 226px. With overflow-y: auto the column also clipped horizontally, so "Scoped Themes", "Border Radius", "Motion & States" and "Reset & Base" rendered cut mid-word with a stray horizontal scrollbar. Bump the demo sidebar to 15rem (240px) — measured to fully contain the widest nested label with margin. Mobile drawer (min(17rem, 85vw)) was already wide enough and is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q3UL7qbysdtGPFpVMo6eiY
850e2ce to
183cfc0
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
Two related defects surfaced from a report that every button in
demo/index.htmlrendered as an identical grey box.1. Demo loaded the wrong bundle. The demo showcases the complete API — 105
.sf-btn, 38.sf-card, 51.sf-surface-*usages plus utilities — but linkeddist/slashed.optimal.css, the lean bundle that deliberately excludesoptional/components.css,optional/tokens.components.cssandoptional/utilities.css. As a result every.sf-btn--*variant collapsed to the browser-default button (identical grey), and cards/surfaces/utilities were unstyled too. Fixed by pointing the demo atdist/slashed.full.css, which bundles the component and utility layers.2. Landing-page install table advertised retired bundles.
index.htmllistedslashed.optimal-components.cssandslashed.optimal-utilities.css, but those tiers were retired when the bundle set was reduced tooptimal + full(documented intests/button.spec.js/tests/card.spec.js). Onlyslashed.optimal.cssandslashed.full.cssare actually built and published. Table trimmed to the two real bundles.Type
Checklist
feat:,fix:,docs:, …) — enforced by commitlintnpm run lint:csspasses (stylelint) — no CSS source touchednpm run buildrebuildsdist/(ran locally to verify; bundles are git-ignored)npm testfull suite not run; targeted rendering verified manually (see Notes)core/*.css,optional/*.css, ortoken-registry.jsonchanged — LLM guide unaffectedCHANGELOG.mdnot updated — demo/landing-page HTML only, not shipped in the CSS packageNotes
Only
demo/index.htmlandindex.htmlchanged — no CSS source, no bundle config, no generated files.Verified in headless Chromium against the actual demo file after the fix:
optimal)full).sf-btn--dangerrgb(239,239,239)greyoklch(0.48 0.22 12).sf-btn--primaryrgb(239,239,239)greyoklch(0.47 0.27 264).sf-btn--successoklch(0.5 0.16 145).sf-cardRoot
index.htmlinstall table now renders exactlyslashed.optimal.cssandslashed.full.css, with zero page errors.🤖 Generated with Claude Code
https://claude.ai/code/session_01Q3UL7qbysdtGPFpVMo6eiY
Generated by Claude Code
Summary by CodeRabbit