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

Projects
None yet
3 participants
@aduth
Member

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 label Jun 20, 2018

@aduth aduth added this to the 3.1 milestone Jun 20, 2018

@gziolo gziolo requested a review from youknowriad Jun 21, 2018

@gziolo

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.

This comment has been minimized.

@gziolo

gziolo Jun 21, 2018

Member

Yeah, thanks 👍

@gziolo

This comment has been minimized.

Member

gziolo commented Jun 21, 2018

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

@gziolo

gziolo approved these changes Jun 21, 2018

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

@gziolo

This comment has been minimized.

Member

gziolo commented Jun 21, 2018

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

@youknowriad

LGTM 👍

@gziolo gziolo merged commit 5389ada into master Jun 21, 2018

2 checks passed

codecov/project 46.86% (-0.07%) compared to 6ba1458
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@gziolo gziolo deleted the remove/3-1-deprecations branch Jun 21, 2018

// viewport
export function isExtraSmall() {
originalDeprecated( 'wp.utils.isExtraSmall', {

This comment has been minimized.

@aduth

aduth Jun 21, 2018

Member

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

This comment has been minimized.

@gziolo

gziolo Jun 21, 2018

Member

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