Diff overlay: margin cards, popover and transactional accept

Aperta
#1 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
42/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
frontend

Direzione di ricerca

Start in src/lib/segment-diff.ts, where applySegment is the fallback to keep, and read how the diff marks from the linked issue are drawn in the editor. Build the card and popover UI, then wire "take theirs" and "keep mine" as ProseMirror transactions on the mapped range. Done when one undo restores the prior text, the caret holds when an earlier change is applied, and next/previous shortcuts cycle and wrap in both layouts. This depends on the marks issue being finished first.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Context

Follow-up to the diff marks issue. Once marks are drawn on the live editor, each change needs actions that do not leave the text.

Scope

  • Margin cards at 960px and wider, anchored to the decoration through CSS anchor-name; a popover below that width. The popover must be manual so typing does not dismiss it, with a close button and Esc.
  • "Take theirs" and "keep mine" apply through a ProseMirror transaction on the range, not setContent, so undo history and the caret survive. Keep applySegment in src/lib/segment-diff.ts as the fallback when a range cannot be mapped.
  • Keyboard: a shortcut jumps to the next or previous mark and opens its card.

Acceptance criteria

  • Accepting a change keeps the undo stack: one undo restores the previous text.
  • The caret does not jump when a change is applied above it.
  • Next and previous mark shortcuts cycle through all marks and wrap.
  • Works with both the card layout (wide) and the popover (narrow).

Depends on the diff marks issue. Estimate: about 4 hours.

Lingua principale
HTML
Stelle
0
Fork
0
Merge medio
1m
PR unite (30g)
2

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di mrgnw/cfcms

Tutte le issue di mrgnw/cfcms

Issue simili

Altre issue su Web Dev

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.