#56 · Save and Cancel in the moment and duration dialogs
- timeline-app
- pull request
Fixes #44. - Moment and duration dialogs get **Cancel** and **Save** buttons, shown only when the timeline is editable. - Edits still apply live as they are typed. **Save** flushes pending edits and closes (a new moment is created even if nothing was typed, since its time is already set). Validation errors keep the dialog open. - **Cancel** reverts the entity to how it was opened, removes a newly created moment or duration, and removes that session's undo step, so Undo goes to the previous edit. - New durations now share one history entry between creation and the dialog session, so Cancel can find and drop it. Tests: `moment-dialog-browser.mjs` covers Save, Cancel on edited and new moments (including the undo stack) and on new and edited durations; `tags-browser.mjs` checks that the buttons are hidden while read-only. The plugin test asserted the old no-Save design and now expects the button. Unit, browser and offline suites pass in Chromium and Firefox.
Sources
Open #56 · Save and Cancel in the moment and duration dialogs in the timeline