-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Block Library: Remove post-
prefix from Comment Template inner blocks
#36171
Conversation
3ef8ba3
to
b29a62a
Compare
Size Change: +360 B (0%) Total Size: 1.09 MB
ℹ️ View Unchanged
|
import { postCommentReplyLink as icon } from '@wordpress/icons'; | ||
import { commentAuthorAvatar as icon } from '@wordpress/icons'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a git error, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Nice job!
de40719
to
2aaefc6
Compare
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-name
core/post-comment-author-avatar
->core/comment-author-avatar
core/post-comment-content
->core/comment-content
core/post-comment-date
->core/comment-date
core/post-comment-edit
->core/comment-edit-link
core/post-comment-reply-link
->core/comment-reply-link
Review 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.js
files for terms that need renaming or removal).