-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 support "HTML Element" to Site Tagline #59654
Conversation
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: +3.99 kB (0%) Total Size: 1.71 MB
ℹ️ View Unchanged
|
There was a problem hiding this 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 thinking of adding this UI to the block toolbar, following other blocks (comments-title, post-title, query-title, site-title). For example, the Site Title block also supports the paragraph as well as headings:
In other words, the implementation should look like this:
- Use
HeadingLevelDropdown
component - Define the
level
attribute as anumber
type. This is because theHeadigLevelDropdown
component deals with a number. - Level
0
is treated as a "paragraph"
Thanks! Fixed to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I left one comment at the end, but I think it's working as expected.
e50c1237fe5055cfcbc37ca65a147bd7.mp4
Co-authored-by: Aki Hamano <[email protected]>
* add tagName to attributes * update fixture * use HeadingLevelDropdown * update site-tagline * fix json * Update packages/block-library/src/site-tagline/index.php Co-authored-by: Aki Hamano <[email protected]> --------- Co-authored-by: Aki Hamano <[email protected]>
* add tagName to attributes * update fixture * use HeadingLevelDropdown * update site-tagline * fix json * Update packages/block-library/src/site-tagline/index.php Co-authored-by: Aki Hamano <[email protected]> --------- Co-authored-by: Aki Hamano <[email protected]>
What?
Add TagName attribute and control for site-tagline Block.
Why?
ref: #59523
How?
Add Inspector Controls
Testing Instructions
1 add tagline block.
2 open Advanced Settings.
3 Change HTML element.
Testing Instructions for Keyboard
Screenshots or screencast