Responsive grid layout: fixed TopBar/Sidebar with document scroll#3178
Responsive grid layout: fixed TopBar/Sidebar with document scroll#3178david-crespo merged 16 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
90eb34e to
d22f1fe
Compare
Switch from a CSS grid layout (where TopBar and Sidebar occupied grid cells alongside ContentPane) to fixed-position TopBar and Sidebar with document-level scroll. This is the foundation for mobile/tablet support. Key changes: - viewport meta tag: proper responsive instead of fixed 1050px - CSS: add --sidebar-width var, responsive --content-gutter, remove body overflow-y-hidden, set html/body/#root height: 100% - TopBar: single fixed element (was two grid cell fragments) - Sidebar: fixed position with overflow scroll - ContentPane: margin-left for sidebar on desktop, document scroll - Scroll restoration: window.scrollY instead of container scrollTop - PageSkeleton: match new fixed layout structure Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
85918cc to
ecf1870
Compare
| * different points in the history stack will not share the same scroll position. | ||
| */ | ||
| export function useScrollRestoration(container: React.RefObject<HTMLElement | null>) { | ||
| export function useScrollRestoration() { |
There was a problem hiding this comment.
Do we even need this hook now? Since we're using a regular window scroll, perhaps we can use the built-in react-router one.
There was a problem hiding this comment.
Similar to #2450 if I remove it I was unable to get react-router ScrollRestoration to work
| import { classed } from '~/util/classed' | ||
|
|
||
| export const PageContainer = classed.div`grid h-screen grid-cols-[14.25rem_1fr] grid-rows-[var(--top-bar-height)_1fr]` | ||
| export const PageContainer = classed.div`min-h-full pt-(--top-bar-height)` |
There was a problem hiding this comment.
Top bar is fixed, this leaves space for it. Alternatively we use sticky for the top bar but the sidebar would still be fixed and this feels marginally cleaner.
|
PR is visually identical to main with expanded visual regression tests. Haven't figured out an easy way to test it scrolled since the baseline would require a different scroll pattern to this new PR. I'd suggest we err on merging sooner so it can be tested for longer. |
|
4d4e03f fixes the side modal scroll bar thing by turning on In base-ui, this covers it and the Lines 54 to 61 in f25398d
In order to make this work I also added a scrim for the modal on top of a side modal situation with a special z-index that makes sure it's between the modal and the side modal and blocks interaction with the side modal. Right now on main you can interact with the image upload side modal while the main upload modal is going. |
|
I have fixes for the e2e failures but I want to merge #3192 into main and main into this first because it affects at least one of them. |
Found this while working on #3178. Instance resize, attach floating IP, and attach ephemeral IP all had `onError`s that triggered toasts on server error. The first two also displayed the error in the modal. Ephemeral IP did not. This PR gets rid of the toasts and puts an error display into attach ephemeral IP. It doesn't look very good (maybe we should move the error and give it a little box or something), but it's basically the same as it already was, minus the extra toasts. (Screenshot is from playwright, hence the weird missing submit button — I think it's right in the middle of switching between the button text and the loading spinner.) <img width="930" height="528" alt="Screenshot 2026-04-21 at 5 20 23 PM" src="https://github.com/user-attachments/assets/0c6db6a6-913f-40aa-8ccc-245be9dfc1d0" />
ecbc9e6 to
9881dd5
Compare

Refactor of #2087
Switch from a CSS grid layout (where TopBar and Sidebar occupied grid cells alongside ContentPane) to fixed-position TopBar and Sidebar with document-level scrolling. This is the foundation for mobile/tablet support and likely the place that has the potential to cause the most issues so I'm separating the two.
This PR should produce a console that is visually identical to the current one.
Broader responsive changes will come in another PR, and are not a blocker for this.
Todo