Suggest mode: Suggestion summary, attribute conflict detection, and architecture docs#78352
Suggest mode: Suggestion summary, attribute conflict detection, and architecture docs#78352adamsilverstein wants to merge 1 commit into
Conversation
…and architecture docs Introduce SuggestionSummary as a compact alternative to the full inline diff, swap post-modified_gmt staleness for hasAttributeConflict (per-attribute divergence from the captured baseline), wire snackbar feedback into setEditorIntent transitions, and add the wp/suggestions architecture doc plus core/editor data-reference updates. Provider, with-suggestion-overlay, suggestion-diff, and the suggestion-mode e2e spec follow the new contract.
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
|
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. |
Overview
One of three replacement PRs for the now-closed #77407. This slice introduces the suggestion summary renderer, per-attribute conflict detection, snackbar feedback, and architecture documentation.
Tracking issue: #73411.
What's in this PR
Suggestion-mode component additions
suggestion-summary.js— Compact alternative to the full inline diff. Renders an Add / Delete / Format line per operation suitable for sidebar threads. Used by the collab-sidebar PR on top of this branch.hasAttributeConflict+parseSuggestionPayload(provider) — Replaces the post-modified_gmtstaleness compare with a per-attribute divergence check.modified_gmtflagged nearly every auto-saved suggestion as stale because every save bumps the post timestamp; the new check only prompts when the specific attributes a suggestion targets have moved off baseline.with-suggestion-overlayandsuggestion-diffrefinements to match the new contract.Editor store / UX
setEditorIntentsnackbar — Mode transitions now surface a snackbar ("You're suggesting" / "You're editing" / "You're viewing") alongside the existing a11y announcement.actions.js,reducer.js,selectors.jsupdated for the new selectors;use-block-editor-settings.jswires the suggestion provider settings through.suggestion-mode/style.scssis the home for suggestion visuals (block bracket marker, summary card); imported frompackages/editor/src/style.scss.Documentation
docs/explanations/architecture/suggestions.md— Architecture doc covering the provider abstraction, overlay subsystem, and lifecycle.docs/reference-guides/data/data-core-editor.md— Updated to cover the new editor-store selectors / actions.Tests
test/provider.js(extended),test/suggestion-summary.js(new),test/with-suggestion-overlay.js(extended).suggestion-mode.spec.jsupdated to exercise the new flow.Test plan
Manual:
SuggestionSummaryrenders in the inline diff and (after the sidebar PR lands) in the note thread.Replaces part of #77407.
🗺️ PR Stack Navigation
_wp_suggestionmeta, provider, sidebar actions📋 Tracking issue: #73411