Skip to content
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

Prevent Layout From Jumping Around When Placeholders are replaced #1504

Closed
fulminmaxi opened this issue Oct 6, 2020 · 1 comment
Closed
Assignees

Comments

@fulminmaxi
Copy link
Contributor

No description provided.

@fulminmaxi fulminmaxi self-assigned this Oct 6, 2020
@fulminmaxi fulminmaxi added atlas estimate-6h Time estimation for issues in a project - 6h labels Oct 6, 2020
@kdembler
Copy link
Collaborator

kdembler commented Nov 9, 2020

Originally, this was a simple fix - layout jumps were happening because the height of the placeholder was slightly lower than the height of some loaded video previews so a carousel would gain height once loading finishes.

However, later on, an additional issue arose that can be described as the same behavior - the Carousel component fails to properly fit elements once the loading is finished. The error is visible only for a fraction of a second, and then it works okay. It seems as if the gliderjs tries to fit all the newly loaded elements into the old width of carousel (the sum of widths of the placeholders) so the widths can appear squeezed. This will need some further investigation.

The current remedy is min-width: ${MAX_VIDEO_PREVIEW_WIDTH}; set for video previews in VideoGallery.tsx - thanks to that the change in width is minimal and the layout jump isn't as noticeable. After this issue is solved, the specified line of CSS should be removed.

Screenshot 2020-11-09 at 12 32 00 PM

@kdembler kdembler added estimate-2h and removed estimate-6h Time estimation for issues in a project - 6h labels Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants