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

Zoom Out: All Template Content Must Be Inside Containment Block #65145

Closed
2 tasks done
cat-og opened this issue Sep 9, 2024 · 3 comments
Closed
2 tasks done

Zoom Out: All Template Content Must Be Inside Containment Block #65145

cat-og opened this issue Sep 9, 2024 · 3 comments
Labels
[Feature] Zoom Out [Type] Bug An existing feature does not function as intended

Comments

@cat-og
Copy link

cat-og commented Sep 9, 2024

Description

If the content on a template is outside of a containment block such as a Group, Row, Stack, etc, it becomes almost impossible to work with the Zoomed Out view. The 'plus' symbols to add new patterns to not appear, and if you use the toolbar or list view to add a new block instead, you can not interact with this block to add new content.

Step-by-step reproduction instructions

  1. Open any template in the Editor
  2. Move template content outside containment block
  3. Switch to the 50% Zoom View, and try to add a new pattern

Screenshots, screen recording, code snippet

Screen.Capture.on.2024-09-08.at.23-56-43.mp4

Environment info

  • Chrome on Mac, tested with TwentyTwentyFour and Assembler

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
@cat-og cat-og added the [Type] Bug An existing feature does not function as intended label Sep 9, 2024
@getdave
Copy link
Contributor

getdave commented Sep 19, 2024

Thanks for reporting. We're looking at solutions for improving the detection around "containment" (section root) in #65400.

That said, this seems like a separate issue. Namely, what happens if the user deliberately (or otherwise) moves blocks outside of the "section root" block (the one we've detected as the "root" of the main content of the page)? How shoudl the editor behave.

@getdave
Copy link
Contributor

getdave commented Sep 25, 2024

I looked into this some more and worked out what's happening.

ON the template in question your wrapping Group block has the tag name of <main> (see under "Advanced"). As a result Zoom Out detects that as the "main content" of the template and from that it derives that all immeidate children should be editable as "sections".

However, when you moved the content outside of that wrapping Group that content was no longer within the "main content" and thus they were not considered "sections" and thus were not editable. That's expected, but perhaps we should show a warning if your Page or Template has no child blocks within it's <main>?

However, Zoom Out will work without a container. In the video below you see me removing the containing Group block and then switching to Zoom Out. As you can see everything remains editable.

Screen.Capture.on.2024-09-25.at.16-00-51.mp4

I'd welcome any feedback you have on this, specifically around your expectations around what you'd like to see happen in these scenarios.

@richtabor
Copy link
Member

That's expected, but perhaps we should show a warning if your Page or Template has no child blocks within it's

?

No, I don’t think a notice needs to be fired here. I don’t think it’d be helpful enough to warrant. Docs on how zoom out work should be good enough, to help reduce edge cases like this. I’ll close this as not planned.

@richtabor richtabor closed this as not planned Won't fix, can't repro, duplicate, stale Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Zoom Out [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

4 participants