-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Admin redesign: Settings #63624
Comments
@jameskoster how do we think of validation? In implementing parts of this #59745 I've started to add validation #63895. I wonder how do we surface this to users (e.g.: when a user enters an invalid value for a field or needs to fill a required one, etc.)? |
@jeflopodev Thanks for the feedback. One of the main objectives of the design work here is to make the choice of container inconsequential. In other words a settings form could be rendered in a page (like the example you shared), a wide or narrow modal, a sidebar/panel, or even a popover, and just work. |
I tested the layout with the PayPal plugin, incorporating some changes and add-ons for consideration:
|
Thanks @nikkivias, it's really great to see the concepts tested outside of core. To be successful these patterns will need to adequately serve a wide range of use cases; IE plugins 💪 While closely related I'd say that your first three points relate to the page header; a separate component that we need to spec as a part of the parent Sub-dividing sections seems reasonable. I wonder if it would make sense to use headings here rather than horizontal rules. In your example the toggles could live inside a I noticed your section descriptions included a 'Learn more' link—I think that's a nice idea that would be good to standardise / codify. |
Ah thanks @jameskoster !
It's a good idea, and I explored it at one point, but it doesn’t always cleanly separate sections and can sometimes add more visual noise. In cases where you just need to separate one setting, a subheading may not be necessary. Line separators provide a clean and easy way to distinguish settings without the challenge of crafting the right subheading, which many people may find challenging. That said, I think field setting can still be used where it makes sense. |
I'd be curious to get @WordPress/gutenberg-components thoughts on a |
That makes sense to me, especially since it seems we want to handle not just static layout but responsive styling as well. I am assuming that this |
|
Do we have a direction we'd like to go for regarding saving? I'm seeing several iterations and I'm curious how we view each section from the perspective of DataForms. Will each one be its own form or will the page be a single form? We also have the opportunity to do an auto-save, although this doesn't feel very WordPressy. Sticky footer with Save buttonHeader with Save ButtonSave button with every section |
What we end up recommending here can be informed by any experiences you encounter. Though I will say that a save button in the header can not work as the only save button, as that would require shift-tabbing backwards to save, where the logical keyboard flow would put the save button at the end. |
I quite like the sticky footer approach. It puts the save button in easy thumbs reach on mobile too. |
The only downside of a sticky footer is that it can take up precious screen estate. Maybe we could show a sticky footer only for viewports above a given height? |
In the context of the wider admin redesign (#53322), a scalable, portable, and responsive design pattern for settings pages is crucial. This issue outlines some foundational principles and design conventions for such a pattern.
General Structure
The layout is defined by a consistent header and footer (dictated by the Layout (#53617)), framing the main content area where settings are organized into sections. Each section comprises a left column for title and description, and a right column for the actual settings. The left column makes it easy to scan the page at a high level and locate a specific setting.
Layout Conventions
Section Structure
Each section contains the following elements:
Responsive Behavior
By adhering to these guidelines, we ensure a consistent, user-friendly, and responsive design for settings pages.
Contextual examples
To test the spec we can try applying it to some existing interfaces.
Editor preferences
In this example we see how the Editor preferences would adapt to different environments; the existing modal, a hypothetical page in site settings, and on mobile.
Page settings
This mockup shows the settings for a page in the Inspector (in the full-screen editor, and as a quick-edit interface in data views), in a hypothetical full-screen page / modal, and on mobile.
The text was updated successfully, but these errors were encountered: