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

♻️✨ amp-fx=float-in-(top|bottom) #20905

Merged
merged 32 commits into from
Feb 26, 2019

Conversation

alanorozco
Copy link
Member

@alanorozco alanorozco commented Feb 18, 2019

Partial for #20881.

Base implementation for amp-fx="float-in-(top|bottom)". Slides elements in-and-out accordingly. Matches behavior of Google viewer's sliding header, see go/amp-viewer-scroll and go/amp-viewer-scroll-thresholds internally.

Demo: https://scroll-toggle.glitch.me/

Also:

  • refactors amp-fx-collection for types and size. (~10% down from total bundle)
  • adds a bunch of string → types tests (and killed a splice bug, thanks @amphtml-lgtm-bot!)

Work after this change

  • Support responsive layouts with optional behavior by media attribute.
  • Respond to viewer's toggle message to short-circuit duplicate behavior.

Copy link
Contributor

@honeybadgerdontcare honeybadgerdontcare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

validation looks good

Copy link
Contributor

@cvializ cvializ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

extensions/amp-scroll-toggle/0.1/amp-scroll-toggle.js Outdated Show resolved Hide resolved
@alanorozco alanorozco changed the title ✨amp-scroll-toggle ✨ amp-fx=float-in-(top|bottom) Feb 20, 2019
@alanorozco
Copy link
Member Author

@aghassemi @cvializ @honeybadgerdontcare Moved to amp-fx-collection. PTAL.

*/
export class FxProvider {
Copy link
Member Author

@alanorozco alanorozco Feb 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cvializ @aghassemi This class was akin to a simple function and was only keeping memory alive, simplified.

@ampproject ampproject deleted a comment Feb 26, 2019
@alanorozco alanorozco changed the title ✨ amp-fx=float-in-(top|bottom) ♻️✨ amp-fx=float-in-(top|bottom) Feb 26, 2019
@ghost
Copy link

ghost commented Feb 26, 2019

This pull request fixes 1 alert when merging b764f2d into c33eb82 - view on LGTM.com

fixed alerts:

  • 1 for Loop iteration skipped due to shifting

Comment posted by LGTM.com

@ghost
Copy link

ghost commented Feb 26, 2019

This pull request fixes 1 alert when merging 82afebd into ee8daa8 - view on LGTM.com

fixed alerts:

  • 1 for Loop iteration skipped due to shifting

Comment posted by LGTM.com

@alanorozco alanorozco merged commit 444fc38 into ampproject:master Feb 26, 2019
@alanorozco alanorozco deleted the scroll-toggle branch February 26, 2019 06:43
Gregable added a commit that referenced this pull request Feb 27, 2019
* cl/234896906 Revision bump for #20969

* cl/235090073 Allow i-amphtml-layout on AMP elements only for Transformed AMP

* cl/235216325 Disallow document properties in <form> attribute name.

* cl/235271919 Revision bump for #20989

* cl/235833553 Revision bump for #20928

* cl/235843207 Revision bump for #20905
alanorozco added a commit that referenced this pull request Mar 8, 2019
Mea culpa. Fixes #21332 introduced by #20905.

Will introduce tests in a later PR so this won't happen again.
jridgewell pushed a commit that referenced this pull request Mar 12, 2019
Mea culpa. Fixes #21332 introduced by #20905.

Will introduce tests in a later PR so this won't happen again.
jridgewell pushed a commit that referenced this pull request Mar 14, 2019
Mea culpa. Fixes #21332 introduced by #20905.

Will introduce tests in a later PR so this won't happen again.
noranazmy pushed a commit to noranazmy/amphtml that referenced this pull request Mar 22, 2019
Partial for ampproject#20881.

Base implementation for `amp-fx="float-in-(top|bottom)"`. Slides elements in-and-out accordingly. Matches behavior of Google viewer's sliding header, see http://go/amp-viewer-scroll and http://go/amp-viewer-scroll-thresholds internally.

Demo: https://scroll-toggle.glitch.me/

Also:

* refactors `amp-fx-collection` for types and size. (~10% down from total bundle)
* adds a bunch of string → types tests (and killed a splice bug, thanks @amphtml-lgtm-bot!)
noranazmy pushed a commit to noranazmy/amphtml that referenced this pull request Mar 22, 2019
* cl/234896906 Revision bump for ampproject#20969

* cl/235090073 Allow i-amphtml-layout on AMP elements only for Transformed AMP

* cl/235216325 Disallow document properties in <form> attribute name.

* cl/235271919 Revision bump for ampproject#20989

* cl/235833553 Revision bump for ampproject#20928

* cl/235843207 Revision bump for ampproject#20905
noranazmy pushed a commit to noranazmy/amphtml that referenced this pull request Mar 22, 2019
Mea culpa. Fixes ampproject#21332 introduced by ampproject#20905.

Will introduce tests in a later PR so this won't happen again.
bramanudom pushed a commit to bramanudom/amphtml that referenced this pull request Mar 22, 2019
Partial for ampproject#20881.

Base implementation for `amp-fx="float-in-(top|bottom)"`. Slides elements in-and-out accordingly. Matches behavior of Google viewer's sliding header, see http://go/amp-viewer-scroll and http://go/amp-viewer-scroll-thresholds internally.

Demo: https://scroll-toggle.glitch.me/

Also:

* refactors `amp-fx-collection` for types and size. (~10% down from total bundle)
* adds a bunch of string → types tests (and killed a splice bug, thanks @amphtml-lgtm-bot!)
bramanudom pushed a commit to bramanudom/amphtml that referenced this pull request Mar 22, 2019
* cl/234896906 Revision bump for ampproject#20969

* cl/235090073 Allow i-amphtml-layout on AMP elements only for Transformed AMP

* cl/235216325 Disallow document properties in <form> attribute name.

* cl/235271919 Revision bump for ampproject#20989

* cl/235833553 Revision bump for ampproject#20928

* cl/235843207 Revision bump for ampproject#20905
bramanudom pushed a commit to bramanudom/amphtml that referenced this pull request Mar 22, 2019
Mea culpa. Fixes ampproject#21332 introduced by ampproject#20905.

Will introduce tests in a later PR so this won't happen again.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants