Skip to content

Suggest mode 1/7: editor intent (edit/suggest/view) and experiment gate - #80427

Open
adamsilverstein wants to merge 2 commits into
trunkfrom
suggest/intent
Open

Suggest mode 1/7: editor intent (edit/suggest/view) and experiment gate#80427
adamsilverstein wants to merge 2 commits into
trunkfrom
suggest/intent

Conversation

@adamsilverstein

@adamsilverstein adamsilverstein commented Jul 17, 2026

Copy link
Copy Markdown
Member

Part of #73411

What's in this PR

Adds the session-scoped editor intent state (private setEditorIntent
action / getEditorIntent selector), the Edit / Suggest / View switcher in
the editor options menu, Google Docs convention keyboard shortcuts, and a
read-only view intent via isPreviewMode. The Suggestion Mode experiment
flag and the gate helpers (isSuggestionModeEnabled / useCanSuggest) land
here so every later layer gates on the same predicate. No suggestion
capture or storage yet.

Screenshot

The Edit / Suggest / View switcher in the editor Options menu, with the Google Docs style shortcuts alongside each mode:

Mode group in the editor Options menu showing Editing, Suggesting and Viewing

image

Testing

This is one layer of the stack. To exercise the whole feature, #78994 bundles all seven layers into one branch and builds it in Playground:

Test in WordPress Playground

👉 https://playground.wordpress.net/gutenberg.html?pr=78994

Enable Gutenberg > Experiments > Collaboration > Suggestion Mode, then follow the walkthrough in #73411, which also explains how to review the stack layer by layer.


Suggest mode stack

This rebuilds the manually-stacked Suggest mode work (#73411) as a GitHub Stack of 7 small, independently reviewable PRs, each building 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 session-scoped editor intent state (private setEditorIntent
action / getEditorIntent selector), the Edit / Suggest / View switcher in
the editor options menu, Google Docs convention keyboard shortcuts, and a
read-only view intent via isPreviewMode. The Suggestion Mode experiment
flag and the gate helpers (isSuggestionModeEnabled / useCanSuggest) land
here so every later layer gates on the same predicate. No suggestion
capture or storage yet.
@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown

Size Change: +802 B (+0.01%)

Total Size: 7.82 MB

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

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
@github-actions

Copy link
Copy Markdown

Flaky tests detected in d7cc4fd.
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/29605718528
📝 Reported issues:

# Conflicts:
#	packages/editor/src/components/global-keyboard-shortcuts/index.js
#	packages/editor/src/store/private-selectors.js
@adamsilverstein
adamsilverstein marked this pull request as ready for review August 5, 2026 22:24
@github-actions

github-actions Bot commented Aug 5, 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: adamsilverstein <adamsilverstein@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

No Core Sync Required Indicates that any changes do not need to be synced to WordPress Core [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