-
Notifications
You must be signed in to change notification settings - Fork 125
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
feat: add exit animation to mobile dialog drawer #1108
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iykazrji
requested review from
moldy530,
rthomare,
dancoombs,
mokok123 and
dphilipson
as code owners
October 26, 2024 03:42
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
moldy530
reviewed
Oct 29, 2024
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.
looks good, but can we avoid using the 3rd party library?
using the viewTransition
api directly might be overkill. Can we instead either,
- remove the
isOpen ? ...
piece, always render the portal, and just selectively add the slide up or down animation based on the isOpen property - useEffect triggered by changes on the on
isOpen
. This will in turn programmatically start the animation (up or down). If the animation is down, then on animation finished, remove the portal if we don't want it always rendered. Probs would need some internalshow
state as well here to handle this.
moldy530
reviewed
Oct 31, 2024
moldy530
reviewed
Nov 4, 2024
moldy530
approved these changes
Nov 11, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Checklist
yarn test
)site
folder, and guidelines for updating/adding docs can be found in the contribution guide)feat!: breaking change
)yarn lint:check
) and fix any issues? (yarn lint:write
)Screenshots
Before:
https://www.loom.com/share/df896258fff140468e6b809e343efbb7?sid=7120c059-5567-49aa-a4fc-9ecf4052de68
After:
https://www.loom.com/share/81015edf28384c5aad5edd3137ea271b?sid=58f49f6a-b930-4a55-8f23-ddd97f08a3ae
PR-Codex overview
This PR enhances the animation capabilities of the
Dialog
component in theaccount-kit/react
project by adding new animations and improving the rendering logic for the dialog's portal.Detailed summary
fade-out
andslide-down
animations to the Tailwind CSS configuration.useLayoutEffect
to manage the rendering of the dialog portal based on its open state.useRef
for the dialog card reference.