Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Snap editor records one Undo step per keystroke and per slider tick

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

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
swift
Ambito
desktop

Direzione di ricerca

Start with the change() and undo() logic in ImageWorkspaceEditing.swift (around lines 103-118 and 110), then the updateSelected calls for the caption and sliders in SnapEditorView.swift (lines 94, 103, 109). Compare with the canvas drag commit in ImageWorkspaceCanvas.swift (lines 212-213). Done means the acceptance cases pass under --check-image-workspace: 150 keystrokes make one undo step, and undo order is text, mark, then crop.

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

Descrizione

bug

Outcome: typing a caption or dragging Text size or Line width makes one Undo step, so earlier crops and marks stay undoable.

Evidence (main edc15df)
  • The text binding and the sliders call updateSelected on every change (SnapEditorView.swift:94, :103, :109).
  • change() pushes every edit and trims to 100 entries (ImageWorkspaceEditing.swift:103-118). A caption of about 100 characters therefore drops the crop from history.
  • undo() clears the selection (:110), which closes the inspector.
  • Canvas drags already commit once (ImageWorkspaceCanvas.swift:212-213).
  • docs/snap.md:22 promises Undo for crop, text and marks.
Change
  • Add a coalescing key (mark id plus property). Consecutive edits with the same key replace the top entry.
  • select, undo and redo reset the key.
  • After undo or redo, reselect the mark if it still exists.
Acceptance

In --check-image-workspace:

  • 150 keystrokes make one step.
  • Undo order is text, then the mark, then the crop.
  • Redo restores.
  • A fontSize run is one step.
  • A selection change or an unkeyed edit splits runs.
  • An edit after undo starts a new step.
Value before scope
  1. Outcome: Undo works on the capture-to-deck path. Evidence: the traced stack.
  2. Simpler route: none.
  3. Owner: ImageWorkspaceEditing.
  4. Complexity: one key.
  5. Verified by: source checks.

Grammar: Quality.

Refs #154


Build-ready record from the overnight lead session of 15 Oct 2026, verified against main edc15df by an independent skeptic per item. Implementation follows on a claude/* branch; this issue closes only after native acceptance.

Lingua principale
Swift
Stelle
0
Fork
1
Merge medio
12h 29m
PR unite (30g)
201

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 Ship-Work/workbench

Tutte le issue di Ship-Work/workbench

Issue simili

Altre issue su Swift

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.