Make auto-generated wp-block*
classes consistent
#1599
Merged
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.
Follow-up to #1381 that modifies the generated classnames for blocks to improve consistency.
Mainly I don't think we should drop the
core
namespace from generated classnames for core blocks. Fromdocs/design.md
:From #1381 (comment):
The last bit is probably more an issue if someone releases a plugin whose name overlaps with one of our embeds, then the class names will get a bit confusing. We can fix this by making it really obvious how a block name maps to a class name, and making the different parts of the class name really clear.
Here are some example class names before and after this PR:
core/text
wp-block-text
wp-block__core__text
core/image
wp-block-image
wp-block__core__image
core-embed/collegehumor
wp-block-core-embed-collegehumor
wp-block__core-embed__collegehumor
myplugin/someblock
wp-block-myplugin-someblock
wp-block__myplugin__someblock
As a first try, I've used
__
because then the parts of the classname are completely unambiguous.