-
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
Framework: Remove deprecations slated for 3.4 removal #8276
Conversation
Note: the gutenberg/packages/editor/src/components/block-edit/edit.js Lines 31 to 39 in 2d54b09
|
lib/client-assets.php
Outdated
// Backcompat for Color Palette set through `gutenberg` array. | ||
if ( empty( $color_palette ) && ! empty( $gutenberg_theme_support[0]['colors'] ) ) { | ||
$color_palette = $gutenberg_theme_support[0]['colors']; | ||
} | ||
|
||
if ( ! empty( $gutenberg_theme_support ) ) { |
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.
@jorgefilipecosta, I think I missed something here, can you help?
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.
Hi @gziolo, this code is to keep compatibility with the old Gutenberg theme support. The code block // Backcompat for Color Palette set through "gutenberg" array.
should also be removed.
I also did a checkup on the logic and we had missed a removal in a previous version so I removed that code. I added my changes in a new commit 417203c.
I added a commit with a code removal for PHP part. I think I did something wrong though. @jorgefilipecosta @pento can you do sanity check? |
The block I think we should remove it now, consistent with our deprecated messaging. |
@@ -57,8 +57,6 @@ By default, the *first tabblable element* in the popover will receive focus when | |||
|
|||
Set this prop to `false` to disable focus changing entirely. This should only be set when an appropriately accessible substitute behavior exists. | |||
|
|||
**Deprecation notice:** Before Gutenberg 3.2 this value was `Boolean` and the value `true` was equivalent to `"firstElement"`. This behaviour is deprecated and will cause a console warning message. |
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.
Anecdote: I only stumbled upon this by chance. Fewer touch points with deprecations is better, ideally colocated with the deprecated
function call which is the target of our linting rules.
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.
E2E tests are struggling with unrelated issues, but otherwise this is looking good.
5e016f7
to
3d769e1
Compare
The last of these could do for a bit of extra testing / observing whether other blocks have similar deprecated usage. |
Changes are looking good, @aduth. No apparent problems, and I couldn't find any other blocks that appeared to be using the I ran across a fun little issue that was caused by |
This sounds like it's always been a buggy implementation, if it was blindly applying the props when said props include block-specific values. It's also why |
This PR removes deprecations scheduled to be removed in the upcoming 3.4.0 release.
focusOnMount
prop in thePopover
component has been changed from Boolean-only to an enum-style property that accepts "firstElement
", "container
", orfalse
. Please convert any<Popover focusOnMount />
usage to<Popover focusOnMount="firstElement" />
.wp.utils.keycodes
utilities are removed. Please usewp.keycodes
instead.id
prop inedit
function removed. Please use blockclientId
prop instead.property
source removed. Please use equivalenttext
,html
, orattribute
source, or comment attribute instead.Source: https://wordpress.org/gutenberg/handbook/reference/deprecated/#3-4-0