Directory

Fix alignment issue with comment author name by carolinan · Pull Request #40610 · WordPress/gutenberg · GitHub
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 alignment issue with comment author name #40610

Merged
merged 2 commits into from
Apr 26, 2022

Conversation

carolinan
Copy link
Contributor

What?

This is the equivalent of #40582 but for the comment author name.
Closes #40251

Assures that the comment author name text alignment setting works and that the block displays correctly on the front.
Also removes duplicate escaping.

Why?

The block had duplicate font-size classes on the front. This caused the alignment class and the font size class to be output as one word without spacing in between them, and the CSS was not applied. Because of this, the alignment option did not work.

How?

By removing the extra output of the font size class, the class name for the text alignment is correct and the CSS applied.

Testing Instructions

  1. Add a comment query loop to a post or page that has comments.
  2. Select the inner comment author name block.
  3. Test the toolbar option for text alignment.
  4. Test the font size and color options in the block settings sidebar.
  5. Save and view the front. Confirm that both the text alignment, colors and the font size works.

Screenshots or screencast

Editor, with right alignment selected:
comment author name is aligned to the right

Front, with link color, to show that both color options work:
comment author name is aligned to the right, the link color matches the editor setting

With text color instead of link color:
comment author name is aligned to the right, the text color matches the editor setting

@carolinan carolinan added [Type] Bug An existing feature does not function as intended [Block] Comments Affects the Comments Block - formerly known as Comments Query Loop labels Apr 26, 2022
@cbravobernal cbravobernal self-requested a review April 26, 2022 09:43
@cbravobernal cbravobernal added this to In progress in Comments Loop block via automation Apr 26, 2022
@cbravobernal cbravobernal force-pushed the update/comment-author-name-classes branch from 7e8b7e3 to 3e952a7 Compare April 26, 2022 10:03
@cbravobernal
Copy link
Contributor

LGTM!

@cbravobernal cbravobernal merged commit 2d62d1c into trunk Apr 26, 2022
Comments Loop block automation moved this from In progress to Done Apr 26, 2022
@cbravobernal cbravobernal deleted the update/comment-author-name-classes branch April 26, 2022 11:17
@github-actions github-actions bot added this to the Gutenberg 13.2 milestone Apr 26, 2022
@adamziel adamziel added the Backport to WP Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Apr 26, 2022
adamziel pushed a commit that referenced this pull request Apr 29, 2022
* Remove duplicate font size class

* Update unit tests

Co-authored-by: Carlos Bravo <carlos.bravo@automattic.com>
@adamziel
Copy link
Contributor

I cherry picked this change into wp/6.0 branch to be included in WordPress 6.0 Beta 4 on Monday: 6f7adc8

@adamziel adamziel removed the Backport to WP Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Apr 29, 2022
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 [Type] Bug An existing feature does not function as intended
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

[Block] Comment Author Name block - changing alignment or color has no effect on frontend
3 participants