Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Replace the 'Settings saved' notice, only on changing the Template Mode #1443
I don't think this should be the case necessarily. If it only shows when changing the template mode, then in reality it won't show very much.
This surfaces the discussion we had awhile ago about showing the validation status alongside each of the supportable templates.
When visiting the AMP settings screen, I think we need to make sure that there are some invalid URLs captured for us to show. This could be done server-side when switching the mode, or when visiting this settings screen there could be Ajax requests triggered to validate the latest URL of each supported template type.
That may be overkill to start with, so perhaps the best thing would be upon switching the mode to obtain the first post type that is supported by AMP, and obtain the first published post of that type that has AMP enabled, and then re-validate that URL. When the page then reloads there will be validation results available to show.
Validating On Switching Template Modes
Good idea, it would make sense to validate a URL on switching template modes.
In reality, the
And yes, if there are no unaccepted validation errors on the URL then that “Review Errors” link should be removed.
Here's where I'm going with the messages. They vary based on the mode switched to, and there are links to view either the validated URL on the site, and/or to view the validation errors for that URL.
Success message when activating native mode:
Message when enabling paired mode but there are validation errors blocking it:
When activating classic mode: