Styling on animated modal transition (Office hours: 9/24/2020) #790
-
The specific questions I have are around a POC I have for animated modal view.
Background: Follow up on Discussion 639 around a replacement for the animated modal view wrapper from our legacy Thank you! 🙌 |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
Hi @andipants12 For the overall style of the transition we'd recommend trying to follow the current slide animation that mimics the directionality of next and back. Some things to consider:
Most Importantly you must manage user focus between states. As you transition between the forms react-spring is trashing the DOM and the user is losing focus. As the DOM the user was current focused on disappeared the browser tries to get close, but mostly gives up and starts curser at the beginning of the available DOM. Ideally as the animation finishes you should be placing focus inside the first new input that is visible. As for the second part, the differences, I'm not aware of any but I'm also not familiar with react-spring right now. If the current version of react-spring has changed it's API to the version we're wrapping, that might be the cause. But you might need to give full details to help us understand what differences you are seeing. I'm probably not going to be a lot of help on that one though. |
Beta Was this translation helpful? Give feedback.
-
Hi @andipants12 +1 to all of Simons comments above. Not sure if this will be helpful since its written with CSS, but I found a react-spring example of the scrolling effect you might be going for: https://codesandbox.io/embed/1y3yyqpq7q You may be able to use that and translate it using Paste. |
Beta Was this translation helpful? Give feedback.
-
@richbachman @SiTaggart Thank you both! 👏 I think this gives me a really good jumping off point and I'd like to take my name off of the sign up sheet for today in favor of another question that someone needs reviewed. Is that possible? I'll follow up in Slack since this is a bit time sensitive. |
Beta Was this translation helpful? Give feedback.
-
Okey @richbachman and @SiTaggart I took your feedback and iterated a bit. I also dug a bit more into the API differences between I spent some time testing it again last night, and alas, was not able to get the slide transition to work, correctly mapping over the array by index and animating correctly. |
Beta Was this translation helpful? Give feedback.
Hi @andipants12
For the overall style of the transition we'd recommend trying to follow the current slide animation that mimics the directionality of next and back. Some things to consider: