feat(tiptap): SuggestionReviewPopover — step-through diff review - #255
Merged
Conversation
Replaces scattered per-region DiffRegionControls overlays with a single floating popover that steps through pending inline-diff suggestions one at a time. Compact action row (step counter + icon ✕/✓ buttons with prev/next navigation), centered over the changed word, works in both inline and lines diff modes. - New SuggestionReviewPopover: virtual-element anchor (prefers deleted element, falls back to coordsAtPos so lines mode always positions correctly), extractChangedPair shows "tst → test" not the full paragraph, textBetween(..., ' ', ' ') avoids hard-break concatenation - WORD_DIFF_MIN_SIMILARITY lowered to 0 so all word pairs get intra-line highlights regardless of similarity score - SuggestionBanner redesigned: inline "x → y" accordion rows, resolved count tracking; no longer rendered inside TiptapEditor (dropped in favour of the popover + future global banner #254) - Closes #249; filed #253 (popover for all field types) and #254 (global banner)
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.
Summary
SuggestionReviewPopoverfloating card replaces scattered per-regionDiffRegionControlsoverlays — steps through pending suggestions one at a time with compact‹ 1/3 › ✕ ✓controlstst→ test" (specific changed word, not the whole paragraph) viaextractChangedPair+textBetweento handle hard-breaks correctlyfindAnchorElpriority chain +coordsAtPosfallback so the popover always positions correctly even when no decoration element exists for the regionSuggestionBannerremoved fromTiptapEditor(per-field accordion dropped in favour of the popover); component kept for future global banner (feat: global suggestion banner showing total changes count across all fields #254)WORD_DIFF_MIN_SIMILARITYlowered to0so all word pairs always get intra-line highlightsTest plan
old→ new" preview and‹ 1/3 › ✕ ✓controls‹/›navigate between changes;✕rejects /✓accepts and advancesaiDiffView('inline')andaiDiffView('lines')modes