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

Edit Post: Update PluginBlockSettingsMenuItem to use block-editor class name #14745

Merged
merged 1 commit into from
Apr 1, 2019

Conversation

aduth
Copy link
Member

@aduth aduth commented Apr 1, 2019

Previously: #14420, #14112

This pull request seeks to update a few remaining occurrences of class names which have since been updated from editor- to block-editor- prefix to align with the creation of a new block editor module in #14112.

Aside: This serves as good reaffirmation of why there exists guidelines around class naming specific to modules and in how violations become sources of issue for future maintenance.

Testing instructions:

Verify that custom plugin menu items and groups receive appropriate styles. I tested using the "TinyMCE Advanced" plugin, which includes a custom menu item for "Convert to Blocks".

Future Tasks:

These components should not be applying the class name in the way they are. The changes here are the most conservative resolution to the bug, but I would suggest one of the following future enhancements:

  1. Eliminate the block-editor-block-settings-menu__control class name altogether. If it's assumed to be of type wp.components.MenuItem, then BlockSettingsMenu can simply target that class name (.components-menu-item__button) directly in its own styles.
  2. Abstract components in block-editor which apply the necessary class names, to be used by edit-post and others.

@aduth aduth added [Type] Bug An existing feature does not function as intended [Package] Edit Post /packages/edit-post labels Apr 1, 2019
@aduth aduth merged commit 88ee4d9 into master Apr 1, 2019
@aduth aduth deleted the fix/plugin-block-settings-menu-item-classname branch April 1, 2019 15:03
@aduth aduth added the [Package] Block editor /packages/block-editor label Apr 1, 2019
@aduth
Copy link
Member Author

aduth commented Apr 1, 2019

Follow-up task: #14749

@youknowriad youknowriad added this to the 5.4 (Gutenberg) milestone Apr 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Block editor /packages/block-editor [Package] Edit Post /packages/edit-post [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants