-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Adapt site editor layout widths based on viewport size #58442
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
Conversation
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
|
Size Change: +443 B (+0.03%) Total Size: 1.75 MB
ℹ️ View Unchanged
|
|
Another option to consider here is allowing users to resize these columns manually (within certain parameters) rather than setting a static value. |
t-hamano
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that the width of the sidebar was increased from 320px to 360px in the past, completely contrary to this PR 😅
However, the UI of the Site Editor has changed significantly since then, so I think we can reconsider the ideal width.
Personally, I prefer a narrower width.
|
I think we can revisit those widths, and would prefer we do fixed widths before we add user resizing options. But I don't know that it's good to change this width until we have a clearer vision specifically of the split view. There are probably some responsive options we can look at, but it's important to note that this particular sidebar is used across a great deal of sections, and in the future even more. It may be a good change across all of those, but probably best to explore that space a bit more before we commit. |
|
Since there is currently no details page in the site editor, I'm thinking we might be able to revive this PR. #60847 suggests reducing the sidebar width to 240px. 240px might be too narrow, but I think we could reduce it to at least 320px. |
|
I think rather than one-off pushes, we should get a clearer view of what the next iteration of this should look/feel like. Otherwise we'll change it to one size, then a few months later change it to another. :) |
That seems like a great approach to me. Hopefully, we can also fix the overlap at certain screen sizes as reported in #62104. |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
I pushed some changes and updated the OP. We can easily tweak values. Let me know what y'all think. |
|
Any thoughts on this one @WordPress/gutenberg-design ? |
|
Does the dark sidebar ever need to be wider than its default state? If it's mostly a list of list of menu items that open secondary panels, I question if it should ever get wider. I think only the canvas/frame needs to grow, probably not even the secondary panel (where lists of pages are). |
|
@richtabor reducing the sidebar width is what this PR originally did. I didn't think you were keen? I do think that's a reasonable place to start... |
Resizing the sidebar is fine, but I don't think that the secondary sidebar should grow as well. |
It could have its own behavior, like this, perhaps: #62748 |
|
Closing since #63431 was merged. |


adaptive-layout.mp4
What?
Update width of site editor layout areas based on viewport size.
Why?
The existing one-size-fits-all dimensions do not scale elegantly, and the navigation sidebar is arguably too wide, especially at smaller screen sizes.
Testing Instructions
npm run buildOriginal PR
## What? Reduce the width of the navigation sidebar in the site editor from 360px to 320px.Why?
Currently the navigation sidebar and the list layout content frame are roughly equal in width (360px and 380px respectively). Given the nature of the content in each element I'm not sure this is appropriate.
As the Navigation sidebar consists mostly of menu items it's width can be reduced slightly. This attempts to install more appropriate visual balance between sidebar / content, and provides more space for page contents / preview frames on the right.
The value isn't necessary a proposal, there may be scope to go narrower, or to adjust the width of the content frame instead. The PR mostly aims to start the conversation.
I acknowledge it may be preferable to wait until we have a more concrete vision for the broader admin design for making this change.
Testing Instructions
npm run buildBefore
After