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

Add confirmation dialog when clicking "New" if model is dirty

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

@nachodiezgarcia ci sta già lavorando.

Dal 11/6/2026.

  • #613 di @nachodiezgarcia — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
react, typescript

Direzione di ricerca

Start at the toolbar's "New" action and compare its behavior with the existing confirmation dialogs referenced by issue #78. Verify the dirty-state condition, cancel and confirm outcomes, the stated message, and the alertdialog accessibility requirements; done means unsaved work is protected while clean models still open directly.

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

Descrizione

Currently, when a user clicks the "New" button in the toolbar, the canvas is cleared immediately. If the user has unsaved changes (the model is "dirty"), this leads to accidental data loss.

While the action can technically be reverted using Ctrl + Z, this is not a discoverable feature for new users, nor is it a standard pattern for destructive actions like clearing a project. A user who loses their work might not realize they can undo it and may end up restarting the project from scratch. (Like it happend to me that I had to do again the model).

Proposed Solution:
Implement a confirmation dialog that triggers only when the modeling section has unsaved changes.

  • Trigger: User clicks the "New" button.

  • Condition: Check if isDirty (or equivalent state) is true.

  • Message: "You have unsaved changes. Are you sure you want to create a new model? All current progress will be lost."

Actions:

Cancel: Closes the dialog and stays on the current model.

Confirm: Clears the canvas and starts a new model.

User Experience (UX):

This aligns with the behavior of existing confirmation dialogs (like issue #78 for field removal).

Prevents the "frustration factor" of losing complex schemas by a misclick.

Accesibilitie
Ensure the dialog follows ARIA patterns (role="alertdialog") and that focus is trapped within the modal when active.

Lingua principale
TypeScript
Stelle
139
Fork
40
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 Lemoncode/mongo-modeler

Tutte le issue di Lemoncode/mongo-modeler

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.