-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Improve disclosure collapse animation #1704
Conversation
Thanks, this is pretty subjective but I've always understood that having more than one animation together creates a more pleasing effect so I've added back the fade. LMK your thoughts. 1704.mov |
Did you disable pushing to the PR? |
Hmmm I definitely prefer it without the opacity change personally, but as you said it can be quite subjective. I typically don't see these type of sliding/collapsing animations combined with an opacity transition.
I typically do, yeah, to encourage discussions/suggestions before changes are made and pushed. But I'll turn it back on if it's the norm in this repo. |
The thing for me is the group doesnt collapse into a smaller element, it collapses into nothing, so IMHO it looks kinda odd to just slide up to 0px, the fade makes that a bit more graceful. |
Again, I have to really disagree personally. Typically, collapsible sections that collapse into the header don't also fade—it defeats the purpose of the collapsing animation imo. Examples:
|
@benphelps whatever you think here |
I prefer the opacity fade version myself, but after looking through some more resources on my own, it does seem like the overwhelming consensus is to not fade. |
9fcd339
to
9828414
Compare
9828414
to
2d1aed4
Compare
I considered suggesting the addition of a new configuration option for type of collapse animation but I think that might be overkill. For now, I'm going to go look through some discussions and see how else I might contribute. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns. |
Proposed change
Improves the new collapse feature with a more modern drawer slide animation. It also allows the document to transition the layout of elements at the same time. This results in a much less jarring collapse than before where suddenly the page would shift after the animation completed. This was especially apparent for larger sections.
Please see a demo video blow
GTP06Y7sDA.mp4
This change was tested and works as expected for both mobile and desktop, but I don't have a mobile recording. Others can test on mobile or desktop currently on my personal
homepage
instance if they want. (URL upon request as I don't want to appear to self-promote)Closes # (issue)
Type of change
Minor improvement to a recently introduced feature.
Checklist:
pnpm lint
.