Skip to content

List View Tab: Hide when multiple blocks are selected - #87435

Merged
andrewserong merged 2 commits into
trunkfrom
fix/list-view-tab-multi-selection
Nov 26, 2026
Merged

andrewserong merged 2 commits into
trunkfrom
fix/list-view-tab-multi-selection

Conversation

@andrewserong

@andrewserong andrewserong commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

What?

Follow-up to: #87374

In a multiselection, hide the List View tab.

Why?

On trunk, if you select multiple Buttons or Gallery blocks, the list view tab in the right-hand inspector will show the list view of the first block in the selection. This is misleading as it doesn't represent the overall block selection.

To fix this, let's hide the tab altogether as in a multi-selection. As a side-effect, hiding the list view tab also fixes the issue of empty Settings tabs in a multi-selection, thanks to this check:

const settingsFills = [
...( useSlotFills( defaultGroup.name ) || [] ),
...( hasListFills && hasStyleFills > 1 ? advancedFills : [] ),
];

With this PR, hasListFills will be falsy, which allows the settings tab to hide.

How?

  • Early return on the ListViewPanel if we're in a multi-selection.

Testing Instructions

  • Add two galleries to a post, and two buttons blocks
  • With the two galleries selected, you should no longer see the List View tab, but you should still see a Settings tab for the column count
  • If you switch on responsive styles editing mode, then even the Settings tab should be hidden
  • Next up, repeat with the Buttons block. For this one, in multi-selection there'll never be a List View or Settings tab

Screenshots or screencast

Before

Gallery Buttons
image image

After

Gallery Buttons
image image

Responsive styles editing mode

On trunk responsive styles editing mode for Gallery and Buttons blocks would result in an empty Settings tab. Here, we no longer have any tabs, and it's all just the one responsive styles view pane:

Gallery Buttons
image image

Use of AI Tools

Claude Code (Opus 5.5)

@andrewserong andrewserong added the [Type] Bug An existing feature does not function as intended label Nov 26, 2026
@github-actions github-actions Bot added the [Package] Block editor /packages/block-editor label Nov 26, 2026
@andrewserong andrewserong added the [Feature] Block Multi Selection The ability to select and manipulate multiple blocks label Nov 26, 2026
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

Preview in WordPress Playground Preview in Storybook

🎉 Props

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: andrewserong <andrewserong@git.wordpress.org>
Co-authored-by: ramonjd <ramonopoly@git.wordpress.org>

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


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

Updated as activity occurs, without notifying anyone named here. Add the props-bot label to refresh.

📦 Bundle size

Size Change: +4 B (0%)

Total Size: 8.72 MB

📦 View Changed
Filename Size Change
build/scripts/block-editor/index.min.js 561 kB +4 B (0%)

59a6852 Run

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric af9b203 trunk % Change
timeToFirstByte 57.55 ms +3.82% -2.17% 59.65 ms +6.79% -4.44% -3.52%
largestContentfulPaint 92 ms +4.35% -4.35% 90 ms +6.67% -2.22% 2.22%
lcpMinusTtfb 32.45 ms +16.33% -5.86% 30.2 ms +7.95% -4.8% 7.45%
wpBeforeTemplate 29.8 ms +7.18% -1.11% 31 ms +6.68% -4.81% -3.87%
wpTemplate 23.48 ms +4.39% -3.88% 24.21 ms +4.09% -3.76% -3.02%
wpTotal 53.71 ms +3.24% -2.12% 55.65 ms +5.05% -4.94% -3.49%
wpMemoryUsage 7.75 MB +0% -0% 7.72 MB +0% -0% 0.45%
wpDbQueries 16 +0% -0% 16 +0% -0% 0%

front-end-classic-theme

Metric af9b203 trunk % Change
timeToFirstByte 47.9 ms +6.99% -2.82% 48.85 ms +9.62% -2.66% -1.94%
largestContentfulPaint 84 ms +4.76% -0% 84 ms +9.52% -0% 0%
lcpMinusTtfb 37.15 ms +5.52% -3.36% 36.1 ms +2.63% -3.46% 2.91%
wpBeforeTemplate 27.19 ms +11.36% -1.69% 27.46 ms +11.36% -3.06% -0.98%
wpTemplate 17.12 ms +3.62% -3.33% 18.02 ms +3.39% -3.22% -4.99%
wpTotal 44.62 ms +7.42% -2.42% 45.45 ms +9.66% -2.22% -1.83%
wpMemoryUsage 6.44 MB +0% -0% 6.41 MB +0% -0% 0.56%
wpDbQueries 13 +0% -0% 13 +0% -0% 0%

media-processing

Metric af9b203 trunk % Change
mediaProcessingJpeg 404.41 ms +0.87% -0.45% 405.68 ms +1.34% -0.91% -0.31%
mediaProcessingAvif 6173.31 ms +0.66% -0.26% 6166.06 ms +0.17% -0.21% 0.12%
mediaProcessingJpegToAvif 4251.7 ms +0.76% -0.25% 4242.29 ms +0.5% -0.53% 0.22%

media-upload

Metric af9b203 trunk % Change
jpegUploadProcessing 2015.58 ms +2.35% -23.23% 1589.39 ms +26% -3.69% 26.81%
pngUploadProcessing 278.26 ms +3.36% -4.24% 279.74 ms +2.52% -3.13% -0.53%
largeJpegUploadProcessing 1975.01 ms +0.88% -23.76% 1997.09 ms +0.56% -20.69% -1.11%
multipleImageUploadProcessing 2095.09 ms +1.94% -0.41% 2137.82 ms +0.05% -1.25% -2%

post-editor

Metric af9b203 trunk % Change
serverResponse 389.18 ms +1.41% -3.04% 349.19 ms +2.66% -8.3% 11.45%
firstPaint 380.81 ms +11.64% -7.8% 360.87 ms +5.1% -6.04% 5.53%
domContentLoaded 736.93 ms +4.22% -0.53% 684.67 ms +0.71% -0.87% 7.63%
loaded 737.95 ms +4.2% -0.54% 685.53 ms +0.71% -0.87% 7.65%
firstContentfulPaint 420.81 ms +5.87% -1.96% 383.63 ms +2.4% -1.13% 9.69%
firstBlock 1929.76 ms +2.11% -0.47% 1775.84 ms +0.5% -1.03% 8.67%
type 15.87 ms +3.65% -8.63% 14.89 ms +16.05% -2.96% 6.58%
typeWithoutInspector 15.88 ms +2.39% -9.51% 16.28 ms +4.36% -8.97% -2.46%
typeWithTopToolbar 21.16 ms +3.31% -4.63% 20.39 ms +6.92% -6.08% 3.78%
typeContainer 7.67 ms +4.56% -8.6% 7.79 ms +6.42% -8.6% -1.54%
focus 96.76 ms +0.71% -3.27% 92.77 ms +3.05% -2.81% 4.3%
firstFocus 219.11 ms +0% -0% 225.01 ms +0% -0% -2.62%
selectAll 281.18 ms +2.6% -0.59% 293.56 ms +4.48% -6.02% -4.22%
undo 24.73 ms +4.97% -4.89% 25.79 ms +10.39% -1.32% -4.11%
listViewOpen 32.89 ms +6.17% -5.23% 32.37 ms +10.41% -7.75% 1.61%
inserterOpen 37.81 ms +13.07% -8.73% 35.39 ms +15.51% -3.98% 6.84%
inserterHover 11.35 ms +6.52% -6.96% 9.92 ms +12.9% -5.54% 14.42%
inserterSearch 8.14 ms +2.46% -8.85% 7.66 ms +9.53% -7.18% 6.27%
loadPatterns 571.32 ms +7.13% -1.17% 575.66 ms +4.68% -4.22% -0.75%
wpTotal 379.9 ms +1.12% -3.09% 340.9 ms +2.37% -8.56% 11.44%
wpMemoryUsage 14.81 MB +0% -0% 14.76 MB +0% -0% 0.34%
wpDbQueries 55 +0% -0% 55 +0% -0% 0%

site-editor

Metric af9b203 trunk % Change
serverResponse 478.32 ms +0.51% -8.39% 476.03 ms +1.25% -3.73% 0.48%
firstPaint 419.21 ms +6.78% -3.37% 462.64 ms +1.77% -16.17% -9.39%
domContentLoaded 868.89 ms +3.09% -3.31% 846.28 ms +1.08% -1.05% 2.67%
loaded 870.01 ms +3.06% -3.31% 847.39 ms +1.09% -1.07% 2.67%
firstContentfulPaint 486.09 ms +4.22% -1.98% 477.44 ms +1.32% -2.71% 1.81%
firstBlock 2680.13 ms +4.94% -1.29% 2626.65 ms +0.88% -0.06% 2.04%
type 17.51 ms +5.31% -6.45% 16.86 ms +9.19% -3.26% 3.86%
navigate 118.22 ms +2.93% -2.19% 118.22 ms +2.34% -8.06% 0%
loadPatterns 1538.62 ms +6.76% -7.52% 1384.64 ms +5.55% -8.25% 11.12%
loadPages 973.2 ms +1.63% -0.83% 977.11 ms +3.3% -2.64% -0.4%
wpTotal 468.75 ms +0.57% -8.6% 466.17 ms +1.33% -3.7% 0.55%
wpMemoryUsage 12.84 MB +0% -0% 12.80 MB +0% -0% 0.28%
wpDbQueries 45 +0% -0% 45 +0% -0% 0%

59a6852 Run

🏁 Flaky tests

Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

should give the image its context menu while selected @WebKit @Firefox in /test/e2e/specs/editor/blocks/image.spec.js, passed after 1 failed attempt.
Test timeout of 100000ms exceeded.

59a6852 Run

@andrewserong
andrewserong marked this pull request as ready for review November 26, 2026 05:06

@ramonjd ramonjd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍🏻

Before After
3-TRUNK-buttons-multiselect-listview 1-PR87435-buttons-multiselect
4-TRUNK-gallery-multiselect-listview 2-PR87435-gallery-multiselect

@andrewserong
andrewserong merged commit 0daf767 into trunk Nov 26, 2026
105 of 110 checks passed
@andrewserong
andrewserong deleted the fix/list-view-tab-multi-selection branch November 26, 2026 06:14
@github-actions github-actions Bot added this to the Gutenberg 24.6 milestone Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Block Multi Selection The ability to select and manipulate multiple blocks [Package] Block editor /packages/block-editor [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants