Add confirmation dialog when clicking "New" if model is dirty
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
- Ambito
- accessibility, frontend
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
- 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 Lemoncode/mongo-modeler
-
Add color customization to relationship lines and tablesForse già presa @RamiroRodriguezC l’ha presa 133 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
Lemoncode/mongo-modeler#610 · 2 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
Lemoncode/mongo-modeler#609 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
Lemoncode/mongo-modeler#597 ·
-
[VSCode Extension] Hide Open and Save toolbar buttonsForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
Lemoncode/mongo-modeler#591 ·
-
[VSCode Extension] Integrate new file functionalityForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
Lemoncode/mongo-modeler#590 ·
Tutte le issue di Lemoncode/mongo-modeler
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
Agenta-AI/agenta#7542 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
code quality security
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
-
feat(icons): add [solidping]Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
homarr-labs/dashboard-icons#2939 ·
I maintainer di solito rispondono entro 1 giorno