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

Shelf: undo a delete with ⌘Z / Ctrl+Z

Aperta Adatta ai principianti
#31 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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

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

enhancement good first issue

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: onKeyDown in the keyboard effect, and the toast state. remove sets a toast whose action.run undoes the delete
  • src/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 ⌘⌫ / Delete as "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 demo or 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

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 alexsilver8/openpaste

Tutte le issue di alexsilver8/openpaste

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.