Skip to content

In-editor revisions: Show title and excerpt changes in the revisions sidebar - #81281

Open
priethor wants to merge 3 commits into
trunkfrom
priethor/revisions-title-excerpt-diff
Open

In-editor revisions: Show title and excerpt changes in the revisions sidebar#81281
priethor wants to merge 3 commits into
trunkfrom
priethor/revisions-title-excerpt-diff

Conversation

@priethor

@priethor priethor commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

What

Follow-up to this comment on #80314.

The existing Meta panel is renamed to Fields to also show Title and Excerpt alongside the meta rows, with word-level diffs when either value changes. Title and Excerpt only appear when their values differ.

Why

Restoring an older revision can replace the post title and excerpt. Until now, neither change appeared in the comparison before clicking Restore.

How

The shared diff panel can now receive its open state from a caller. Selecting a revision with a Title or Excerpt change opens Fields. Selecting one without those changes leaves the panel alone, so an open meta comparison such as footnotes does not suddenly collapse. The block attributes panel continues to manage its own state.

Testing Instructions

  1. Create a post with the title First title, the excerpt First excerpt, and a footnote containing alpha. Save it.
  2. Change the title to Second title and the excerpt to Second excerpt. Add a footnote containing beta, then save again.
  3. Add a third footnote containing gamma without changing the title or excerpt, then save once more.
  4. Open the revisions screen. Open Fields, check that Title and Excerpt are not listed for the latest revision, and confirm that the footnotes row contains gamma. Close Fields.
  5. Move to the previous revision. Check that Fields opens on its own and shows the Title and Excerpt diffs. Return to the latest revision and check that the panel stays open while the Title and Excerpt rows disappear.

I used Claude to help implement these changes. I guided the work, then tested and reviewed the result.

@github-actions github-actions Bot added the [Package] Editor /packages/editor label Aug 6, 2026
@priethor priethor added the [Feature] History History, undo, redo, revisions, autosave. label Aug 6, 2026
@priethor priethor self-assigned this Aug 6, 2026
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Size Change: +160 B (0%)

Total Size: 7.82 MB

📦 View Changed
Filename Size Change
build/scripts/editor/index.min.js 510 kB +160 B (+0.03%)

compressed-size-action

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Flaky tests detected in acc8d07.
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.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/31169158199
📝 Reported tests:

should load styles added through enqueue_block_assets in /test/e2e/specs/editor/plugins/iframed-equeue-block-assets.spec.js, passed after 1 failed attempt.

@priethor priethor added the [Type] Enhancement A suggestion for improvement. label Aug 6, 2026
@priethor
priethor force-pushed the priethor/revisions-title-excerpt-diff branch from 7b35190 to acc8d07 Compare August 7, 2026 10:12
@priethor
priethor marked this pull request as ready for review August 7, 2026 16:53
@github-actions

github-actions Bot commented Aug 7, 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: priethor <priethor@git.wordpress.org>

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] History History, undo, redo, revisions, autosave. [Package] Editor /packages/editor [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant