Edit Post: Update PluginBlockSettingsMenuItem to use block-editor class name #14745
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously: #14420, #14112
This pull request seeks to update a few remaining occurrences of class names which have since been updated from
editor-
toblock-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:
block-editor-block-settings-menu__control
class name altogether. If it's assumed to be of typewp.components.MenuItem
, thenBlockSettingsMenu
can simply target that class name (.components-menu-item__button
) directly in its own styles.block-editor
which apply the necessary class names, to be used byedit-post
and others.