Skip to content
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

Global Styles panel unexpectedly switches to selected block #68068

Open
3 of 6 tasks
luisherranz opened this issue Dec 17, 2024 · 1 comment
Open
3 of 6 tasks

Global Styles panel unexpectedly switches to selected block #68068

luisherranz opened this issue Dec 17, 2024 · 1 comment
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json Needs Design Feedback Needs general design feedback. [Type] Bug An existing feature does not function as intended

Comments

@luisherranz
Copy link
Member

Description

When editing a block's settings within Global Styles, if you select another block in the List View without closing Global Styles, the Global Styles panel automatically switches to the newly selected block. This behavior can be confusing and potentially lead to unintended global style changes, as users might not realize they are still in the Global Styles context and believe they are modifying the individual block's styles.

I understand it's an improvement likely made to facilitate the use of global styles and their configuration for the blocks that appear on the page. However, I think it would be interesting to analyze some other pattern that prevents this kind of error by the user.

Step-by-step reproduction instructions

  1. Open Global Styles.
  2. Select a block to edit its global styles (e.g., Heading).
  3. Without closing Global Styles, select a different block in the List View (e.g., Paragraph).
  4. Observe that the Global Styles panel now displays the settings for the newly selected block (Paragraph).

Screenshots, screen recording, code snippet

No response

Environment info

No response

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

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure
@luisherranz luisherranz added [Type] Bug An existing feature does not function as intended Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json labels Dec 17, 2024
@ramonjd
Copy link
Member

ramonjd commented Dec 18, 2024

Here's the behaviour in action:

Kapture.2024-12-18.at.12.00.32.mp4

I guess it was implemented that way to mimic block settings, whose panel will update similarly as you select blocks.

users might not realize they are still in the Global Styles context and believe they are modifying the individual block's styles.

Is the argument that users will forget that they've opened global styles, or be unaware that it's open in the first place?

Removing the route switching, so that the global styles panels remains in the same state despite the selected block would carry a similar risk.

Do you think global styles needs to have a unique color/design/UX scheme to make it obviously different to block settings? They are very samey, I get where you're coming from.

@ramonjd ramonjd added the Needs Design Feedback Needs general design feedback. label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json Needs Design Feedback Needs general design feedback. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

2 participants