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
Settings screen updates #4998
Settings screen updates #4998
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
assets/src/onboarding-wizard/components/reader-mode-override.js
Outdated
Show resolved
Hide resolved
@@ -269,9 +269,10 @@ public static function get_theme_support_args() { | |||
]; | |||
} | |||
if ( ! isset( $support[0] ) || ! is_array( $support[0] ) ) { | |||
return []; | |||
return [ 'paired' => false ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is my understanding.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_completed
option has been changed toplugin_configured
. It's now set to true when the user completes the wizard or saves the settings screen.plugin_configured
is false, the welcome area at the top urges the user to go to the wizard. When it's true, the text changes.plugin_configured
is 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