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 App Banner #4295
AMP App Banner #4295
Conversation
* limitations under the License. | ||
*/ | ||
|
||
amp-app-banner.experiment-disabled { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has to be -amp-experiment-disabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Addressed comments. PTAL. |
* limitations under the License. | ||
*/ | ||
|
||
amp-app-banner.-amp-experiment-disabled { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need this class now that we switched to layout=nodisplay
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dropped.
@mkhatib this is close to lgtm. Let's just follow up on a couple of remaining questions. |
Addressed comments. PTAL 👀 |
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript> | ||
<script async src="https://cdn.ampproject.org/v0.js"></script> | ||
<meta name="apple-itunes-app" content="app-id=828256236, app-argument=medium://p/cb7f223fad86"> | ||
<link rel="amp-manifest" href="manifest.json"> | ||
<script async src="./viewer-integr.js"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One tiny thing here, this script should have the following attribute:
data-amp-report-test="viewer-integr.js"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
LGTM with a couple more requests. |
78ecc52
to
752e759
Compare
Demo: Open Viewer example here and select the 2nd tab - open on iOS or Android devices on different browsers. (I haven't tested this on Android yet, but will do while this in review).
Another stab at AMP App Banner (earlier PR in which this is largely based on #3447 though refactored). This is following discussions with @ericlindley-g and @cramforce around focusing on the dismissible banner use-case and handle the inline-banner or deep-links later on (possibly with other extensions).
This use the storage API similar to
amp-user-notification
to store a boolean whether this is dismissed or not. @dvoytenko Please advice if this needs a privacy review from someone.I've tried to split the two platforms into two separate classes to avoid a lot of if-else if-else clauses to in every callback, and relied on the new
upgradeCallback
to select the appropriate class based on the platform.ITI: #800