Tab List: Add toolbar buttons to reorder tabs - #80107
Conversation
| .wp-block-tab-list__mover-button { | ||
| @include break-small() { | ||
| width: $button-size-small; | ||
| min-width: 0 !important; | ||
| } | ||
| } |
|
Size Change: +2.64 kB (+0.03%) Total Size: 7.72 MB 📦 View Changed
|
d2d7f62 to
19e8312
Compare
|
Flaky tests detected in 5f6d774. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/29391189897
|
|
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. |
|
Hi @t-hamano I tested this PR locally, and the tab reordering controls work perfectly in both the editor and the frontend. Screen.Recording.2026-07-12.at.1.47.44.PM.mov |
cdd98a9 to
c885c3e
Compare
|
Apologize for the widespread notifications. I temporarily failed the rebase. |
jeryj
left a comment
There was a problem hiding this comment.
Functioning well! I think this is a big UX improvement. I'm approving, but I think we need to update the labels to match the icons with the isRTL check.
| <ToolbarButton | ||
| className="wp-block-tab-list__mover-button" | ||
| icon={ isRTL() ? chevronRight : chevronLeft } | ||
| label={ __( 'Move tab left' ) } |
There was a problem hiding this comment.
Should these labels also get the isRTL check?
There was a problem hiding this comment.
|
I merged the upstream in to get the tests to restart since they were all stalled. |
The mover icons already flip based on isRTL(), but the labels stayed "Move tab left"/"Move tab right", so in RTL locales the label described the opposite of the direction the tab actually moves. Swap the labels to match the icons and the visual movement. Co-Authored-By: Claude <noreply@anthropic.com>
|
@jeryj Thanks for the review! I would like to backport this PR to 7.1 because it does not introduce any new APIs and simply improves usability. |
I agree. I think this would really improve the usability for people wanting to reorder the tabs. |
There was a problem hiding this comment.
One way to avoid having to say "right" and "left" is to use words such as "previous" and "next", or "before" and "after", etc
There was a problem hiding this comment.
That sounds like a good simplification to me!
There was a problem hiding this comment.
Nice idea! Let's adopt that word.
There was a problem hiding this comment.
The mover button labels used "left"/"right", which are direction-relative and required flipping in RTL. Use "before"/"after" instead so the labels read correctly regardless of writing direction, and drop the RTL label flip. Chevron icons still flip for RTL. Co-Authored-By: Claude <noreply@anthropic.com>
Follow up to the direction-neutral mover labels: the E2E tests still clicked "Move tab left"/"Move tab right", which no longer exist. Use the new "Move tab before"/"Move tab after" labels so the tests pass. Co-Authored-By: Claude <noreply@anthropic.com>
|
Going to merge this, as a failing unit test is a known issue. https://wordpress.slack.com/archives/C02QB2JS7/p1784093340358909 |
|
I just cherry-picked this PR to the wp/7.1 branch to get it included in the next release: 4415a6b |
|
I just cherry-picked this PR to the release/23.6 branch to get it included in the next release: 5261fa7 |







Depends on #80031What?
Since tab panels are blocks, they can be reordered by default, and reordering the tab panels propagates to the order of the tab list. However, the reverse is not possible. It would be convenient if the reverse direction, i.e., reordering could also be performed on the tab list.
How?
moveTabaction to theuseTabActionshookTesting Instructions
Screenshots or screencast
tab-order.mp4