-
-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Layout shift with latest version while pre-rendered on the server side #240
Comments
Seeing the same issue as well. |
I'm also facing same issue in Nextjs. Please fix this |
This is a free library. If you’re offering to pay for a fix, then we can talk about a timeline/urgency. Otherwise, I’ll get to it when I get to it. :) |
It goes without saying, but still needs saying, thank you for the effort @bvaughn |
Thanks senadir.
|
Panels should fall back to `defaultSize` on initial render. Fixes #240
This issue has been fixed in 1.0.5. Happy holidays. ❤️ → ☕ givebrian.coffee |
Hey @bvaughn, thanks for the fix, unfortunately I still have the layout shifts with the latest version 1.0.5. I have updated the codesandbox link to reproduce the behavior. Merry christmas! |
There was a layout shift for me the first time I loaded that page, but not after that. Resizing and reloading after the first load works fine. I assume maybe you didn't initialize things to the same default on the server and client? |
I have, as you can see in my codesandbox link the layout is stored in a cookie which is read and passed to the client component. I just looked at your PR, shouldn't it actually be
|
No, |
here is a video that shows the behavior I see with the latest version output.mp4I have a separate, local test Harness using Next.js that confirms the same behavior. |
So you're reporting a different behavior than originally. Slight layout shift? |
Not sure what to say. Using this Sandbox here is what I'm seeing: Kapture.2023-12-24.at.17.46.22.mp4 |
okay, it must be my chrome, I can't reproduce the behavior in edge and firefox either. I also tried it in chrome in incognito mode, there I have the same problem. (I apologize for the inconvenience!) I would like to buy you 2 coffees, but I don't have a credit card. are you on another platform where you can pay with paypal? |
That’s pretty interesting. I wonder if it has something to do with an extension you have installed or something? Thats very kind of you to offer. <3 uh…I’m on Venmo and Messenger (Pay) I guess 😅 if you really wanted you could email me and I’ll link you, but dont feel like to have to. |
I can confirm the issue was fixed on my side, FWIW I saw this issue when using the component from shadcn/ui lib. |
I am having an issue with the component from the shadcn/ui lib.. Did you find a fix by chance? |
In the latest version (1.0.4) you can see a layout shift when the panes are pre-rendered on the server side. With version 0.0.54 (which is also used in the example repository) there is no layout shift.
This example uses the latest version, here you can see the layout shift:
https://codesandbox.io/p/devbox/infallible-bird-forked-y8w6sl?file=%2Fpackage.json%3A21%2C1-22%2C1
This examples uses 0.0.55, there is no layout shift:
https://codesandbox.io/p/devbox/infallible-bird-q9cmdq?file=%2Fpackage.json%3A21%2C1-22%2C1
The text was updated successfully, but these errors were encountered: