-
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
add minHeightUnit
to latest core/cover deprecation
#28627
Conversation
Will you add a CHANGELOG entry here? |
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.
I've tested by creating a Cover block with 9.7.4 then upgrading Gutenberg to 9.8.2. I see the invalidations as described.
Then I installed the build from this PR and loaded the post. I see the block upgrade messages as described.
👍 Thanks @flootr!
Let's just wait for the newly added tests to pass then this looks ready to me.
This needs a rebase in order to pick up the latest fixes to PHP unit tests (which I've just promoted to 'required' 😬 ) |
@ockham Rebased! |
Thanks, this is looking good and appears to work well. I think that it might make sense to update the existing |
I merged the test into the same file. I considered replacing the test, but the reality is that deprecations need to be tested with different inputs. As we observed here, the deprecation was tested but didn't cover all the cases. It seems to make sense to maintain the existing test and add more as we need to test the deprecation's behavior on different serialized content. |
E2e test failures (because of FSE related things) seem to be unrelated (and have been present for a while 😓 ). I'll merge, and will cherry-pick to both |
Congratulations on your first merged pull request, @flootr! We'd like to credit you for your contribution in the post announcing the next WordPress release, but we can't find a WordPress.org profile associated with your GitHub account. When you have a moment, visit the following URL and click "link your GitHub account" under "GitHub Username" to link your accounts: https://profiles.wordpress.org/me/profile/edit/ And if you don't have a WordPress.org account, you can create one on this page: https://login.wordpress.org/register Kudos! |
…HeightUnit` to latest core/cover deprecation (#28627) Co-authored-by: Jon Surrell <[email protected]> Co-authored-by: Jon Surrell <[email protected]># Conflicts:
Co-authored-by: Jon Surrell <[email protected]>
Co-authored-by: Jon Surrell <[email protected]>
Co-authored-by: Jon Surrell <[email protected]>
Description
Add
minHeightUnit
attribute to latest deprecation of thecore/cover
block introduced in #25171 (part of Gutenberg 9.8).This missing property resulted in invalidation of the Cover block when using custom units and upgrading from outdated markup.
Add tests for the regression.
How has this been tested?
In Gutenberg 9.7.4 create a post and add a
Cover
block. Set a background image and change theminHeight
unit from the block settings to something different thanpx
(e.g.vw
). Copy that block and paste it into Gutenberg 9.8.2. You should see invalidations in the browser console and a broken UI for the block.With this patch applied you should see valid block UI and a message in the console that the block had been updated successfully.
The new test should pass.
Screenshots
Types of changes
Bug fix.
minHeightUnit
would otherwise beundefined
.Checklist: