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

Verse: Add missing typography supports #43569

Merged
merged 1 commit into from
Aug 25, 2022

Conversation

aaronrobertshaw
Copy link
Contributor

Related:

What?

Adds missing typography supports to the Verse block.

Why?

  • Improves consistency of our design tools across blocks.

How?

  • Opts into missing text-decoration typography support.

Testing Instructions

  1. Edit a post, add a Verse block, select it and enter some content.
  2. Check that the text-decoration controls are now available.
  3. Test various typography settings ensuring styles are applied in the editor.
  4. Save and confirm their application on the frontend.
  5. Test styling via theme.json

Example theme.json snippet:

			"core/verse": {
				"typography": {
					"textDecoration": "line-through"
				}
			}

Screenshots or screencast

Screen.Recording.2022-08-24.at.7.31.07.pm.mp4

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

This tested well for me, except not under global styles, should the text decoration option appear there as well under the Verse block?
Screen Shot 2022-08-25 at 4 24 55 PM

@andrewserong
Copy link
Contributor

should the text decoration option appear there as well

There isn't currently a control in the global styles UI for text decoration (in TypographyPanel), so I think we've been merging in the text decoration PRs intentionally without exposing it there?

Since text decoration is likely to be less used, from memory it was argued somewhere (possibly on one of these many PRs 😅) that it's okay if it appears as optional under the ToolsPanel menu, but in global styles we might not want to display it prominently, however theme authors can still use it via theme.json. Separately, we might want to eventually switch the TypographyPanel over to using the ToolsPanel, where we could then de-prioritise the text decoration control in the UI 🤔

Copy link
Contributor

@glendaviesnz glendaviesnz left a comment

Choose a reason for hiding this comment

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

Tested well for me:

✅ Could add text decoration to verse in block editor and was applied in editor and frontend
✅ Could add setting to theme.json and it was applied in editor and frontend

@aaronrobertshaw
Copy link
Contributor Author

should the text decoration option appear there as well under the Verse block

When the text-decoration support was originally implemented, it was requested for it not to be exposed in Global Styles. The thinking was that text-decoration wasn't something that should be encouraged to be set globally by users however we should still offer it to theme authors (via theme.json).

In a recent audit of the Global Styles Typography panel, it still wasn't on the horizon for making a comeback. If it interests you, you can follow the current progress to refining that typography panel.

@aaronrobertshaw aaronrobertshaw merged commit 28ddeec into trunk Aug 25, 2022
@aaronrobertshaw aaronrobertshaw deleted the add/missing-typograph-supports-to-verse branch August 25, 2022 23:49
@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] Verse Affects the Verse 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