-
Notifications
You must be signed in to change notification settings - Fork 4.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
Add backward compatibility support for lightBlockWrapper in getSaveElement #27189
Conversation
Size Change: +19 B (0%) Total Size: 1.2 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.
This is working well!
lightBlockWrapper was never a stable API (you were forced to use __experimentalBlock in addition to it) so I'm really not sure this code is needed. |
I guess it's ok for consistency but I wouldn't mind removing all of these fallbacks. |
* Provide a minimum of code wrapping for the code block. (#26623) * Block Support: Fix font size style when applying block support (#26762) * Fix Separator editor styles (#27071) * Fix the Post author selector for contributors (#26554) Co-authored-by: Riad Benguella <[email protected]> * Align single half width column to left (#27142) * remove the auto margin for individual column blocks * update margin values for blocks in blocks to zero insted of auto * Add backward compatibility support for lightBlockWrapper in getSaveElement (#27189) * Code block: paste plain text (#27236) * paste plain text option * Add e2e test * Fix crash when null date passed to TimePicker (#27316) * Fix crash when null date passed. * Update test * Fix GH actions "cancel" step (#27025) * use new syntax for setting env var * Update package-lock * Update package-lock again * Remove the button only option from the UI until it can be wired up to something that works in the front end. (#27379) * Fix combobox csuggestion list closure when clicking scrollbar (#27367) Co-authored-by: Joen A <[email protected]> Co-authored-by: Aaron Robertshaw <[email protected]> Co-authored-by: Nik Tsekouras <[email protected]> Co-authored-by: Adam Silverstein <[email protected]> Co-authored-by: Riad Benguella <[email protected]> Co-authored-by: andrei draganescu <[email protected]> Co-authored-by: Daniel Richards <[email protected]> Co-authored-by: Ella van Durpe <[email protected]> Co-authored-by: Noah Allen <[email protected]> Co-authored-by: Andy Peatling <[email protected]>
Description
Fixes #26672
#25642 added support for the
apiVersion: 2
block setting which replaces thelightBlockWrapper
supports setting.In some places in that PR, backwards compatibility for
lightBlockWrapper
was left in place:gutenberg/packages/block-editor/src/components/block-edit/edit.js
Lines 54 to 57 in 0ca9736
gutenberg/packages/block-editor/src/components/block-list/block.js
Lines 137 to 139 in 1f0d0f5
But
getSaveElement
doesn't seem to have that, which causes the duplicate classnames described in #26672:gutenberg/packages/blocks/src/api/serializer.js
Lines 119 to 123 in 1f0d0f5
How has this been tested?
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist: