-
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
Block editor: focus mode: fix opacity for inner blocks, move classes #30130
Conversation
Size Change: -43 B (0%) Total Size: 1.41 MB
ℹ️ View Unchanged
|
@jasmussen Fixed the issue. :) |
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.
@jasmussen Made a tiny change so that blocks that don't contain a selected block are still faded. This can be tested with the column block. Selecting a block in one column shouldn't fade in blocks in the other column. Similarly for the cover block, selecting an inner block should fade in the cover block, but only also the selected block within, not the other blocks within the cover block. Tested all kinds of blocks now and should be good. |
|
10a6222
to
2f2ac5f
Compare
2f2ac5f
to
74eca5d
Compare
Description
This one is similar to #30106. It doesn't make sense for these classes that set a mode to be added to blocks. They should be added to the block editor (wrapper). Currently,
is-focus-mode
is added to every single block when focus mode is enabled.This PR moves
is-focus-mode
to the root element of the block editor and takes advantage of the selected state classes to determine whether a block should be focussed or not, instead of creating a newis-focused
class.Blocks should be faded out unless:
How has this been tested?
Test the above rules of spotlight mode. Select a block, select e.g. a cover block and select a block within the cover block.
Screenshots
Types of changes
Checklist: