Skip to content
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: Drop deprecations slated for 3.1 removal #7419

Merged
merged 4 commits into from
Jun 21, 2018

Conversation

aduth
Copy link
Member

@aduth aduth commented Jun 20, 2018

This pull request seeks to remove deprecations slated for removal in the upcoming 3.1.0 release.

Specifically, this includes:

  • All components in wp.blocks.* are removed. Please use wp.editor.* instead.
  • wp.blocks.withEditorSettings is removed. Please use the data module to access the editor settings wp.data.select( "core/editor" ).getEditorSettings().
  • All DOM utils in wp.utils.* are removed. Please use wp.dom.* instead.
  • isPrivate: true has been removed from the Block API. Please use supports.inserter: false instead.
  • wp.utils.isExtraSmall function removed. Please use wp.viewport.isExtraSmall instead.
  • getEditedPostExcerpt selector removed (core/editor). Use getEditedPostAttribute( 'excerpt' ) instead.

See: https://wordpress.org/gutenberg/handbook/reference/deprecated/#3-1-0

Testing instructions:

Verify that there are no regressions in impacted behavior, and importantly that no references to deprecated behaviors exist in core code.

Notably, test the excerpt field, which had not been previously upgraded until this pull request.

@aduth aduth added the Framework Issues related to broader framework topics, especially as it relates to javascript label Jun 20, 2018
@aduth aduth added this to the 3.1 milestone Jun 20, 2018
@gziolo gziolo requested a review from youknowriad June 21, 2018 05:52
Copy link
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe there were also PHP changes introduced to make the following polyfill work:

All components in wp.blocks.* are removed. Please use wp.editor.* instead.

@@ -50,15 +50,6 @@ export function reinitializeEditor( postType, postId, target, settings, override
* @return {Object} Editor interface.
*/
export function initializeEditor( id, postType, postId, settings, overridePost ) {
if ( 'production' !== process.env.NODE_ENV ) {
// Remove with 3.0 release.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, thanks 👍

@gziolo
Copy link
Member

gziolo commented Jun 21, 2018

I removed PHP part with 8bf8d21. @youknowriad can you double check if we didn't miss anything?

Copy link
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I tested the editor with the changes applied and it still works 👍

@gziolo
Copy link
Member

gziolo commented Jun 21, 2018

One more commit added 818acd1. Removed deprecated utils :)
Now, it should be good for real.

@gziolo gziolo added the [Priority] High Used to indicate top priority items that need quick attention label Jun 21, 2018
Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@gziolo gziolo merged commit 5389ada into master Jun 21, 2018
@gziolo gziolo deleted the remove/3-1-deprecations branch June 21, 2018 10:49

// viewport
export function isExtraSmall() {
originalDeprecated( 'wp.utils.isExtraSmall', {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately the custom ESLint rule is not smart enough to capture anything except the default function name deprecated 😅

Copy link
Member

@gziolo gziolo Jun 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, I was too creative renaming its name :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Framework Issues related to broader framework topics, especially as it relates to javascript [Priority] High Used to indicate top priority items that need quick attention
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants