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: Add typography support #43286

Merged
merged 1 commit into from
Aug 19, 2022

Conversation

aaronrobertshaw
Copy link
Contributor

Related:

What?

Adds typography support to the Comments block.

Why?

  • Improves consistency of our design tools across blocks.
  • Adds higher level typography styling for the inner blocks of the Comments block.

How?

  • Opts into all typography supports.
  • Only the font size control will display by default.

Testing Instructions

  1. Load the editor, add a Comments block and select it.
  2. Test various typography settings ensuring styles are applied in the editor.
  3. Save and confirm application on the frontend.
  4. Switch to the site editor, select a page or template with a Comments block.
  5. Navigate to Global Styles > Blocks > Comments > Typography and apply typography styles there.
  6. Confirm the selected styles are reflected in the preview and on the frontend.

Screenshots or screencast

Screen.Recording.2022-08-17.at.10.41.54.am.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 [Block] Comments Affects the Comments Block - formerly known as Comments Query Loop [Feature] Typography Font and typography-related issues and PRs labels Aug 17, 2022
@aaronrobertshaw aaronrobertshaw self-assigned this Aug 17, 2022
Copy link
Contributor

@talldan talldan left a comment

Choose a reason for hiding this comment

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

Works as expected. Very similar results to #43266 when testing.

@carolinan
Copy link
Contributor

I understand this is for consistency, but I would prefer to wait until these inner elements are split into separate blocks.
I think it is more common to have separate styles for example for the edit links, reply, date and the comment content?

If I say add a font size setting, and the block is split, will it be difficult to transfer that stored setting to the new blocks?

@aaronrobertshaw
Copy link
Contributor Author

I understand this is for consistency, but I would prefer to wait until these inner elements are split into separate blocks.
I think it is more common to have separate styles for example for the edit links, reply, date and the comment content?

I'm not sure I follow. The edit, reply, date, and content etc are all already their own blocks.

Screen.Recording.2022-08-19.at.11.25.45.am.mp4

@aaronrobertshaw aaronrobertshaw merged commit e4d81f9 into trunk Aug 19, 2022
@aaronrobertshaw aaronrobertshaw deleted the add/comments-typography-support branch August 19, 2022 01:35
@github-actions github-actions bot added this to the Gutenberg 14.0 milestone Aug 19, 2022
@carolinan
Copy link
Contributor

You are right, I am living in the past 😆 Thank you.

@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
[Block] Comments Affects the Comments Block - formerly known as Comments Query Loop [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.

4 participants