-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Tabs block: Polish #75128
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
base: trunk
Are you sure you want to change the base?
Tabs block: Polish #75128
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. |
|
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @jasmussen! In case you missed it, we'd love to have you join us in our Slack community. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
|
Also, in addition to unifying to use the same icon between Tab Panel and Accordion Panel, we should unify the titles:
Right now it's called Tab Panels (plural). @mikachan what do you think? I will need to change this code: Better do this now before beta, yes? |
|
Size Change: -95 B (0%) Total Size: 3 MB
ℹ️ View Unchanged
|
t-hamano
left a comment
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 working on this! I think this block deserves further polish, but for now I think it's okay to ship the PR as is.
I don't think we should be doing that here: building in flex/flow/constrained/grid into the Tab Content block itself.
I agree with this. Additionally, the following points can also be improved.
- Remove the Label UI. This is because the tab label can be edited directly by clicking the tab itself. Text fields cannot express HTML tags.
- Refactor the panel by using the
ToolsPanel.
Ultimately, the UI should be simplified as follows. Of course, this can be addressed in a follow-up PR rather than in this one.
| className="components-toolbar__control" | ||
| label={ __( 'Add a new tab' ) } | ||
| onClick={ addTab } | ||
| showTooltip |
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.
| showTooltip |
Nit: the shouTooltip prop does nothing in this case.
| label={ __( 'Remove the current tab' ) } | ||
| onClick={ removeTab } | ||
| showTooltip | ||
| text={ __( 'Remove Tab' ) } | ||
| text={ __( 'Remove tab' ) } |
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.
Can we remove the unnecessary label and showTooltip prop?





What?
Followup to #69789. Polishes the new Tabs block.
Why?
The block is very functional and nice, but doesn't follow best practices in all cases. This PR polishes up a few of the pieces.
How?
Before:

Title Case for many labels and items, toggle instead of checkbox, a typographic widow, few small pieces. After:
Testing Instructions
Insert the Tabs block, explore.