Skip to content
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

Fix: missing className on latest comments block #13834

Merged
merged 1 commit into from
Feb 14, 2019

Conversation

jorgefilipecosta
Copy link
Member

Description

Fixes: #13773
The custom className was not being applied on the latest comments block.

How has this been tested?

I added a latest comments block; I checked using the browser inspector that on the editor by default no class name is applied and no unrequired empty spaces exist on the class field. I published the post and repeated the same checks on the frontend.

I added a custom className to the block and verified it was applied on the editor and the frontend.

I removed the className and verified the className was removed, and no unrequired empty spaces were added.

@jorgefilipecosta jorgefilipecosta added [Type] Bug An existing feature does not function as intended [Package] Block library /packages/block-library [Block] Latest Comments Affects the Latest Comments Block labels Feb 12, 2019
@gziolo gziolo added this to the 5.1 (Gutenberg) milestone Feb 12, 2019
@gziolo gziolo added the Good First Review A PR that's suitable for someone looking to contribute for the first time by reviewing code label Feb 12, 2019
Copy link
Member

@noisysocks noisysocks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

It was challenging to test because when the Gutenberg plugin is installed with WordPress 5.0, we don't require packages/block-library/src/latest-comments/index.php and so this change doesn't appear. I manually applied the diff to the Core PHP files. Not sure how we can make this easier.

@youknowriad
Copy link
Contributor

Not sure how we can make this easier.

@aduth is working on improving this in #13521

@jorgefilipecosta jorgefilipecosta merged commit bd6b68e into master Feb 14, 2019
@jorgefilipecosta jorgefilipecosta deleted the fix/missing-className-latest-comments branch February 14, 2019 08:26
@jorgefilipecosta
Copy link
Member Author

Thank you for review @noisysocks!

It was challenging to test because when the Gutenberg plugin is installed with WordPress 5.0, we don't require packages/block-library/src/latest-comments/index.php and so this change doesn't appear. I manually applied the diff to the Core PHP files. Not sure how we can make this easier.

I'm sorry for the trouble caused I should have referred this need in the PR description.

@noisysocks
Copy link
Member

No apology necessary, Jorge! 🙂 Thanks for fixing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Latest Comments Affects the Latest Comments Block Good First Review A PR that's suitable for someone looking to contribute for the first time by reviewing code [Package] Block library /packages/block-library [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants