Skip to content

Suggest mode 3/7: block-level capture (attribute and structural)#80429

Draft
adamsilverstein wants to merge 1 commit into
suggest/datafrom
suggest/block-capture
Draft

Suggest mode 3/7: block-level capture (attribute and structural)#80429
adamsilverstein wants to merge 1 commit into
suggest/datafrom
suggest/block-capture

Conversation

@adamsilverstein

@adamsilverstein adamsilverstein commented Jul 17, 2026

Copy link
Copy Markdown
Member

What's in this PR

Adds the store-level interceptor that catches block mutations dispatched
straight to the block-editor store (the block-switcher variation picker,
programmatic writes), routing attribute drift into the overlay and reverting
the live block; captures structural edits (insert/remove/move) by tagging
the live block with a metadata.suggestion marker and recording the op; and
the overlay HOC that renders the pending-suggestion visual treatment (the
green attribute bracket and the strikethrough/dim/move-ghost overlays). The
revert guard and undo guard keep the interceptor's own writes off the undo
stack and out of its own subscribe loop, and the server hides un-accepted
structural insertions at render time. Inline text and formatting markers
are layered on top of this HOC in a later step.


Suggest mode stack

This rebuilds the manually-stacked Suggest mode work (#73411) as a GitHub Stack of 7 small, independently reviewable PRs. Each is CI-green on its own and builds on the one below it:

  1. #80427 - editor intent (edit/suggest/view) + experiment gate
  2. #80428 - suggestion storage, REST controller, provider
  3. #80429 - block-level capture (attribute + structural)
  4. #80430 - inline marker primitive
  5. #80431 - inline suggestion operations
  6. #80432 - review UI (Apply/Reject sidebar + summary)
  7. #80433 - inline live wiring, docs, e2e

The whole feature can be exercised end-to-end via the combined testing branch #78994 (Playground). Behind the "Suggestion Mode" experiment (Gutenberg > Experiments).

Adds the store-level interceptor that catches block mutations dispatched
straight to the block-editor store (the block-switcher variation picker,
programmatic writes), routing attribute drift into the overlay and reverting
the live block; captures structural edits (insert/remove/move) by tagging
the live block with a metadata.suggestion marker and recording the op; and
the overlay HOC that renders the pending-suggestion visual treatment (the
green attribute bracket and the strikethrough/dim/move-ghost overlays). The
revert guard and undo guard keep the interceptor's own writes off the undo
stack and out of its own subscribe loop, and the server hides un-accepted
structural insertions at render time. Inline text and formatting markers
are layered on top of this HOC in a later step.
@github-actions

Copy link
Copy Markdown

Size Change: +7.14 kB (+0.09%)

Total Size: 7.74 MB

📦 View Changed
Filename Size Change
build/scripts/editor/index.min.js 509 kB +5.23 kB (+1.04%)
build/styles/block-editor/content-rtl.css 6.14 kB +490 B (+8.67%) 🔍
build/styles/block-editor/content-rtl.min.css 4.6 kB +463 B (+11.19%) ⚠️
build/styles/block-editor/content.css 6.14 kB +488 B (+8.63%) 🔍
build/styles/block-editor/content.min.css 4.6 kB +466 B (+11.28%) ⚠️

compressed-size-action

@adamsilverstein adamsilverstein added No Core Sync Required Indicates that any changes do not need to be synced to WordPress Core [Type] Feature New feature to highlight in changelogs. labels Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

No Core Sync Required Indicates that any changes do not need to be synced to WordPress Core [Package] Block editor /packages/block-editor [Package] Editor /packages/editor [Type] Feature New feature to highlight in changelogs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant