WordPress / gutenberg

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

Re-add deep link to Global Styles panel `styles=open` #49585

Open luminuu opened 1 year ago

luminuu commented 1 year ago

Description

The deep link for opening the Global Styles panel directly worked until 6.1, but got removed in 6.2 again when Browse Mode was introduced.

On January 20, 2022 this was done in this PR, after being accidentally removed: https://github.com/WordPress/gutenberg/pull/38093

With PR #44770 this part of the code was removed: https://github.com/WordPress/gutenberg/pull/44770/files#diff-53f39da7a5f1f996f5359a2dd7b2747fb3d60a494523dd73dba946fab8e82592

Related to this is this discussion about the link from the WP Dashboard: https://github.com/WordPress/gutenberg/issues/38172

With reintroducing styles=open as parameter, it would be possible again to deep link to the Site Editor with the Global Styles panel open, in combination with canvas=edit to skip the Browse Mode interface.

Step-by-step reproduction instructions

  1. Open the site editor on a WP 6.1 with site-editor.php?styles=open: the site editor opens, as well as the Global Styles panel on the right side.
  2. Do the same on a 6.2 install: the site editor opens, but the right sidebar stays at the Template view.

Screenshots, screen recording, code snippet

No response

Environment info

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

Yes

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

Yes

annezazu commented 1 year ago

Noting that we'll likely want some design feedback here as a high level Styles tab is being added to the dark grey sidebar of the site editor (aka "browse mode" project name): https://github.com/WordPress/gutenberg/pull/49014 This is evolving so there might be a future, clearer pathway to initiate the Styles interface while using the new site editing experience. For now though, @ntsekouras curious if this is something you could work on after your recent work to deep link with Styles for different functionality https://github.com/WordPress/gutenberg/pull/49350

jasmussen commented 1 year ago

While I think we still have some work to do separately, to improve the clarity of the uniqueness of the global style inspector in the fullscreen view (compared to the block inspector), technically I would consider this issue fixed in the next version of the plugin, where the Styles section, including a deep-link as suggested, has landed recently.

Shown here, a GIF navigating into the Site editor > Styles > Edit styles:

style link

luminuu commented 1 year ago

While I think we still have some work to do separately, to improve the clarity of the uniqueness of the global style inspector in the fullscreen view (compared to the block inspector), technically I would consider this issue fixed in the next version of the plugin, where the Styles section, including a deep-link as suggested, has landed recently.

Will this deep link also be available to be called from outside of the editor, e. g. another admin page?

jasmussen commented 1 year ago

Will this deep link also be available to be called from outside of the editor, e. g. another admin page?

That is not my instinct at this time, no, I think one of the benefits of a "Site View" in the editor being that it can gather all block-design related tools together in one place. At the same time, if this becomes a pain point for someone constantly wanting to revisit this from the top level, we'll definitely want to revisit that, perhaps people can "pin" items to the top level if they want to.

clubkert commented 1 year ago

I'll just add that a lot of our users have a hard time finding Global Styles today (and I know this is being worked on separately, which is great).

Being able to say something like "click here to edit your site style" or "click here to pick another style variation" would be helpful. Instead of needing to say "click here and then navigate to xyz to pick another style variation."