-
Notifications
You must be signed in to change notification settings - Fork 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
Gutenboarding: cleanup block UI hiding styles #38635
Comments
PR to update to latest |
It looks like the changes to gutenberg/block-editor package isn't published to NPM yet as part of 7.2, @ellatrix are you about to update the NPM packages too as part of the 7.2 release? Or are the NPM packages just a separate task? https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/package.json (not updated yet) |
I think there was a release 3 days ago. @roo2 I unassigned you if you don't mind — let's keep this task for a few other new a8c devs. |
Might depend on doing |
Is the idea here to create our own custom block that utilizes this functionality for its InnerBlocks, and then use that as a wrapper for everything that needs its toolbar hidden? I may be be interpreting this wrong, but this doesn't look like an optional prop we can add to blocks to hide UI, but something that needs to be hardcoded as a prop on InnerBlocks inside the blocks edit.js definition (like in the example noted for using it in the Buttons block https://github.com/WordPress/gutenberg/blob/c079120ce39044e53ea41a6a1a246aeec8195433/packages/block-library/src/buttons/edit.js#L20-L25). If that is the case, having the CSS that is already in place may be the simplest route here? Or maybe I am missing something? |
The idea would be to use the prop added in to
This should let us control the visibility of block UI that we don't require right now rather than hiding these elements via CSS. We don't have 3.5.0 yet, it's currently blocked. This is the PR: #38880 |
The |
#38880 has landed.
👍 Can you open a PR there? Until we have upstream changes, can we start to use the features of |
Created a PR for
The 2 options added were We can't reduce CSS hiding on our part yet because the block toolbar is still being rendered so I hope my PR gets approved soon. |
I have updated the PR in WordPress/gutenberg#19922 from disabling the BlockToolbar to disabling the entire BlockPopover. Just to explain the difference between BlockToolbar and BlockPopover component. BlockToolbar is actually a child component of BlockPopover component, the component tree looks like this:
In order to disable the block UI completely, you'll need to use both <BlockList __experimentalUIParts={ { hasPopover: false, hasSelectedUI: false } } /> The The |
|
Once WordPress/gutenberg#18173 is released in NPM together with Gutenberg 7.2 (Wed, Jan 8th), we can remove this bit of CSS and rely on new mechanism instead to hide block UI:
wp-calypso/client/landing/gutenboarding/style.scss
Lines 24 to 60 in ea170c6
...it was added in #37225
The text was updated successfully, but these errors were encountered: