Suggest mode 1/7: editor intent (edit/suggest/view) and experiment gate - #80427
Suggest mode 1/7: editor intent (edit/suggest/view) and experiment gate#80427adamsilverstein wants to merge 2 commits into
Conversation
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.
|
Size Change: +802 B (+0.01%) Total Size: 7.82 MB 📦 View Changed
|
|
Flaky tests detected in d7cc4fd. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/29605718528
|
# Conflicts: # packages/editor/src/components/global-keyboard-shortcuts/index.js # packages/editor/src/store/private-selectors.js
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
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
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:
👉 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:
The whole feature can be exercised end-to-end via the combined testing branch #78994 (Playground). Behind the "Suggestion Mode" experiment (Gutenberg > Experiments).