-
Notifications
You must be signed in to change notification settings - Fork 381
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 Developer Tools to be turned off to minimize (even hide) validation error info #2673
Comments
I'd love to see this brilliant feature, combined with a way to run AMP validation async #2069. |
See also this extension to the AMP plugin: https://gist.github.com/westonruter/31ac0e056b8b1278c98f8a9f548fcc1a
|
On a related note, I think the “Enable AMP” checkbox should be only presented to administrator users. Instead of non-admin authors seeing AMP validation errors and just going straight to disabling AMP for the post, they should instead be directed to contact the administrator to get advice on the issue and then the administrator can decide whether to disable AMP for the post. |
Related: #4593 |
Furthermore, the “Enable AMP” checkbox should be gated behind whether developer tools are enabled, not just whether the user is an administrator. For more on this, see #1864 (comment). |
The mechanism for disabling dev tools is being explored in #4644, with the code likely being split out from that prototype branch. |
Something else to consider is allowing users who have dev-tools turned off to still access the validated URL screen but in read-only mode. |
Upon thinking about this further, I think we should indeed restrict dev tools to just the users who can
The degree (and design) to which validation error messages are minimized is to be determined. To start with we could just hide them altogether, and then at a later point we could re-introduce them in a discrete way. When the validation errors are hidden, then it would be up to surfacing validation errors via Site Health. See #1756 (comment). |
Also, as noted on #4705 (comment):
|
AMP validation error notices are concerning to non-technical users:
Rejection of validation errors should be limited to higher-privileged users, with Authors and Contributors (or other non-Admin role) shown validation errors warnings that just prompt them either to remove the invalid block (#2285) or to escalate the error to an administrator for support.
There should perhaps be a filter to configure the verbosity of the warnings for authors. There's a tough balance here because at one hand the warnings could be hidden to not concern users, but then at the same time the errors mean that markup is being removed. So if the validation error notice is not presented to the user, there needs to be a way for those validation errors to be escalated to an administrator.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
amp_validate
capability which by default is mapped by themanage_options
capability (in the same way ascustomize
is by default granted byedit_theme_options
).amp_validate
).Implementation brief
QA testing instructions
Demo
Changelog entry
The text was updated successfully, but these errors were encountered: