Skip to content

Automated Testing: Narrow the media-blocks review routing rule - #87631

Merged
ramonjd merged 1 commit into
trunkfrom
update/media-block-rules-narrow
Nov 29, 2026
Merged

ramonjd merged 1 commit into
trunkfrom
update/media-block-rules-narrow

Conversation

@ramonjd

@ramonjd ramonjd commented Nov 29, 2026 •

Copy link
Copy Markdown
Member

What?

Follow-up to #87425.

Narrows the media-blocks review routing rule. It now asks for review only when a change affects the media in a block: choosing, replacing, uploading or embedding it, or editing it, such as cropping, rotating, flipping, zooming or changing the aspect ratio. A change that only touches the editor interface or appearance around the media now scores no: where a control sits, a new place to reach an option that already exists, labels and icons, and the block's layout, alignment or styles.

Why?

The rule asked about any change to how a media block "looks or behaves", so it caught nearly every change to these blocks.

Change Old New
Embed: clear: both 0.71 0.20
Media & Text image size and URL 0.95 0.22
Cover: embed option in sidebar 0.96 0.18
Gallery multi-select 0.87 0.19
Gallery viewport columns 0.92 0.14
Image size reset in Row/Stack 0.93 0.23
Media icons in inspector 0.95 0.15
Image transform support 0.95 0.46
Change Touches the media? New
Failed Replace upload removes media yes 0.86
Restore alt/caption on media editor undo yes 0.50
Gallery "Crop images to fit" broken yes 0.40
Loading state while cropped file loads yes 0.40
No autoplay with reduced motion maybe 0.39
Image cropping: sync image size yes, but the size clause says no 0.25
Site Logo shadow no 0.21
Site Logo border no 0.20
Cover relative height units no 0.21

Testing Instructions

The workflow reads the rules from trunk, so the change only takes effect after merge.

  1. Run a dry run and check that the media-blocks question shows the new text:
    npm run --workspace @wordpress/review-routing-tools route -- --pr 87598 --dry-run
  2. With decision API credentials set (see tools/review-routing/README.md), run the command without --dry-run for Embed: Add clear both to prevent float wrapping issues #75178, Media & Text: Keep image size and URL in sync when selecting media #84698 and Cover: Offer "Embed video from URL" in the sidebar media control #87598. Check that media-blocks scores under 0.7 for each.
  3. Run it for Image: Add transform block support #86955 (Image transform support) and check that media-blocks still scores 0.7 or above.

Ask for review only when a change affects the media in a block: choosing,
replacing, uploading or embedding it, or editing and transforming it.
Changes to the editor interface or appearance around the media, such as
where a control sits or the block's layout and styles, no longer count.
@ramonjd
ramonjd requested a review from aduth as a code owner November 29, 2026 22:15
@ramonjd ramonjd added the [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. label Nov 29, 2026
@github-actions

github-actions Bot commented Nov 29, 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: ramonjd <ramonopoly@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.


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.

@ramonjd
ramonjd requested a review from andrewserong November 29, 2026 22:23
@ramonjd ramonjd self-assigned this Nov 29, 2026

@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.

Change looks good, and thanks for including test stats in the PR description! Let's try it 👍

@ramonjd
ramonjd merged commit f4a32be into trunk Nov 29, 2026
87 checks passed
@ramonjd
ramonjd deleted the update/media-block-rules-narrow branch November 29, 2026 22:59
@github-actions github-actions Bot added this to the Gutenberg 24.6 milestone Nov 29, 2026
Vedant-Gandhi pushed a commit to Vedant-Gandhi/gutenberg that referenced this pull request Nov 30, 2026
…ress#87631)

Co-authored-by: ramonjd <ramonopoly@git.wordpress.org>
Co-authored-by: andrewserong <andrewserong@git.wordpress.org>
costasovo added a commit to costasovo/gutenberg that referenced this pull request Nov 30, 2026
…lient-autodraft-cleanup

* upstream/trunk: (123 commits)
  Block Library: Convert Post Content, Post Template, and Post Title blocks to TypeScript (WordPress#87627)
  Block Library: Convert Post Date, Time to Read, Post Terms, and Post Navigation Link blocks to TypeScript (WordPress#87635)
  Block Library: Convert Post Excerpt, Post Featured Image, and Latest Posts blocks to TypeScript (WordPress#87636)
  Block Library: Convert Home Link, Footnotes, and Navigation Overlay Close blocks to TypeScript (WordPress#87637)
  Block Library: Convert Post Author, Post Author Biography, Post Author Name, and Avatar blocks to TypeScript (WordPress#87625)
  Bump qs from 6.16.0 to 6.17.1 in /test/ai-development (WordPress#87307)
  Block Library: Convert Post Comments Count, Post Comments Form, and Post Comments Link blocks to TypeScript (WordPress#87626)
  Media Editor: Default to the Details tab (WordPress#87639)
  Media Editor Route: Place the history controls at the left of the header (WordPress#87634)
  Social Links: Enable viewport state values for icon size (WordPress#86230)
  Automated Testing: Narrow the media-blocks review routing rule (WordPress#87631)
  Build: switch React scripts build to Rolldown (WordPress#87562)
  Block Library: Convert Term Description block to TypeScript (WordPress#87612)
  Block Library: Convert Site Title block to TypeScript (WordPress#87618)
  Block Library: Convert Term Name block to TypeScript (WordPress#87610)
  Block Library: Convert Site Tagline block to TypeScript (WordPress#87617)
  Block Library: Convert Accordion block to TypeScript (WordPress#87616)
  Block Library: Convert Accordion Heading block to TypeScript (WordPress#87615)
  Block Library: Convert Accordion Panel block to TypeScript (WordPress#87614)
  Block Library: Convert Accordion Item block to TypeScript (WordPress#87613)
  ...

# Conflicts:
#	packages/core-data/CHANGELOG.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants