-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[website] Improve pricing page tree view animation #44490
[website] Improve pricing page tree view animation #44490
Conversation
Netlify deploy previewhttps://deploy-preview-44490--material-ui.netlify.app/ Bundle size report |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that the open/close interaction could be quicker, so I’m all for it!
That said, I’d suggest adding a bit more easing to the animation, specially while opening—is that possible? Keeping the same duration would work, but maybe we could add an ease-in-and-out effect.
@zanivan This animation uses the default easing:
So it's the standard easing https://m1.material.io/motion/duration-easing.html#duration-easing-natural-easing-curves. By "a bit more easing", do you mean the animation duration should be slower? I'm not sure to get your point. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oliviertassinari, I was suggesting we try the easeInOut
, but it turns out that’s already the one we’re using. I did think it could be a bit slower, but we should go ahead and merge this—after testing the pricing table a few times while adding the Enterprise plan, the current slowness gets really annoying 😅
@zanivan I feel like the challenge is to find the right function that returns the animation duration based on the height. We could hardcode the duration for each collapse, but I'm worried that this will get broken anytime we change the number of rows, it's so easy to overlook. |
Go to https://mui.com/pricing/ and open the tree view:
I got frustrated with the speed of opening. This feels like a bug introduced in #43466.
The fix is to rely on https://m1.material.io/motion/duration-easing.html#duration-easing-dynamic-durations.
A side note, the performance of this interaction is not production compatible, it takes 100ms to start the animation on a high-end laptop, too slow.
👉 https://deploy-preview-44490--material-ui.netlify.app/pricing/