Conversation
…e/4704-settings-screen-updates
…e/4704-settings-screen-updates
…ngs-screen-updates
…ngs-screen-updates
|
Tests are passing on this and it's mostly ready. I'm keeping it in draft status for the moment because there are a couple pieces I want to go over this evening and maybe tomorrow morning, but anyone who wants to check it out and offer feedback can do so any time. |
….com/ampproject/amp-wp into feature/4704-settings-screen-updates
| } | ||
| if ( ! isset( $support[0] ) || ! is_array( $support[0] ) ) { | ||
| return []; | ||
| return [ 'paired' => false ]; |
There was a problem hiding this comment.
The intent here is if I say add_theme_support( 'amp' ) that implies my theme would support Standard mode, right?
cc @westonruter
There was a problem hiding this comment.
That is my understanding.
There was a problem hiding this comment.
Correct. In practice, however, I think this flag is not useful. In #5010 I'm going to propose that we make paired => true the default instead.
Co-authored-by: Weston Ruter <westonruter@google.com>
Co-authored-by: Weston Ruter <westonruter@google.com>
….com/ampproject/amp-wp into feature/4704-settings-screen-updates
westonruter
left a comment
There was a problem hiding this comment.
Great work! Impressive how you were able to shim the old and the new into the same UI.
Co-authored-by: Pierre Gordon <16200219+pierlon@users.noreply.github.com>
pierlon
left a comment
There was a problem hiding this comment.
Really great job done here. The settings screen finally looks and feels modern ❤️.
Summary
Fixes #4475
Fixes #4990
Fixes #4560
Fixes #4704
This revamps the main plugin settings screen using components from the setup wizard. A lot of this change set is moving files around and renaming things. Mainly, a few related PHP classes were moved into the services architecture, while some of the wizard components were moved up a level in the file system and refactored in small ways as needed to support both purposes.
Updates to test/review on the settings screen:
wizard_completedoption has been changed toplugin_configured. It's now set to true when the user completes the wizard or saves the settings screen.plugin_configuredis false, the welcome area at the top urges the user to go to the wizard. When it's true, the text changes.plugin_configuredis false and there is a suggested mode (or built-in support) provided by the active theme, we put an info notice on that mode. I think further enhancements will be needed around this.Not included
Two parts of the settings screen are still rendering on the backend: the template-level support checkboxes and the plugin suppression table. Both of these features can be done on the React side, but there wasn't going to be time in this update, so we now wrap them in the new components and styles and hit
form.submit()to save them and refresh the page after the REST/React-based options have finished saving.Checklist