-
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
Styling issues with Appenders #36919
Comments
Cc @jasmussen. |
Thanks for the ticket, thanks for the ping! This issue is the result of #36605, which intentionally changed all the appenders to be overlays, fixed to the bottom right corner: This is in contrast to before, where inline appenders would cause layout shifting when selecting an appender. I think there are two things we can/should do here. One quick interim fix is this:
That restores the previous behavior for coblocks: It's worth reiterating that the layout shifts that happen as the appenders appear in the canvas have been problematic, and will likely be problematic for coblocks as well, so it might be worth exploring other solutions. That being said, it's likely there will always be some edgecases where an appender that appears directly in the DOM is useful. This is, for example, the case with the navigation block as outlined in this PR. In that vein, I wonder if we can do some tweaking to the appender to force it to output inline in the canvas in certain cases. For example, whenever the appender is the small black plus, it should be an overlay, but perhaps whenever the block has a white background and black border, it could appear inline? This might also let us tweak this edgecase for the group and columns blocks:
CC: @youknowriad |
Is coblocks using |
Yeah, we are using the |
@olafleur-godaddy I think this is referring to the fix that could be made in Gutenberg. That the changes in #36605 could only apply to the default version of the appender and not other appenders. @youknowriad can correct me if I'm wrong. |
So, is my understanding correct that we should expect a fix to Gutenberg where the changes of #36605 will be modified to be only applied to the default version of the appender @youknowriad ? |
Restricting the change from 36605 only to the small black plus would be ideal, because this overlay approach also affects custom buttons added by the user, which are usually bigger. The white background and black border buttons are usually used spanning to the width of the containing group, so the overlay change makes them cover the block's content. |
Description
After #36605 , some of the appenders in CoBlocks are now behaving very strangely.
For example, here is what happens in the FAQ block (Custom Appender) :
Before (12.0.1)
After (Nightly)
Here is the source code if there is something in the implementation that could help you figure out the issue : https://github.com/godaddy-wordpress/coblocks/blob/master/src/blocks/faq/appender.js
It also happens in other blocks that have a Custom Appender or InnerBlocks.ButtonBlockAppender (like the Pricing Table block) : https://github.com/godaddy-wordpress/coblocks/blob/master/src/blocks/pricing-table/pricing-table-item/edit.js#L114
It's as if some of the CSS classes are overwritten and not applied.
Any idea if this is the expected behaviour going forward or it is a regression that we should expect to get fixed?
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: