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

Create a component to replace the HeadingLevelDropdown toolbar option. #45743

Closed
carolinan opened this issue Nov 13, 2022 · 3 comments · Fixed by #46003
Closed

Create a component to replace the HeadingLevelDropdown toolbar option. #45743

carolinan opened this issue Nov 13, 2022 · 3 comments · Fixed by #46003
Assignees
Labels
[Block] Heading Affects the Headings Block Needs Design Feedback Needs general design feedback. [Package] Block editor /packages/block-editor [Type] Enhancement A suggestion for improvement.

Comments

@carolinan
Copy link
Contributor

carolinan commented Nov 13, 2022

What problem does this address?

The HeadingLevelDropdown is a toolbar option used to choose between H1-H6 in the heading block, comments title, query title, and post title. The files are in the heading block, and the other blocks import them.
The site title has its own similar option, and it adds a paragraph to the selection.
In addition, if merged, the proposed Details block would also use a heading level option.

There are visual differences between the two options, because they use different icons and site title shows the name of the element in the dropdown.

Heading block:
A heading block in the block editor with the heading level option expanded

Site title:
A site title block in the block editor with the heading level option expanded

What is your proposed solution?

Create a component, to which the blocks can pass the HTML tags that should be available.
The benefits are that it would be more future proof in case the heading block changes, it reduces code duplication, the option would look the same in every block where it is used, and no longer be limited to heading elements.

We would need to decide which of the two dropdown designs to use.

@carolinan carolinan added [Block] Heading Affects the Headings Block Needs Design Feedback Needs general design feedback. [Package] Block editor /packages/block-editor [Type] Enhancement A suggestion for improvement. labels Nov 13, 2022
@carolinan carolinan self-assigned this Nov 13, 2022
@carolinan
Copy link
Contributor Author

My own preference is the second design where the name of the element is visible.

@carolinan
Copy link
Contributor Author

@jameskoster Hi! Who can help decide which of the two heading level drop down designs to use?

@jameskoster
Copy link
Contributor

@carolinan probably best to request a review from @ WordPress/gutenberg-design when the PR is ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Heading Affects the Headings Block Needs Design Feedback Needs general design feedback. [Package] Block editor /packages/block-editor [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants