-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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: remove CSS appender hiding #61142
Conversation
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. |
return { | ||
order: _order, | ||
selectedBlocks: getSelectedBlockClientIds(), | ||
visibleBlocks: __unstableGetVisibleBlocks(), | ||
shouldRenderAppender: | ||
hasAppender && | ||
shouldShowAppender && | ||
__unstableGetEditorMode() !== 'zoom-out' && | ||
( hasCustomAppender | ||
? ! getTemplateLock( rootClientId ) && | ||
getBlockEditingMode( rootClientId ) !== 'disabled' |
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 special condition for the custom appender is also very strange. If a template is locked or editing is disabled, default appenders should also be removed?
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 uses rootClientId
so I wonder if we wanted to avoid a situation where blocks could be added if the parent was locked. Maybe @draganescu knows more.
Size Change: -107 B (0%) Total Size: 1.75 MB
ℹ️ View Unchanged
|
Flaky tests detected in 0fd4671. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/8846615624
|
Going to close this for now. We seem to rely on always rendering the appender for blocks like navigation and social icons. In these cases it seems we also want to show the appender when an inner block is selected. |
What?
All appenders should be hidden unless the (containing) block is selected, or the block is empty. Currently our logic for normal appenders and custom appenders has diverged, probably not by intention. This also allows us to remove some hiding done by CSS.
Why?
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast