Suggest mode 3/7: block-level capture (attribute and structural)#80429
Draft
adamsilverstein wants to merge 1 commit into
Draft
Suggest mode 3/7: block-level capture (attribute and structural)#80429adamsilverstein wants to merge 1 commit into
adamsilverstein wants to merge 1 commit into
Conversation
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.
This was referenced Jul 17, 2026
This was referenced Jul 17, 2026
|
Size Change: +7.14 kB (+0.09%) Total Size: 7.74 MB 📦 View Changed
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
The whole feature can be exercised end-to-end via the combined testing branch #78994 (Playground). Behind the "Suggestion Mode" experiment (Gutenberg > Experiments).