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

Certain blocks like images break editor width #90

Open
2 of 6 tasks
kean opened this issue Feb 11, 2025 · 5 comments
Open
2 of 6 tasks

Certain blocks like images break editor width #90

kean opened this issue Feb 11, 2025 · 5 comments
Labels
[Type] Bug An existing feature does not function as intended

Comments

@kean
Copy link
Contributor

kean commented Feb 11, 2025

Description

Certain blocks like images break editor width

ScreenRecording_02-11-2025.15-47-25_1.MP4

Step-by-step reproduction instructions

  • Add an image block
  • Specify the image width that's larger than the viewport

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
@kean kean added the [Type] Bug An existing feature does not function as intended label Feb 11, 2025
@kean
Copy link
Contributor Author

kean commented Feb 11, 2025

I can't see these options – Aspect Ratio, Width, Height – from the mobile editor:

Image

@dcalhoun
Copy link
Member

Certain blocks like images break editor width

This is an interesting case, and gets into really weird territory. I'm not entirely confident in how the editor should behave in this case. One could argue the editor should constrain UI to fit the device dimensions, avoiding overflow; one could also argue the editor's explicit styling—the fixed image dimensions—should be respected.

What are your thoughts on this?

There appears to be a few open issues in Gutenberg that directly or indirectly relate to this subject:

@dcalhoun
Copy link
Member

I can't see these options – Aspect Ratio, Width, Height – from the mobile editor:

This should likely be captured as a separate issue.

@kean
Copy link
Contributor Author

kean commented Feb 12, 2025

What are your thoughts on this?

In this case, the images in the rendered post respect the viewport and don't cause the overflow in the browser, so it's pretty clear that the editor should also render them this way.

In general case, I'd say block should never cause the scroll overflow of the document. For example, if you add a large table, the table block/element should have scroll overflow. The current Table block also leaves a lot to be desired as it doesn't have scroll overflow and instead shrinks the table to fit the viewport.

For comparison, here's GBK vs Pages.

There may be exceptions.

It looks like a duplicate #78. I'm not sure how I missed it in a repo with 18 issues 😓

@kean
Copy link
Contributor Author

kean commented Feb 12, 2025

This should likely be captured as a separate issue.

I opened a new issue: #93.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

2 participants