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

Hide meta boxes when zoomed out #66718

Closed
stokesman opened this issue Nov 4, 2024 · 16 comments · Fixed by #66886
Closed

Hide meta boxes when zoomed out #66718

stokesman opened this issue Nov 4, 2024 · 16 comments · Fixed by #66886
Assignees
Labels
[Feature] Meta Boxes A draggable box shown on the post editing screen [Feature] Zoom Out [Status] In Progress Tracking issues with work in progress

Comments

@stokesman
Copy link
Contributor

In the Post editor with a block theme active and meta boxes present, zooming out doesn’t affect the meta box pane visibility. This may be seen as unideal because displaying as much of the post content vertically as possible seems to be an aim of zoom out. Zooming out hides the editor’s footer for presumably that reason (though maybe that has more to do with content-only editing). However, not a major issue as the meta box area can be resized to take up minimal space.

Note

Availability of zoom out and meta boxes together is new in WP 6.7. If showing meta boxes while zoomed out is considered a bug then it seems eligible to fix in WP 6.7

Demo of trunk

zoom-out-and-meta-boxes.mp4
@stokesman stokesman added [Feature] Meta Boxes A draggable box shown on the post editing screen [Feature] Zoom Out [Type] Question Questions about the design or development of the editor. labels Nov 4, 2024
@stokesman
Copy link
Contributor Author

This doesn’t seem like a very important question/issue but I’m inviting @WordPress/gutenberg-design to weigh in.

@t-hamano
Copy link
Contributor

t-hamano commented Nov 5, 2024

Thank you for bringing this up.

There are several issues/PRs related to this issue, and we may need to consider them comprehensively:

My understanding is that the zoom out mode is about using patterns to roughly craft the overall content, so I don't see how necessary meta boxes are in that case.

In my opinion, the ideal specifications are:

  • Consistently disable meta boxes in zoom out mode.
  • Enable zoom out toggle and shortcuts even when the editor is not an iframe. Currently, the zoom out toggle is not visible when the editor is not an iframe, but the Patterns tab forces zoom out mode, so the zoom out toggle button suddenly appears when you open the pattern tab (related to #66671)
  • Use legacy (non-resizable) meta boxes on mobile/tablet (#66726 tries to do that) but as mentioned in this comment, it might be more ideal to use resizable meta boxes for non-desktop views

That is, I would expect the following behavior:

074dcac096aab12a58c59af86bf20f40.mp4

cc @getdave @draganescu for visibility

@jasmussen
Copy link
Contributor

I'd tend to echo Aki's points above, and note that one of the primary goals of zooming out is to literally work at a receded, higher, level. Work with simpler ingredients. In that vein, hiding the metaboxes works towards that. I'd defer to folks with stronger opinions, though.

@getdave
Copy link
Contributor

getdave commented Nov 5, 2024

My understanding is that the zoom out mode is about using patterns to roughly craft the overall content, so I don't see how necessary meta boxes are in that case.

Correct 👍 I would vote to hide metaboxes in Zoom Out. It's a view designed for composing content and not tweaking settings.

@MaggieCabrera
Copy link
Contributor

Correct 👍 I would vote to hide metaboxes in Zoom Out. It's a view designed for composing content and not tweaking settings.

I have the same thought. We want to keep open the tabs that relate to editing templates/pages layout and styles, I don't think metaboxes are relevant in a zoomed out context

@getdave
Copy link
Contributor

getdave commented Nov 5, 2024

I should also add that I don't think we should have metaboxes for the device previews either. Those are designed as "previews" so metaboxes don't seem like a good fit there. Are there any known reasons why that would be a mistake?

@getdave
Copy link
Contributor

getdave commented Nov 5, 2024

Consistently disable meta boxes in zoom out mode.

@t-hamano Do we have a PR for this? I raised #66742

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Nov 5, 2024
@getdave getdave moved this to 🏗️ In Progress in WordPress 6.7 Editor Tasks Nov 5, 2024
@draganescu
Copy link
Contributor

A little too late and not a blocker, just a thought: I don't know what was it so important about metaboxes showing in zoom out that required such a fast response and also merging at this stage. It's great we did it but it's an enhancement which debuted 20 hours ago and has type question 😆

It made more sense IMO exploring in trunk ways to achieve what @t-hamano shows where metaboxes are connected to all the features that would hide them.

@stokesman
Copy link
Contributor Author

It made more sense IMO exploring in trunk ways to achieve what @t-hamano shows where metaboxes are connected to all the features that would hide them.

#66742 was only merged to wp/6.7 so I think that’s why this is still open and we can still explore what to do with trunk.

@t-hamano
Copy link
Contributor

t-hamano commented Nov 6, 2024

I should also add that I don't think we should have metaboxes for the device previews either.

This may indeed be the case. However, there may be plugin developers that require meta boxes on more than just the desktop view.

Pingging @arnaudbroes and @enricobattocchi: Are meta boxes necessary for tablet/mobile previews? I remember getting some feedback from you during the meta box enhancements and fixes.

@ndiego
Copy link
Member

ndiego commented Nov 6, 2024

I am going to remove this issue from the 6.7 project board, having already removed #66671.

@arnaudbroes
Copy link

I should also add that I don't think we should have metaboxes for the device previews either.

This may indeed be the case. However, there may be plugin developers that require meta boxes on more than just the desktop view.

Pingging @arnaudbroes and @enricobattocchi: Are meta boxes necessary for tablet/mobile previews? I remember getting some feedback from you during the meta box enhancements and fixes.

I think it would be fairly unintuitive for users if metaboxes disappear when you toggle the tablet/mobile preview.

I'm a little bit confused here though. How exactly does this new Zoom Out feature (which I really like by the way) relate to mobile previews?

Imo metaboxes should be hidden for this Zoom Out feature, but not for the mobile previews, or are they one and the same?

@stokesman
Copy link
Contributor Author

I should also add that I don't think we should have metaboxes for the device previews either.

It may be that in the majority cases when enabling a device preview meta boxes are unwanted. However hiding them completely risks degrading any use case where a meta field influences something related to the post’s display in the editor. If the post’s template is displayed it seems more likely and perhaps with block bindings it is a possibility.

Given that the meta boxes are now collapsible it seems okay to be conservative and keep them available. We could consider automatically collapsing them when a device previews is enabled if we’re sure that most of the time they’re a nuisance.

I'm a little bit confused here though. How exactly does this new Zoom Out feature (which I really like by the way) relate to mobile previews?

They aren’t technically related but the question seems to have been raised because of some similarity and doubt about there being any known cases where it’s useful to have them present while a device preview is active. It’s definitely something that can be considered separately.

@t-hamano
Copy link
Contributor

t-hamano commented Nov 7, 2024

Thank you everyone for your feedback. So, would the following be the best course of action for now?

  • Hide meta boxes in the zoom out mode in trunk branch, similar to wp/6.7 branch
  • Work to move Split view with meta boxes even with legacy canvas #66706 forward. This means that we will always use resizable meta boxes, regardless of whether the editor is an iframe or not, or what the preview device is.

@arnaudbroes
Copy link

So, would the following be the best course of action for now?

  • Hide meta boxes in the zoom out mode in trunk branch, similar to wp/6.7 branch
  • Work to move Split view with meta boxes even with legacy canvas #66706 forward. This means that we will always use resizable meta boxes, regardless of whether the editor is an iframe or not, or what the preview device is.

This seems like an excellent plan to me.

@richtabor
Copy link
Member

Hide meta boxes in the zoom out mode in trunk branch, similar to wp/6.7 branch

Yup! That would close this issue then, yea?

@richtabor richtabor changed the title Should Zoom Out (in the Post editor) hide meta boxes? Hide meta boxes when zoomed out Nov 8, 2024
@richtabor richtabor removed the [Type] Question Questions about the design or development of the editor. label Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Meta Boxes A draggable box shown on the post editing screen [Feature] Zoom Out [Status] In Progress Tracking issues with work in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants