-
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
Deprecated the selectors/actions and components that moved to the block editor module #15770
Deprecated the selectors/actions and components that moved to the block editor module #15770
Conversation
09069de
to
054b6fb
Compare
This looks like a great way to keep ourselves honest and correct in code 👍 There's still one which needs to be updated. From the failing build:
|
@aduth I think this comes from a plugin :p I wonder if it's time to remove the "plugins" test :) |
Alternatively, we may consider another exception in the console trapping to permit warnings (and optionally errors, though probably not to start) from plugins, determined based on ConsoleWarning#location (though, as I write this, the location is probably the deprecated script, not the plugin). |
withColorContext, | ||
withColors, | ||
withFontSizes, | ||
Autocomplete as RootAutocompete, |
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.
Autocomplete as RootAutocompete, | |
Autocomplete as RootAutocomplete, |
}; | ||
} | ||
|
||
export const Autocomplete = deprecateComponent( 'Autocomplete', RootAutocompete ); |
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.
export const Autocomplete = deprecateComponent( 'Autocomplete', RootAutocompete ); | |
export const Autocomplete = deprecateComponent( 'Autocomplete', RootAutocomplete ); |
What do you all think about removing the plugins tests? cc @gziolo How can we unblock this? |
We can either remove integration with 3rd party plugins or silence this warning on Travis. I would prefer the first one. |
4a11571
to
f53a700
Compare
f53a700
to
d61578d
Compare
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 double checked all deprecated components are still exposed to avoid issues with 3rd party plugins.
I think we should still include an entry in the changelog about all those functions and components which will now warn on JS console so folks using npm package could take same actions.
Otherwise, everything works and looks good.
I'm hesitant about the docs as we don't have a formal process for Core deprecations yet. A document is indeed needed but probably not the one we have right now for plugin deprecations and also there's already a bunch of other Core deprecations. |
I was thinking about something like: in ### Deprecations
- It's now recommended to use the following components from `@wordpress/block-editor` package:
- `Component1`
- `Component2` |
Testing instructions
Check that if you call,
wp.data.select( 'core/editor' ).getSelectedBlock()
in the console it works but shows a warning.Change an
import RichText
and useeditor
instead ofblock-editor
in one of the core blocks and check that there are warnings on the console when used.