Skip to content

List View: Only subscribe to the block subtree for rows that can show images - #81076

Merged
Mamaduka merged 1 commit into
trunkfrom
update/use-list-view-images-hook
Aug 4, 2026
Merged

List View: Only subscribe to the block subtree for rows that can show images#81076
Mamaduka merged 1 commit into
trunkfrom
update/use-list-view-images-hook

Conversation

@Mamaduka

@Mamaduka Mamaduka commented Aug 3, 2026

Copy link
Copy Markdown
Member

What?

Gate the getBlock call in useListViewImages on the block being one of the four types that can render a preview image (core/image, core/cover, core/media-text, core/gallery).

Avoids unwanted re-renders by this hook when no images can be displayed for a block.

Testing Instructions

  1. Open a post or page.
  2. Add image and gallery blocks and select media.
  3. Confirm that image previews are correctly displayed in the List View.

Testing Instructions for Keyboard

Same.

Use of AI Tools

None.

@Mamaduka Mamaduka self-assigned this Aug 3, 2026
@Mamaduka
Mamaduka requested a review from ellatrix as a code owner August 3, 2026 12:35
@Mamaduka Mamaduka added [Type] Performance Related to performance efforts [Feature] List View Menu item in the top toolbar to select blocks from a list of links. labels Aug 3, 2026
@github-actions github-actions Bot added the [Package] Block editor /packages/block-editor label Aug 3, 2026
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Size Change: +16 B (0%)

Total Size: 7.78 MB

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

compressed-size-action

@andrewserong andrewserong left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice improvement, and this is smoke testing well for me 👍

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

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 props-bot label.

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

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

@Mamaduka
Mamaduka merged commit ff05a8c into trunk Aug 4, 2026
54 of 55 checks passed
@Mamaduka
Mamaduka deleted the update/use-list-view-images-hook branch August 4, 2026 04:19
@github-actions github-actions Bot added this to the Gutenberg 23.8 milestone Aug 4, 2026
shail-mehta pushed a commit that referenced this pull request Aug 12, 2026
… images (#81076)

Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: andrewserong <andrewserong@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] List View Menu item in the top toolbar to select blocks from a list of links. [Package] Block editor /packages/block-editor [Type] Performance Related to performance efforts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants