-
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
Comments block: Remove stray legacy class from edit #42335
Merged
Merged
Conversation
This file contains 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
ockham
added
[Type] Bug
An existing feature does not function as intended
[Feature] Full Site Editing
[Block] Comments
Affects the Comments Block - formerly known as Comments Query Loop
[Feature] Site Editor
Related to the overarching Site Editor (formerly "full site editing")
labels
Jul 11, 2022
Size Change: -8 B (0%) Total Size: 1.25 MB
ℹ️ View Unchanged
|
DAreRodz
approved these changes
Jul 11, 2022
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.
It works as expected. Thanks, @ockham, for taking care of this. 💯
mburridge
added
the
Needs Dev Note
Requires a developer note for a major WordPress release cycle
label
Sep 14, 2022
Added the Needs Dev Note label in case this needs a dev note (either individual or as part of a "misc" dev note) for WP 6.1 release. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[Block] Comments
Affects the Comments Block - formerly known as Comments Query Loop
[Feature] Site Editor
Related to the overarching Site Editor (formerly "full site editing")
Needs Dev Note
Requires a developer note for a major WordPress release cycle
[Type] Bug
An existing feature does not function as intended
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.
What?
Remove an unnecessary
wp-comments-query-loop
class from the Comments block's edit mode. This fixes an oversight from #40506. Discovered here: #41807 (comment)Why?
The extra class is unnecessary (and potentially confusing):
core/comments-query-loop
slug retain the extra class via the logic inconvert-legacy-blocks.js
as a serialized attribute.wp-comments-query-loop
when serialized -- and shouldn't have it in the editor, either.How?
By removing that class 😎
Testing Instructions
We want to ascertain that the
wp-comments-query-loop
class is:core/comments-query-loop
block.The block list block wrapper looks something like this:
Testing scenario 1. is pretty much trivial: Insert the block (e.g. into the Site Editor's Single post template), locate its "block list block wrapper" in the browser's element inspector, and verify that it doesn't have the
wp-comments-query-loop
class.To test scenario 2., you can:
trunk
.core/comments
#40506) and rebuild Gutenberg.core/comments-query-loop
remove/comments-block-edit-stray-legacy-class
).wp-comments-query-loop
class.(Don't forget to remove the revert commit of bbd198d afterwards! On
trunk
(use with caution!):git reset --hard HEAD^
)