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

Comments Content: Add missing typography support #43257

Merged

Conversation

aaronrobertshaw
Copy link
Contributor

Related:

What?

Adds missing text-decoration support to the Comments Content block.

Why?

While there might not be a lot of value in text-decoration styles for the comments content block, adding this helps us ensure consistent design tools across blocks.

How?

  • Opts into text decoration support.

Testing Instructions

  1. Load the block editor with a post containing comments
  2. Add a comments block to the post and select the comment's content
  3. Confirm the text decoration control is now available within the Typography panel's ellipsis menu
  4. Experiment with typography settings
  5. Save and confirm the styles appear on the frontend
  6. Test the new support works for the block via theme.json and global styles.

Screenshots or screencast

Screen.Recording.2022-08-16.at.7.51.25.pm.mp4

@aaronrobertshaw aaronrobertshaw added [Type] Enhancement A suggestion for improvement. [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Feature] Typography Font and typography-related issues and PRs labels Aug 16, 2022
@aaronrobertshaw aaronrobertshaw self-assigned this Aug 16, 2022
Copy link
Contributor

@andrewserong andrewserong left a comment

Choose a reason for hiding this comment

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

This works nicely for me, and while there might not be many use cases for text decoration in this block, I think it's a good addition for consistency 👍

✅ Works well in the post editor at the individual block level, styles are applied and inherited in the content of the comment, across multiple kinds of HTML elements that can be included in comment content
✅ Works well in theme.json when adding a block level textDecoration value

image

I noticed that we don't have a text decoration control in the block level Typography panel in global styles. Given that this typography control is one that is less likely to be used, and the purpose is to create consistency in the Typography controls themselves, I don't think this is at all a blocker for landing this PR.

Thanks for putting all these PRs up!

@aaronrobertshaw
Copy link
Contributor Author

Thanks for the review @andrewserong 👍

I noticed that we don't have a text decoration control in the block level Typography panel in global styles.

As you hinted at. There was a decision when the text decoration and text transform supports were added that they shouldn't be available at the Global Styles level. I don't think that reasoning has really changed in light of our consistency efforts as you can argue the controls are still the same in Global Styles across blocks.

@aaronrobertshaw aaronrobertshaw merged commit 36924c9 into trunk Aug 17, 2022
@aaronrobertshaw aaronrobertshaw deleted the add/missing-typography-supports-to-comments-content branch August 17, 2022 01:35
@github-actions github-actions bot added this to the Gutenberg 14.0 milestone Aug 17, 2022
@femkreations femkreations added the Needs User Documentation Needs new user documentation label Sep 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Feature] Typography Font and typography-related issues and PRs Needs User Documentation Needs new user documentation [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants