Skip to content

Style book and global styles revisions: zoomed out mode and device switching doesn't work #65630

@ramonjd

Description

@ramonjd

Description

Because the style book and global style revisions are presented in their own iframes, they're not connected to changes in the canvas width when:

  • activating zoomed out mode
  • toggling between device previews

I think it goes beyond activating zoomed out mode for these iframes. I tried it and it's not a great experience. Every time the iframe renders the width "bounces" in zoomed out mode.

style-book-zoom-out-bug.mp4

Tip

A quick fix would be to deactivate the zoomed out / device tools for style book/global styles revisions.

Beyond that, there is an idea to create an editor instance for previewing global styles. This editor would deactivate a lot of block editor tools that are unnecessary.

The zoomed out / device tools could then be introduced incrementally.

Step-by-step reproduction instructions

  1. Go to the Site Editor
  2. Open up the style book or global styles revisions
  3. Activate zoom mode - observe that zoomed out mode doesn't activate
  4. Toggle the device previews - observe that the canvas width doesn't change

Screenshots, screen recording, code snippet

2024-09-25.12.47.32.mp4

Environment info

  • WordPress 6.6
  • Gutenberg trunk

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Feature] Zoom Out[Type] BugAn existing feature does not function as intended

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions