Stories default animations curves and duration.#21446
Merged
gmajoulet merged 2 commits intoampproject:masterfrom Mar 18, 2019
Merged
Stories default animations curves and duration.#21446gmajoulet merged 2 commits intoampproject:masterfrom
gmajoulet merged 2 commits intoampproject:masterfrom
Conversation
newmuis
approved these changes
Mar 16, 2019
|
|
||
| /** @private @const */ | ||
| this.easing_ = animationDef.easing || this.presetDef_.easing || | ||
| 'cubic-bezier(0.4, 0.0, 0.2, 1)'; |
Contributor
There was a problem hiding this comment.
nit: move the cubic-bezier(0.4, 0.0, 0.2, 1) to a constant (DEFAULT_EASING?)
Enriqe
approved these changes
Mar 18, 2019
| duration: 500, | ||
| easing: 'ease-out', | ||
| duration: 400, | ||
| easing: 'cubic-bezier(0.0, 0.0, 0.2, 1)', |
Contributor
There was a problem hiding this comment.
Should we also add these to pan-up/down/.. & zoom-in/out ? I heard there was a request to do this. Up to you!
Contributor
Author
There was a problem hiding this comment.
Publishers will be able to override these curves once we enable the validation, I believe the default 1000ms linear animation is nice for most Ken Burns like effects :)
Do you have more context on this? I wouldn't want to break existing implementations by completely changing the curve.
Contributor
|
Will the validation for the new attribute come in a new PR? Up to you |
bfe3250 to
a139d5b
Compare
noranazmy
pushed a commit
to noranazmy/amphtml
that referenced
this pull request
Mar 22, 2019
* Default animation curves + duration. * Extracting the default fallback easing into a constant.
bramanudom
pushed a commit
to bramanudom/amphtml
that referenced
this pull request
Mar 22, 2019
* Default animation curves + duration. * Extracting the default fallback easing into a constant.
swissspidy
added a commit
to ampproject/amp-wp
that referenced
this pull request
Aug 27, 2019
swissspidy
added a commit
to ampproject/amp-wp
that referenced
this pull request
Aug 28, 2019
This file contains hidden or 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
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.
Updating the default stories animations curves and duration so they respect the material guidelines.
Animations are actually still slower than what's recommended but I don't want to introduce too big of a change.
Publishers could already override the animation duration, but this PR also introduces a way to provide their own timing function: