Suggest mode 6b: Render block-insert-after pending state in canvas and sidebar#77973
Suggest mode 6b: Render block-insert-after pending state in canvas and sidebar#77973adamsilverstein wants to merge 4 commits intosuggest-mode-6b-insert-mechanismfrom
Conversation
…debar Brings the visual treatment for block-insert-after suggestions: - style.scss adds the pending-insert treatment: 70% opacity plus a dashed green outline. The dashed style distinguishes it from the solid bracket used by pending attribute edits — both treatments can apply to the same block when a user inserts and then immediately edits its attributes. - suggestion-summary.js adds an "Insert block: <name>" line via the same friendlyBlockName helper that handles block-remove. Falls back to "block" when the op carries no name. - suggestion-diff.js adds BlockInsertDiff, which renders the captured block snapshot's text via collectBlockText with <ins> styling. When the inserted block has no text yet (an empty paragraph), falls back to a "New block: <name>" label so the sidebar isn't blank. Refs #77434.
|
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. |
|
Size Change: +69 B (0%) Total Size: 7.92 MB 📦 View Changed
ℹ️ View Unchanged
|
|
Flaky tests detected in 43aa1d1. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/25407196094
|
…' into suggest-mode-6b-insert-ui
What
Adds the visual treatment for block-insert-after suggestions (#77434, task 6b). Pairs with the mechanism PR (#77971).
metadata.suggestion = { type: 'pending-insert' }renders at 70% opacity with a dashed green outline.How
style.scss: pending-insert styling (70% opacity + dashed green outline).suggestion-summary.js: handlesblock-insert-afterops with an "Insert block: " line.suggestion-diff.js:BlockInsertDiffrenders the captured snapshot viacollectBlockTextwith<ins>styling.Testing
Stack
Refs #77434, #73411.