Title: fix(docs): stop the sidebar drifting when page content resizes by waleedlatif1 · Pull Request #6301 · simstudioai/sim · GitHub
Open Graph Title: fix(docs): stop the sidebar drifting when page content resizes by waleedlatif1 · Pull Request #6301 · simstudioai/sim
X Title: fix(docs): stop the sidebar drifting when page content resizes by waleedlatif1 · Pull Request #6301 · simstudioai/sim
Description: Summary The docs sidebar visibly jumped whenever page content resized — expanding an FAQ row moved it 16.8px at a fixed scroll position, collapsing moved it back. Root cause: the sidebar used fumadocs' sticky positioning, and a sticky box is bottom-limited by its containing block. #nd-docs-layout ends ~660px above the document bottom because the site footer is a sibling of the layout, not a grid child. So across the entire footer the sidebar was pushed progressively upward, and any content-height change while the reader was in that zone moved it. Fix: pin the sidebar and its divider to the viewport. A fixed box ignores both the container's end and the document height, so neither the drift nor the jump can occur. Why this is safe The grid columns are explicit (0px 300px 1fr 268px 0px), so taking the placeholder out of flow leaves its track intact — the content column does not move. left/width are restated because a fixed box no longer derives them from its grid cell; top/height still come from fumadocs' own utility classes. The footer was already opaque (bg-[var(--bg)]) and now out-stacks the sidebar (z-20) and divider (z-21) at z-22, so it slides over them at the end of the page. Desktop-only (min-width: 1024px) — mobile is untouched. Testing Measured with Playwright, before and after: before after sidebar shift on FAQ expand +16.8px 0px sidebar shift on collapse −16.8px 0px content column left / width — unchanged (0 delta) sidebar top at page bottom 75.2 → drifting 92px, held Interaction regression suite, all passing: sidebar link navigates, sidebar folder expands, content link clickable (the naive position: fixed attempt broke this — a full-width fixed aside intercepted every click), FAQ toggles, ToC link clickable, language selector still hidden. Verified top: 92px holds at the page bottom on the docs, API-reference, academy and integrations layouts, with zero page errors. Screenshots checked in light and dark at top/middle/bottom, plus mobile. Production build passes (4,281 static pages), typecheck and biome clean. Type of Change Bug fix Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)
Open Graph Description: Summary The docs sidebar visibly jumped whenever page content resized — expanding an FAQ row moved it 16.8px at a fixed scroll position, collapsing moved it back. Root cause: the sidebar used fuma...
X Description: Summary The docs sidebar visibly jumped whenever page content resized — expanding an FAQ row moved it 16.8px at a fixed scroll position, collapsing moved it back. Root cause: the sidebar used fuma...
Opengraph URL: https://github.com/simstudioai/sim/pull/6301
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:6b28bf2f-08f8-d5f3-e19b-2f96dd41cae0 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C9D4:2C34A2:118F94:18A7F2:6AFB4C83 |
| html-safe-nonce | aabd9da91e704be3cd8583024816d9e6ccafdde91c396b9ded918e43cfe46852 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOUQ0OjJDMzRBMjoxMThGOTQ6MThBN0YyOjZBRkI0QzgzIiwidmlzaXRvcl9pZCI6Ijc5NTQxODQ3MDg0ODMxNDA3MzkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 89bf2a842337df44c23a93a2daa76fa8e9da1178798f85cabb1b7d66fbc3c008 |
| hovercard-subject-tag | pull_request:4216565501 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/6301/files |
| twitter:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| og:image:alt | Summary The docs sidebar visibly jumped whenever page content resized — expanding an FAQ row moved it 16.8px at a fixed scroll position, collapsing moved it back. Root cause: the sidebar used fuma... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | acf7616d06cc051644705b379878c9bb13dc5e70ecf4ffd9b34140f8ac01d7e1 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 26504db649b58525278f77a52b80ba5f10d5f4de |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width