Shelf: undo a delete with ⌘Z / Ctrl+Z
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 83/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- electron, react, typescript
- Ambito
- desktop, developer-experience
Direzione di ricerca
Leggi l’effetto della tastiera e lo stato del toast in src/renderer/src/shelf/shelf-app/shelf-app.tsx, poi verifica come Undo esegue l’azione e chiude il toast in src/renderer/src/shelf/shelf-app/components/toast/toast.tsx. Aggiungi la scorciatoia alla tabella Keyboard del README e provala in pnpm demo o nell’app. Il lavoro è concluso quando ⌘Z/Ctrl+Z ripristina la scheda e chiude il toast, continuando al contempo ad annullare la digitazione nel campo di ricerca quando non è visualizzato alcun toast.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Deleting a card shows a "Deleted" toast with an Undo button for five seconds, but there's no key for it, so undoing a delete you made with the keyboard means reaching for the mouse. ⌘Z (Ctrl+Z on Windows and Linux) should do the same as the button while the toast is showing.
Where to look
src/renderer/src/shelf/shelf-app/shelf-app.tsx:onKeyDownin the keyboard effect, and thetoaststate.removesets a toast whoseaction.runundoes the deletesrc/renderer/src/shelf/shelf-app/components/toast/toast.tsx: what clicking Undo does (run the action, then dismiss)README.md: the Keyboard table, which lists⌘⌫/Deleteas "Delete (with undo)"
The store keeps a deleted item restorable for 10 seconds, longer than the toast stays up, so the undo always has something to restore while the toast is visible.
Done when
- While the "Deleted" toast is showing, ⌘Z / Ctrl+Z restores the card and closes the toast
- With no toast showing, ⌘Z / Ctrl+Z still undoes typing in the search field
- The README's Keyboard table has a row for it
- You've tried it in
pnpm demoor the app
Suggested pull request title: feat(shelf): undo a delete with ⌘Z or Ctrl+Z
New to OpenPaste? CONTRIBUTING.md covers setup, the code conventions and the checks to run before a pull request (pnpm typecheck, pnpm test, pnpm format, pnpm cleaner). Leave a comment if you're picking this up so nobody doubles up.
Generated by Claude Code
- Lingua principale
- TypeScript
- Stelle
- 0
- Fork
- 3
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di alexsilver8/openpaste
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 92/100
alexsilver8/openpaste#32 ·
-
bug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
alexsilver8/openpaste#30 ·
-
bug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
alexsilver8/openpaste#29 ·
-
bug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
alexsilver8/openpaste#27 ·
-
bug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
alexsilver8/openpaste#28 ·
Tutte le issue di alexsilver8/openpaste
Issue simili
-
fix(frontend): correct VITE_IS_DEVELPOMENT typo in shared/app.ts and align dev environment flagsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
vicharanashala/ajrasakha#1439 ·
I maintainer di solito rispondono entro 1 giorno
-
Add: TV5Monde AsieApertaapproved check:passed streams:add
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
backnotprop/plannotator#1932 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 Mezza giornata Idoneità per principianti 62/100
ibm-granite/granite.build#504 ·
I maintainer di solito rispondono entro 2 giorni
-
reproduced
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
anomalyco/opencode#55676 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno