precedent icon indicating copy to clipboard operation
precedent copied to clipboard

Fixed the phone screen leaflet exit animation

Open azaek opened this issue 2 years ago • 9 comments

Exit animation weren't working properly due to 2 AnimatePresence wrap

azaek avatar Jan 19 '23 15:01 azaek

@azaek is attempting to deploy a commit to the Elegance Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Jan 19 '23 15:01 vercel[bot]

Thanks for the PR! Just checking this out – it seems like it's still not working?

https://user-images.githubusercontent.com/28986134/213510905-c8e824f8-47aa-48d5-9e84-72f70e17ba90.mp4

steven-tey avatar Jan 19 '23 17:01 steven-tey

Weird I have literally the same code in another project and it works 😶. I'm gonna look more

azaek avatar Jan 19 '23 20:01 azaek

https://user-images.githubusercontent.com/92246587/213555906-abc13005-90ff-4df8-82d3-116eee63970c.mp4

image

azaek avatar Jan 19 '23 20:01 azaek

Update on the issue: AnimatePresence doesn't trigger the exit animation if the dialog components are used from hooks. If you use the base dialog component without it works fine.

azaek avatar Mar 11 '23 14:03 azaek

@azaek whoa interesting! So in this case you can't use the Leaflet component from within a hook? Sounds kinda odd – would it be a bug on Framer Motion's side?

steven-tey avatar Mar 14 '23 03:03 steven-tey

Yea it's very odd. I guess it's from Framer Motion's side, I raised a bug issue there. Let's see

azaek avatar Mar 14 '23 08:03 azaek

Awesome, thank you so much @azaek! Can you link to the issue here?

steven-tey avatar Mar 14 '23 14:03 steven-tey

Sure, https://github.com/framer/motion/issues/2009

azaek avatar Mar 14 '23 15:03 azaek