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

Disable Zoom Out in Style Book #66127

Closed
getdave opened this issue Oct 15, 2024 · 6 comments · Fixed by #66228
Closed

Disable Zoom Out in Style Book #66127

getdave opened this issue Oct 15, 2024 · 6 comments · Fixed by #66228
Assignees
Labels
[Feature] Zoom Out [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@getdave
Copy link
Contributor

getdave commented Oct 15, 2024

Let's consider disabling (or removing) the Zoom Out toggle in Style Book

Ideally, the Zoom Out and Device Preview buttons should be disabled in the Style Book. Right now, they are clickable but do not really do anything.

We could follow up with that one as a low priority "nice to have" fix.

I did notice that the Zoom Out button toggles the breadcrumb bar at the bottom of the window.

I believe it's intentional in order to remove "chrome" from the view when zoomed.

Originally posted by @getdave in #65630

@getdave
Copy link
Contributor Author

getdave commented Oct 15, 2024

@ndiego @colorful-tones @kevin940726 Lets determine if this is needed for 6.7

@colorful-tones colorful-tones changed the title Disable Zoom Out in Storybook Disable Zoom Out in Style Book Oct 15, 2024
@colorful-tones
Copy link
Member

It would be a nice-to-have for me.

(Note: I edited the title and description to correct "Storybook" to "Style Book")

@andrewserong
Copy link
Contributor

andrewserong commented Oct 18, 2024

Just a quick drive-by comment, but some of the other header items are greyed out / disabled when the Style Book is open, so I'd probably lean toward disabling rather than removing for consistency:

Image

So perhaps a similar approach could be used for the Style Book button?

@andrewserong
Copy link
Contributor

I've tried a simple (and possibly naive) approach over in #66228 in case it can make it in for 6.7 in time.

@madhusudhand
Copy link
Member

I think View button could also be disabled when style book is open, because changing the options (Desktop to Mobile) does nothing in this state.

@github-project-automation github-project-automation bot moved this from 📥 Todo to ✅ Done in WordPress 6.7 Editor Tasks Oct 18, 2024
@andrewserong
Copy link
Contributor

I think View button could also be disabled when style book is open, because changing the options (Desktop to Mobile) does nothing in this state.

Good point. I briefly considered doing that in the same PR, but one potential argument for keeping it around is that the dropdown also includes the View Site link — it's possible that some folks would like to quickly get to View Site with the Style Book open, so it could add friction to that particular action if we disable the View dropdown button. So if we look into this idea, perhaps we'd want to disable the Desktop / Tablet / Mobile buttons, but not the View site external link?

Image

That would also help ensure that we don't accidentally disable things added into the dropdown by plugins: https://make.wordpress.org/core/2024/10/18/extending-the-preview-dropdown-menu-in-wordpress-6-7/ — though something else to consider is that items added by a plugin may or may not be compatible with the style book being open. Just something else to consider if we decide to pursue disabling things here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Zoom Out [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants