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

Subscriptions: fixing examples #15129

Merged
merged 6 commits into from May 8, 2018
Merged

Conversation

prateekbh
Copy link
Member

  • Fix amp example
  • Whitelist subscription attributes
  • Execute action from amp-subscriptions-google

subscriptions-action="login"
subscriptions-service="subscribe.google.com"
subscriptions-decorate>Login</div>
<div subscriptions-action="login" subscriptions-display="NOT loggedIn">Login</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

NOT loggedIn is now wrong too, right? Shouldn't it be NOT data.loggedIn?

Copy link
Member Author

Choose a reason for hiding this comment

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

yep

@@ -339,6 +334,10 @@ <h1 itemprop="headline">Lorem Ipsum</h1>
</template>
<template type="amp-mustache" subscriptions-dialog subscriptions-display="NOT loggedIn">
<div>Dialog for non logged in users<div>
<div subscriptions-display="NOT loggedIn"
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

@@ -131,6 +131,8 @@ const WHITELISTED_ATTRS = [
'subscriptions-actions',
'subscriptions-section',
'subscriptions-display',
'subscriptions-service',
'subscriptions-decorate',
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you already put subscrpitions-decorate into validator?

Copy link
Member Author

Choose a reason for hiding this comment

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

done now

Copy link
Contributor

@dvoytenko dvoytenko left a comment

Choose a reason for hiding this comment

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

LGTM with one request

subscriptions-action="subscribe"
subscriptions-service="subscribe.google.com"
subscriptions-decorate>Login</div>
<div subscriptions-display="NOT grantReason">btw u are not subscribed</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's do grantReason != "SUBSCRIBED" (SUBSCRIBER, whichever is the latest on this.)

Copy link
Member Author

Choose a reason for hiding this comment

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

reverted this and loggedIn change as that stuff is in PR #15059

@prateekbh prateekbh merged commit ff88a58 into ampproject:master May 8, 2018
@prateekbh prateekbh deleted the fix-examples branch May 8, 2018 01:08
noranazmy pushed a commit to noranazmy/amphtml that referenced this pull request May 10, 2018
* fixing examples

* fixing types

* fixing types

* adding in validatior

* reverting data changes in example
honeybadgerdontcare added a commit that referenced this pull request May 10, 2018
* Revision bump for #14969

* Revision bump for #14937

* Simplify the script tag error.

* Whitelist pro.fontawesome.com in the AMP font list.

* Error category remapping

* Revision bump for #15106

* Revision bump for #15129

* Revision bump for #15155/15164/15191/15187
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.

None yet

3 participants