-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Stretch Widgets editor layout to full height #32905
Conversation
Size Change: +78 B (0%) Total Size: 1.04 MB
ℹ️ View Unchanged
|
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.
LGTM 🚢
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.
LGTM, just nitpicking.
Also not related to this PR, but I would expect clicking on the sidebar or the top bar should also deselect the block. I think this is present in the post editor as well though and we should probably fix it there if it makes sense.
display: flex; | ||
flex-direction: column; | ||
flex-grow: 1; | ||
|
||
> div:last-of-type, | ||
.block-editor-writing-flow, | ||
.block-editor-writing-flow > div { | ||
display: flex; | ||
flex-direction: column; | ||
flex-grow: 1; | ||
} |
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.
Could we do this?
display: flex; | |
flex-direction: column; | |
flex-grow: 1; | |
> div:last-of-type, | |
.block-editor-writing-flow, | |
.block-editor-writing-flow > div { | |
display: flex; | |
flex-direction: column; | |
flex-grow: 1; | |
} | |
&, | |
> div:last-of-type, | |
.block-editor-writing-flow, | |
.block-editor-writing-flow > div { | |
display: flex; | |
flex-direction: column; | |
flex-grow: 1; | |
} |
Also not a fan of those div
selectors, but not that I have any better ideas 😅.
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.
Hmm, I don't love the &,
trick as it makes the code less legible at a glance. Just like with .parent-selector &
, it means we write less lines of code at the expense of taking longer to decipher what it does 😅 and in this case it doesn't even make a difference in the compiled output so there's no performance gain.
Yeah, the div
s are not great; it might be something to look into later - are those divs really needed? If so, should they have classnames? - the last-of-type
in particular makes me a bit anxious as it can break really easily 😬
c795e4a
to
26ad771
Compare
Description
Fixes #32769.
The widgets editor root layout area needs to stretch to full screen height so that clicking on any part of the editor unselects selected blocks.
How has this been tested?
In the Widgets editor, select a block. Make sure widget areas don't take up the whole screen. Check that clicking underneath the widget areas unselects the selected block.
Screenshots
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist:
*.native.js
files for terms that need renaming or removal).