FE-1455: Tighten the docs site chrome - #9268
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
PR SummaryLow Risk Overview Desktop-only toggle and drag handle live in a Also self-hosts JetBrains Mono (subset at build, no font-host request) and rounds markdown images so diagrams match the layer cards. Title beside the logo is now “Docs”. Reviewed by Cursor Bugbot for commit 85722ed. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6857f61. Configure here.
6857f61 to
04f8646
Compare
04f8646 to
73ec35e
Compare
73ec35e to
3d114ca
Compare
6131f2e to
a591f74
Compare
a591f74 to
92648bc
Compare
92648bc to
1360214
Compare
1360214 to
05e60ef
Compare
05e60ef to
85722ed
Compare

🌟 What is the purpose of this PR?
The docs site ran on Starlight's defaults, which spent most of the width on the two side panels, and the header carried an oversized logo and title. Diagrams sat in square-cornered frames next to rounded content blocks. This PR narrows the chrome, hands the width to the content column, and makes the sidebar collapsible and resizable. It touches
apps/petrinaut-docsonly; the bundle stays host-neutral.In stack #9280, FE-1457 (#9267) sits below and FE-1314 (#9162) above.
🔗 Related links
🔍 What does this change?
src/styles/chrome.css, registered as StarlightcustomCss): the sidebar narrows from 18.75rem to 15.5rem, and the content column widens from 45rem to 56rem, or 64rem with the sidebar collapsed. The left nav gets its own--pnd-sidebar-widthbecause Starlight sizes both side panels from--sl-sidebar-width, and collapsing the nav must zero one panel without giving the table of contents a negative width.src/components/SiteTitle.astro): a toggle button and a drag handle. Collapsing setsdata-pnd-sidebaron the root; the handle resizes between 224px and 480px, with arrow-key support. Both persist inlocalStorage, restored by aheadscript that runs before first paint so a collapsed sidebar never renders open and then jumps.0.09emletter-spacing, and the Starlight title becomes "Docs" beside the Petrinaut logo.::details-contentandinterpolate-sizeare supported, with an instant toggle elsewhere.Head.astrooverride emits the faces and preload.0.5remradius and acolor-mixborder, the same values.arch-carduses, so a diagram frame matches the layer components in both themes. The SVG interior is untouched.Review fixes
[data-has-sidebar], so the splash-template 404 page gets no toggle, no resize handle, and no collapsed-width variables.gray-5: the dark header background isgray-6itself, where agray-6hover would be invisible.overflow: clip, which cuts anything past it.Page.astro's unlayered style block as the exception to the claim that no rule fights Starlight on specificity.min-widthon the label spans is removed.SiteTitlecomment's claim that it is the header's only overridable component was false; it now says the component is the header's leftmost, beside the rail the controls act on.hoistingLimitsparagraph moved back under "Notes on configuration".Pre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
📜 Does this require a change to the docs?
The changes in this PR:
SiteTitleoverride, and the code font.🕸️ Does this require a change to the Turbo Graph?
The changes in this PR:
🛡 What tests cover this?
Presentation only, so there are no unit tests.
turbo run build --filter @apps/petrinaut-docspasses andlint:tsccovers the component.Checked in the browser on generated and authored pages, in dev and in the production preview, at 1440px, 1024px and 375px, in light and dark. The toggle persists across a reload with no flash, drag and arrow keys resize and clamp, both controls hide at 375px where the mobile drawer still works, and no page overflows horizontally.
❓ How to test this?
turbo run dev --filter @apps/petrinaut-docs🐾 Next steps
Collapsed content width is 64rem rather than the 68rem a 1440px viewport allows, because at 68rem the column sat flush against the edge.
🤖 Generated with Claude Code