-
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
Extract WordPress specific styles from the BlockTools component #54356
Extract WordPress specific styles from the BlockTools component #54356
Conversation
Size Change: +768 B (0%) Total Size: 1.52 MB
ℹ️ View Unchanged
|
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.
Triplication FTW 😂 I tested manyally and couldn't see any bugs introduced by this. I could not see the box element in storybook tho 😢
I agree the triplication is unfortunate, but I think it's better than bundling these styles like we had. It's like some duplication of components is better than a wrong abstraction. |
Warning: Type of PR label error To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. |
Related #53874
What?
When using Gutenberg for third-party block editors, there's a lot of small issues. One of them is that we have some CSS styles that are written with the generic block editor package that should be specific to the WordPress implementation of these components.
One of these components is the BlockToolbar, in order to support the fixed position (top toolbar) in all the wordpress editors (post editor, site editor and widgets editor), we have accumulated some CSS that is not meant to be included with all usage of the fixed "BlockToolbar" components or "BlockTools" components.
In this PR, I'm adding a new story to Storybook that tries to implement a TinyMCE like box using the block editor package. This highlighted these issues, so this PR also extract these specific styles to the WordPress specific packages.
Testing Instructions
1- Ensure that the "top toolbar" mode still works as intended in all of the following situations:
2- You can also try running storybook and checking the new "playground box" story to understand why these changes are necessary.