generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 197
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Browser
Chrome
Package version
v3.0.1086
React version
v19.1.1
Description
When rendering a Cloudscape layout with SSR, the page initially renders with mobile styles, then updates with styles appropriate to the viewport size when it's hydrated with JavaScript. That's due to responsive design being implemented with the useBreakpoints
and useContainerQuery
hooks in JavaScript instead of CSS.
Affected layout components include:
TopNavigation
(I've submitted a patch: fix: Implement TopNavigation breakpoints in CSS #3371)AppLayout
andAppLayoutToolbar
, specifically thebreadcrumbs
slot (even ifBreadcrumbGroup
isn't used)SideNavigation
With all targeted browsers now supporting container queries in CSS, we should be able to use CSS instead of JS consistently for these styles. Doing so would fix these visual glitches and also likely improve performance.
Source code
https://github.com/TrevorBurnham/cloudscape-ssr-example
Reproduction
https://codesandbox.io/p/github/TrevorBurnham/cloudscape-ssr-example/main?import=true
Code of Conduct
- I agree to follow this project's Code of Conduct
- I checked the current issues for duplicate problems
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working