Skip to content
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

Refine Bottom Sheets in/out transition #595

Closed
iamthomasbishop opened this issue Feb 13, 2019 · 0 comments · Fixed by #820
Closed

Refine Bottom Sheets in/out transition #595

iamthomasbishop opened this issue Feb 13, 2019 · 0 comments · Fixed by #820
Assignees
Labels
[Type] Enhancement Improves a current area of the editor
Milestone

Comments

@iamthomasbishop
Copy link
Contributor

The transitions when the bottom sheet come in and go out are a little slow. Let's refine to use some custom curves:

In

transition: all 600ms cubic-bezier(0.450, 0.000, 0.160, 1.020);

screen shot 2019-02-13 at 1 28 46 pm

Out

Same curve, but quicker:

transition: all 250ms cubic-bezier(0.450, 0.000, 0.160, 1.020);

Demo

Altogether it looks like this:

sheet motion

@iamthomasbishop iamthomasbishop added the [Type] Enhancement Improves a current area of the editor label Feb 13, 2019
@iamthomasbishop iamthomasbishop added this to the Beta milestone Feb 13, 2019
koke added a commit to WordPress/gutenberg that referenced this issue Apr 4, 2019
As specified in wordpress-mobile/gutenberg-mobile#595
I did my best to adjust to the specs there, and for the most part the animations
matches what was requested.

One limitation is that due to how react-native-modal is implemented, we don't
know the view's height when it's about to be presented, and so it starts the
"slide in" animation not from the bottom edge, but from a lower point, since it
uses the window height to displace the view and not the view's height. The
result is an animation that appears slower than specified, since the view has
to traverse a longer distance in the same time, and there is a delay before the
view starts appearing.

This is mildly annoying, but I could not find a way to make it work without
rewriting react-native-modal.
koke added a commit to WordPress/gutenberg that referenced this issue Apr 16, 2019
As specified in wordpress-mobile/gutenberg-mobile#595
I did my best to adjust to the specs there, and for the most part the animations
matches what was requested.

One limitation is that due to how react-native-modal is implemented, we don't
know the view's height when it's about to be presented, and so it starts the
"slide in" animation not from the bottom edge, but from a lower point, since it
uses the window height to displace the view and not the view's height. The
result is an animation that appears slower than specified, since the view has
to traverse a longer distance in the same time, and there is a delay before the
view starts appearing.

This is mildly annoying, but I could not find a way to make it work without
rewriting react-native-modal.
@koke koke closed this as completed in #820 Apr 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Enhancement Improves a current area of the editor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants