-
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: hide block UI via CSS #37225
Conversation
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~7 bytes added 📈 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
Copy better docs from https://github.com/Automattic/wp-calypso/pull/37233/files :-)
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 appears to be working well; however, I'm a bit worried that it might spill into other Gutenberg instances inside of Calypso? As you point out, FSE also uses the block-editor-block-list__layout
selector; the toolbar still seems to work there, but that might be due to the way it's built and deployed to WP.com (independently from Calypso). I think there might be potential for spillage if there will be other Gutenberg instances in Calypso, aside from Gutenboarding 🤔
Let's maybe move it into a .gutenboarding block-editor__container
selector?
I've added a className and used that here instead of the standard className. That should keep this nicely isolated. |
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 seems good for now, thanks for documenting the issue/PR that will allow us to remove this workaround as well ✨
Hide block UI with CSS overrides.
Not great, but it seems like there isn't a core provided mechanism just yet (WordPress/gutenberg#7469).
Once WordPress/gutenberg#18173 lands and is available via NPM, we can hide UI via JS with props in
BlockList
.I grabbed the override from FSE — this could very well be a sass mixin or function that is shared between FSE and Gutenboarding, but I didn't feel like doing that because we can have core provided mechanism soonish.
Changes proposed in this Pull Request
Testing instructions
/gutenboarding
Before
After