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

Post Excerpt: Add missing typography supports #43341

Merged
merged 1 commit into from
Aug 25, 2022

Conversation

aaronrobertshaw
Copy link
Contributor

Related:

What?

Adds missing typography supports to the Post Excerpt block.

Why?

  • Improves consistency of our design tools across blocks.

How?

  • Opts into missing font-family, text-decoration typography support.

Testing Instructions

  1. Edit a post, add a Post Excerpt block, and select it.
  2. Check that the font-family & text-decoration controls are now available.
  3. Test various typography settings ensuring styles are applied in the editor.
  4. Save and confirm the application on the frontend.
  5. Switch to the site editor, selecting a template with the Post Excerpt block e.g. Index.
  6. Navigate to Global Styles > Blocks > Post Excerpt > Typography
  7. Test applying a new font-family and confirm its applied in the preview and on the frontend.

Screenshots or screencast

Screen.Recording.2022-08-18.at.10.36.16.am.mp4

@aaronrobertshaw aaronrobertshaw added [Type] Enhancement A suggestion for improvement. [Block] Post Excerpt Affects the Post Excerpt Block [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 18, 2022
@aaronrobertshaw aaronrobertshaw self-assigned this Aug 18, 2022
@carolinan
Copy link
Contributor

The text decoration option does not work/ apply to the read more link.

@andrewserong
Copy link
Contributor

The text decoration option does not work/ apply to the read more link.

Oh, that's a good point. I think it's a tricky one with this block because it isn't a separate inner block, but the field can be edited via the RichtText component.

Because text decoration works additively (i.e. we can add styles but can't remove them via the control), I think I'd lean toward including text decoration as-is for this one, since folks can already set strike-through for the read more link via the toolbar controls when they edit the text, and by default the link will have underline style already in place.

@carolinan
Copy link
Contributor

I disagree only because it is not clear to users why the setting does not remove the underline. I think it will introduce more confusion.

@aaronrobertshaw
Copy link
Contributor Author

I tend towards merging this as is as well.

The potential for confusion exists both with typographic design tools missing and the edge case relating to the read more link. Given text decoration will be seldom used and even more seldom used for the link and isn't displayed by default, I think we can accept this for now until the read more link is made an inner block.

I'll add a follow-up to possibly make the read more link within the excerpt an inner block. I'll also hold off merging until next week to give space for any further opinions, feedback, or ideas.

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 is working nicely for me, and it sounds like we can look into the read more link potentially being an inner block separately. I'll merge this in now and update the tracking issue.

@andrewserong andrewserong merged commit dcfff3a into trunk Aug 25, 2022
@andrewserong andrewserong deleted the add/missing-typography-supports-to-post-excerpt branch August 25, 2022 05:14
@github-actions github-actions bot added this to the Gutenberg 14.1 milestone Aug 25, 2022
@femkreations femkreations added the Needs User Documentation Needs new user documentation label Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Post Excerpt Affects the Post Excerpt Block [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