-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[Collapsible] animate collapsible max-height property #1980
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] animate collapsible max-height property #1980
Conversation
|
👋 Thanks for opening your first pull request. A contributor should give feedback soon. If you haven’t already, please check out the contributing guidelines. |
6b84e00 to
2eb7e32
Compare
1658bfa to
9b653a5
Compare
|
another solution might be adding same overflow properties to height container |
3686ec9 to
2db23a3
Compare
2db23a3 to
e93dc4a
Compare
|
Hey @artygus, thanks for the contribution. Would you be able to add some tests for this change? |
|
@danrosenthal sure, it it'll help to get it merged |
It'll definitely be a good start! And sorry for the delay on getting you review. |
|
@ry5n, since you created the issue this addresses, would you be able to give this a tophat? You can tophat it locally by running: $ |
|
My 🎩 looks pretty good. Frame-rate is mostly around 60fps, and the jank appears to be significantly reduced. This'll likely not be perfectly smooth until we reimplement it using a CSS property that creates its own layer and uses hardware acceleration (a property like |
|
I may not be able to take a look today but I’ll do my best. If you feel satisfied this is better please go ahead and merge. |
e93dc4a to
5665556
Compare
sarahill
left a comment
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.
This looks good to me. Much smoother! Definitely an improvement. @danrosenthal or @kaelig can you give this another once over so we can get this in?
|
I'm stuck with tests, couldn't find a good example on how to test animations. Any references to good examples would certainly help 🙂 |
danrosenthal
left a comment
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.
Looking deeper at the changes, I think this one is going to be tricky (impossible) to test. Go ahead and rebase your PR to fix the UNRELEASED conflict, and @sarahill or someone else on the team can merge it for you.
height might be miscalculated due to collapsing margins
5665556 to
481096a
Compare
|
cool, rebased! |
|
🎉 Thanks for your contribution to Polaris React! |
WHY are these changes introduced?
Fixes #1133
I believe the issue is caused by collapsing margins. Height of element with
overflow: hiddenincludes margins of children, while margins of children ofoverflow: visibleelement spills through the parent and are not included in parent's height.WHAT is this pull request doing?