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

[collapsible] Layout shift when animated and the Panel is initially open #740

Open
mj12albert opened this issue Oct 17, 2024 · 3 comments
Open
Assignees
Labels
component: collapsible This is the name of the generic UI component, not the React module! performance

Comments

@mj12albert
Copy link
Member

mj12albert commented Oct 17, 2024

only the one using CSS transitions is consistently flagged for CLS here

https://deploy-preview-577--base-ui.netlify.app/experiments/collapsible-cls

Screenshot 2024-10-25 at 9 30 35 PM

@mj12albert mj12albert added component: collapsible This is the name of the generic UI component, not the React module! performance labels Oct 17, 2024
@mj12albert mj12albert self-assigned this Oct 17, 2024
@mj12albert
Copy link
Member Author

mj12albert commented Oct 25, 2024

testing the /components/react-menu page:

master branch vs #577, there is basically no difference

The Demo collapsible uses CSS animations and doesn't get flagged for CLS

master
Screenshot 2024-10-25 at 9 32 11 PM

after changes
Screenshot 2024-10-25 at 9 33 20 PM

@mj12albert
Copy link
Member Author

@michaldudak Do you still reproduce this on the Demo component's Collapsible? I don't get it even on master anymore, but using CSS transitions, the minimal example in experiments is quite consistent

@michaldudak
Copy link
Member

michaldudak commented Oct 28, 2024

No, it seems it somehow was fixed in the meantime. Lighthouse doesn't report layout shift problems anymore on master. There still is a layout shift when using transitions, but it's not flagged as an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: collapsible This is the name of the generic UI component, not the React module! performance
Projects
None yet
Development

No branches or pull requests

2 participants