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 App Banner #4295

Merged
merged 20 commits into from Aug 16, 2016
Merged

AMP App Banner #4295

merged 20 commits into from Aug 16, 2016

Conversation

mkhatib
Copy link
Contributor

@mkhatib mkhatib commented Aug 1, 2016

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

* limitations under the License.
*/

amp-app-banner.experiment-disabled {
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@mkhatib
Copy link
Contributor Author

mkhatib commented Aug 2, 2016

Addressed comments. PTAL.

* limitations under the License.
*/

amp-app-banner.-amp-experiment-disabled {
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Dropped.

@dvoytenko
Copy link
Contributor

@mkhatib this is close to lgtm. Let's just follow up on a couple of remaining questions.

@mkhatib
Copy link
Contributor Author

mkhatib commented Aug 11, 2016

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>
Copy link
Contributor

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"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@dvoytenko
Copy link
Contributor

LGTM with a couple more requests.

@mkhatib mkhatib merged commit 0a2eaab into ampproject:master Aug 16, 2016
@mkhatib mkhatib deleted the amp-app-banner-2 branch August 16, 2016 01:52
ariangibson pushed a commit to Mixpo/amphtml that referenced this pull request Sep 7, 2016
mityaha pushed a commit to ooyala/amphtml that referenced this pull request Nov 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants