Block Library: Remove post- prefix from Comment Template inner blocks#36171
Merged
Conversation
3ef8ba3 to
b29a62a
Compare
gziolo
commented
Nov 3, 2021
|
Size Change: +360 B (0%) Total Size: 1.09 MB
ℹ️ View Unchanged
|
cbravobernal
reviewed
Nov 3, 2021
| * WordPress dependencies | ||
| */ | ||
| import { postCommentReplyLink as icon } from '@wordpress/icons'; | ||
| import { commentAuthorAvatar as icon } from '@wordpress/icons'; |
Contributor
There was a problem hiding this comment.
Is this a git error, right?
Member
Author
There was a problem hiding this comment.
Yes, I left a note in the description:
It looks like Git wrongly mapped some file renames so the visual diff sometimes shows two different files in the comparison view 🙃
Git wasn't also able to match some renamed test block fixture files ...
cbravobernal
reviewed
Nov 3, 2021
cbravobernal
reviewed
Nov 3, 2021
cbravobernal
approved these changes
Nov 3, 2021
cbravobernal
left a comment
Contributor
There was a problem hiding this comment.
Looks good to me. Nice job!
de40719 to
2aaefc6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
The idea of this refactor is to use consistent code names for all inner blocks used with the Comment Template block that has the internal name
core/comment-template. We also have the Comments Query Loop block with the internal namecore/comments-query-loop. The next step after we landed in #36032 changes in the UI for all comments related block to stop using the Post keyword is to propagate the same change to folder names, file names, and internal block names. The changes proposed for block names and their matching folder names:core/post-comment-author->core/comment-author-namecore/post-comment-author-avatar->core/comment-author-avatarcore/post-comment-content->core/comment-contentcore/post-comment-date->core/comment-datecore/post-comment-edit->core/comment-edit-linkcore/post-comment-reply-link->core/comment-reply-linkReview notes
It looks like Git wrongly mapped some file renames so the visual diff sometimes shows two different files in the comparison view 🙃
Git wasn't also able to match some renamed test block fixture files ...
How has this been tested?
All unit tests pass locally when running
npm run test-unit- it covers changes to test block fixtures.All CI checks pass.
I confirmed in the site editor that the deprecated Post Comment block and Comments Query Loop block continue to work as before with all the renamed blocks.
Screenshots
Unreleased blocks get invalid
It's expected behavior. The blocks that existed for a few past releases get mapped from old to new names in the block parser.
Deprecated Post Comment block
Comment Query Loop block
Types of changes
Checklist:
*.native.jsfiles for terms that need renaming or removal).