-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Block: fix invalid block scrim overflowing toolbar on mobile #9473
Conversation
On small screens the invalid block scrim overflows a block’s dropdown menu / toolbar, which is positioned beneath the block.
325d128
to
ab62433
Compare
@jasmussen thanks for the help with this. I implemented your pseudo CSS but found the bottom offset wasn't enough and had to change it to
I don't know if there's a better constant, or why it needs the I also tied the change to |
Solid PR, very nice work! That one pixel is the border width, so I pushed a tiny thing to fix to just use the variable, this will help explain why it's needed. |
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.
👍 👍
This commit changes the layout and design of the block warning a bit. It is no longer obscuring content, and the scrim is lighter.
Okay, so I commandeered this PR, inspired by your fixes. And I pushed a great deal of changes in 3a6e1f3, enough that someone else should review this. The block warning looks like this now: The big change here:
|
I like the block growing to show all of the content. Looks good in all warning situations, except in a single-use block warning where the border disappears in places: However I think it's part of a larger issue to do with the block warning style and the single use error. I can push it out into another issue unless you think it's a quick fix here. |
Giving it a go I got this in .editor-block-list__block:not(.has-warning) .editor-warning {
border: $border-width solid $light-gray-500;
}
.editor-block-list__block.is-selected:not(.has-warning) .editor-warning {
border-top: $border-width solid $light-gray-500;
} But it has a double border when the block is selected. Not really sure of the best way of proceeding so I'll leave it to someone who knows what they are doing. |
I like these changes. One thing that is jumping to me is that the option "Keep as HTML" could probably be "Keep as is" (better written, of course, maybe even just "Keep"). Being able to see the whole block clearly shows the content is not necessarily broken, just that it cannot be handled as a perfect block of a given type. |
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 like this - it's a nice improvement. I added one minor optional comment.
On the topic of copy, @mtias, I find "This block has been modified externally." to be a bit of a technical sentence that could be softened and it doesn't attempt to educate why there's an issue.
And 'Convert to Block' doesn't always make sense since it's already a block, just one with an warning state.
I also noticed that 'Convert to block' appears in both the main body of the error and the more menu and I couldn't see why.
Shall I make an issue to cover those things?
Regarding the copy in the button and message I can look at those in another PR - it probably needs a more coordinated think.
Yep, I wasn't entirely sure whether this should be duplicated and just went with what was in the original mockup (although it has a different button). It's easy to remove so if it seems unnecessary I can do that elsewhere too. |
|
@johngodley @jasmussen - I think this is good to merge, unless you can think of anything outstanding? |
🎉 |
On small screens the invalid block scrim overflows a block’s dropdown menu / toolbar, which is positioned beneath the block.
This only happens when the block is selected.
This PR shortens the scrim so it doesn't overlap the bottom toolbar, as discussed in #9402.
Fixes #9402
Testing
</p>
)Types of changes
The CSS changes are tightly coupled to a selected block on a small screen so shouldn't affect anything else.
Checklist: