WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.48k stars 4.18k forks source link

Styles: Relocate the revisions toggle #66307

Open afercia opened 5 days ago

afercia commented 5 days ago

Description

Splitting this out from https://github.com/WordPress/gutenberg/pull/63243

The global styles panel header contains 3 additional buttons besides the X close button:

In https://github.com/WordPress/gutenberg/pull/63243 it was pointed out that this buttons shouldn't be placed in the panel header in teh first place.

It was also noted that the Revisions toggle placement is inconsistent with other parts of the UI:

Image

While in the Site editor navigation panel it's placed at the bottom of the Styles panel::

Image

I'd tend to agree with @jameskoster comment:

The revisions button invokes a drilldown, which feels strange given the access point (panel header toggle button).

As such, I'd like to propose to consider relocating this button at the bottom of the Global styles panel:

Cc @WordPress/gutenberg-design @t-hamano @aaronrobertshaw

Step-by-step reproduction instructions

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Please confirm that you have tested with all plugins deactivated except Gutenberg.

jameskoster commented 5 days ago

For now it could be as simple as:

t-hamano commented 3 days ago

To me, the following description seems redundant, because the same description is also included on the next screen:

Image

What do you think about just displaying the button like this:

Image

afercia commented 3 days ago

Personally, I would be in favor of removing the descriptions and placing the navigation buttons grouped together. Cc @WordPress/gutenberg-design

jameskoster commented 3 days ago

I wouldn't object, but feels like a detail to discuss separately.

afercia commented 2 days ago

I tend to think the best path forward here is to tackle this issue together with https://github.com/WordPress/gutenberg/issues/66333. To me, it's important to consider these two proposed changes holistically to better evaluate the overall change in the design and user experience.

To recap:

Re: the navigation button styling: for now, I'd propose to use the built-in variants of the ItemGroup component, which is the component already in use to group many nqvigational controls in the settings panel. Specifically, I'd use the variants isBordered isSeparated.

I wouldn't object to use other variants of the component. However, I think it's important to use built-in variants and avoid ad-hoc implementation and / or CSS overrides. If a different styling is desired, I'd strongly recommend to create a new issue to consider to introduce a new variant.

Screenshot before and after:

Image

jameskoster commented 2 days ago

There is a lot of high level design work around the Styles panel happening in https://github.com/WordPress/gutenberg/issues/66376, so I would lean towards keeping changes focused on functionality for now.

richtabor commented 27 minutes ago

There is a lot of high level design work around the Styles panel happening in #66376, so I would lean towards keeping changes focused on functionality for now.

Yes, let's not do design work on this panel here. One-off changes aren't going to improve the experience—it's going to continue making WordPress feel more and more fragmented and difficult to understand.