Skip to content

Plugin: Deprecate gutenberg_add_admin_body_class#13572

Merged
aduth merged 2 commits intomasterfrom
deprecate/gutenberg_add_admin_body_class
Jan 31, 2019
Merged

Plugin: Deprecate gutenberg_add_admin_body_class#13572
aduth merged 2 commits intomasterfrom
deprecate/gutenberg_add_admin_body_class

Conversation

@aduth
Copy link
Copy Markdown
Member

@aduth aduth commented Jan 29, 2019

This pull request seeks to deprecate gutenberg_add_admin_body_class in favor of the equivalent core behavior which assigns block editor classes. As of #13449, Gutenberg declares itself as the block editor screen. You can confirm from the master branch that these classes are in-fact added twice to the page.

The notable omission here is the gutenberg-editor-page class. An alternative implementation here is to keep the filter, but apply only the Gutenberg-specific class, if it could serve of any value. Most any plugin should extend block editor styles using the block-editor-page class name instead, however. See also #10783.

Testing instructions:

Verify when viewing the editor while Gutenberg is active, that the block-editor-page, is-fullscreen-mode, wp-embed-responsive, and is-dark-theme (as applicable) are applied.

@aduth aduth added the Gutenberg Plugin Issues or PRs related to Gutenberg Plugin management related efforts label Jan 29, 2019
Copy link
Copy Markdown
Member

@jorgefilipecosta jorgefilipecosta 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 did the following checks:

  • the only class that is removed from body when compared with the previous version is "gutenberg-editor-page".
  • "gutenberg-editor-page" class is not used in any of our styles.
  • gutenberg_add_admin_body_class function is not called anywhere.

@aduth aduth merged commit 62f6163 into master Jan 31, 2019
@aduth aduth deleted the deprecate/gutenberg_add_admin_body_class branch January 31, 2019 18:53
daniloercoli added a commit that referenced this pull request Feb 1, 2019
…rnmobile/372-use-RichText-on-Title-block

* 'master' of https://github.com/WordPress/gutenberg:
  Try alternate list item jump fix. (#12941)
  Mobile bottom sheet component (#13612)
  Remove unintentional right-margin on last odd-item. (#12199)
  Introduce left and right float alignment options to latest posts block (#8814)
  Fix Google Docs table paste (#13543)
  Increase bottom padding on gallery image caption (#13623)
  Fix the editor save keyboard shortcut not working in code editor view (#13159)
  Plugin: Deprecate gutenberg_add_admin_body_class (#13572)
  Rnmobile/upload media failed state (#13615)
  Make clickOnMoreMenuItem not dependent on aria labels (#13166)
  Add: className prop support to server side render. (#13568)
  Fix: Categories Block: hierarchical Dropdown (#13567)
  Docs: Add clarification about git workflow (#13534)
  Plugin: Remove `user_can_richedit` filtering (#13608)
  eslint-plugin: Add rule `no-unused-vars-before-return` (#12828)
  Image settings button (#13597)
  Fixed wording for the color picker saturation (#13479)

# Conflicts:
#	packages/block-library/src/image/edit.native.js
@youknowriad youknowriad added this to the 5.0 (Gutenberg) milestone Feb 4, 2019
youknowriad pushed a commit that referenced this pull request Mar 6, 2019
* Plugin: Deprecate gutenberg_add_admin_body_class

* Plugin: Reference block-editor-page class for admin class removal
youknowriad pushed a commit that referenced this pull request Mar 6, 2019
* Plugin: Deprecate gutenberg_add_admin_body_class

* Plugin: Reference block-editor-page class for admin class removal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Gutenberg Plugin Issues or PRs related to Gutenberg Plugin management related efforts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants