-
Notifications
You must be signed in to change notification settings - Fork 383
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
Allow a site to express the need to be 100% AMP #6429
Comments
See also prior discussion in google/site-kit-wp#2998 (comment):
We'll likely be revisiting this with Bento because a site would be able to serve all pages using AMP/Bento components without the need to disable AMP selectively for certain templates. When the least-restrictive sandboxing enforcement enabled (L1, #5549 (comment)) custom scripts would not be sanitized from AMP pages. So if you have custom JS on your shopping cart page, it could remain and live alongside Bento components on the same page (e.g. L2 sandboxing means only Bento components are allowed, and L3 sandboxing means only “AMP-certified” components are allowed. So instead of there being a option to opt-out of AMP for a template, it's likely that what this instead could look like is to opt-out of L3 enforcement. This would likely be a power user feature and may not even be relevant to show in the UI. The intention is that if a user has selected L1 sandboxing, but a page has no markup that would make it violate L3 sandboxing, that we'd automatically upgrade that page to be marked as a valid AMP page. The L1 sandboxing thus would break no pages out of the box. If you want to be more strict, then you'd select L2 or L3 for your site. Only in this latter more-technical case, would you potentially need to opt-out of sanitization on a per-post basis. In any case, if |
Feature description
Related to #1235 and google/site-kit-wp#2998, it looks like currently it is impossible for a third-party to really know whether the AMP plugin is truly using AMP-only, since even in Standard Mode there are ways to opt out e.g. on a per-post basis. While this makes sense to most end users of the AMP plugin, for users (arguably with enough technical knowledge) that want to be a 100% AMP-only, this results in sub-optimal UX, for example in Site Kit:
To avoid the need for the above, it should be possible to indicate somehow that the site should be 100% AMP, so that other plugins can act accordingly with their integrations - essentially some sort of "strict" Standard Mode. I see this might be more of an edge-case, so maybe this could even be a configuration only controllable via filter.
In such a strict mode, I would envision no opt-out UI being displayed anywhere, and any non-AMP compatible URLs continuing with validation errors until the user resolves them.
cc @westonruter
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation brief
QA testing instructions
Demo
Changelog entry
The text was updated successfully, but these errors were encountered: