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

Add writing mode support to other blocks #62727

Merged
merged 2 commits into from
Jun 24, 2024

Conversation

MaggieCabrera
Copy link
Contributor

@MaggieCabrera MaggieCabrera commented Jun 21, 2024

What?

Partially addresses #62693

This PR brings support for writing mode on more blocks. In particular: the button, verse, site tagline and site title blocks.

Why?

In #50822 we introduced this new control for headings and paragraphs. There are other blocks that could use this new option. Let's discuss if there's other blocks that we could include

How?

Just enabling the prop on block.json

Testing Instructions

  • Insert the updated blocks on a template or a post. The new options should show under typography / orientation.
  • Check that changing the orientation behaves as expected in the editor and frontend
  • Check that changing the values for this in theme.json is also applied to the blocks. For example:
	"styles": {
		"blocks": {
			"core/site-title": {
				"typography": {
					"writingMode": "vertical-rl"
				}
			},
			"core/site-tagline": {
				"typography": {
					"writingMode": "vertical-rl"
				}
			},
			"core/verse": {
				"typography": {
					"writingMode": "vertical-rl"
				}
			}
		},
		"elements": {
			"button": {
				"typography": {
					"writingMode": "vertical-rl"
				}
			}
		}
	}

Testing Instructions for Keyboard

Screenshots or screencast

Screenshot 2024-06-21 at 16 21 48
@MaggieCabrera MaggieCabrera changed the title add text orientation to site title, tagline and button blocks Jun 21, 2024
@MaggieCabrera MaggieCabrera self-assigned this Jun 21, 2024
@MaggieCabrera MaggieCabrera added [Type] Enhancement A suggestion for improvement. [Feature] Typography Font and typography-related issues and PRs labels Jun 21, 2024
@MaggieCabrera MaggieCabrera marked this pull request as ready for review June 21, 2024 14:23
Copy link

github-actions bot commented Jun 21, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: MaggieCabrera <onemaggie@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link
Contributor

@jasmussen jasmussen left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. I'm happy to go block-by-block, hopefully this will help it eventually graduate to even more things.

@MaggieCabrera MaggieCabrera merged commit d0d775b into trunk Jun 24, 2024
73 checks passed
@MaggieCabrera MaggieCabrera deleted the add-textorientation-to-more-blocks branch June 24, 2024 11:15
@github-actions github-actions bot added this to the Gutenberg 18.7 milestone Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Typography Font and typography-related issues and PRs [Type] Enhancement A suggestion for improvement.
2 participants