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 service public method to render the dialog with the current entitlement. #19053

Merged
merged 1 commit into from Oct 31, 2018

Conversation

gmajoulet
Copy link
Contributor

To support the amp-story integration of amp-subscriptions, we need to be able to control what is displayed in the dialog, and when. amp-story has a soft (notification) paywall, and a hard (navigation blocking) paywall.
Soft: only visible on the cover page, can be dismissed, used for metering
Hard: only visible when trying to navigate to a protected page, used to login/subscribe

To support this, amp-story needs an additional method that re-renders the dialog, using the current entitlement, based on the subscriptions-dialog templates available in the DOM.

This method:

  • Doesn’t send extra analytics events
  • Uses cached entitlements to avoid extra unnecessary queries
  • Doesn’t override viewer provided auth, or platform configuration (ie: alwaysGrant), so it does work with all the integrations

Copy link
Contributor

@newmuis newmuis left a comment

Choose a reason for hiding this comment

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

Thanks @gmajoulet!

@gmajoulet gmajoulet merged commit 3a29c54 into ampproject:master Oct 31, 2018
jpettitt added a commit that referenced this pull request Oct 31, 2018
… the current entitlements. (#19053)"

This reverts commit 3a29c54.
Enriqe pushed a commit to Enriqe/amphtml that referenced this pull request Nov 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants