Open Bug 2062017 Opened 1 month ago Updated 1 month ago

Implement dirty-close unsaved changes dialog

Categories

(Calendar :: Calendar Frontend, enhancement)

enhancement

Tracking

(Not tracked)

People

(Reporter: arschmitz, Unassigned)

References

(Depends on 2 open bugs, Blocks 2 open bugs)

Details

(Whiteboard: [calendar-ui-create-edit])

Summary:

Implement the Unsaved changes confirmation for closing a dirty create/edit dialog.

Links:

Questions and concerns:

  • Confirm whether Zeplin error variants 06–08 are validation states owned by title/date/time stories or belong in this confirmation story.

  • Planning: Redux - Mapping To Existing Work

  • Planning: Questions - Q17 Ownership Of Zeplin Error Variants 06 Through 08
    Acceptance criteria:

  • A request to close a clean dialog follows the established close path. A request to close a dirty dialog opens an internal confirmation.

  • The confirmation renders from stable storeObserver selections of selectIsDirty and selectDirtySections for the current session. Do not use getters that pull state from the store or recompute field differences locally.

  • The confirmation title is Unsaved changes, communicates that changes will be discarded, and lists localized labels for the dirty sections.

  • Confirmation-open state, focus trap, triggering-control reference, and background inertness are local dialog-controller state. They are not Redux state.

  • While the confirmation is open, the underlying dialog is inert and cannot receive pointer or keyboard interaction.

  • Back dismisses the confirmation, restores focus to the original close trigger, and preserves the draft.

  • Discard clears only the current session’s draft, closes without invoking Save or any calendar transaction, and prevents stale confirmation actions from closing a newer session.

  • The confirmation overlays the existing dialog without resizing, re-positioning, or calling PositionedDialog.

  • Field-level validation errors, helper text, and error variants remain owned by their relevant field stories.

  • Add focused tests for dirty/clean close routing, changed-section labels, inert background, Back and Discard behavior, session replacement while open, focus trap/restore, no-save close behavior, and axe coverage where supported.

Out of scope:

  • Field-level validation UI, Save failures, generic modal infrastructure, dirty-section comparison rules, persistence, and direct calendar mutation.
Blocks: 2062088
You need to log in before you can comment on or make changes to this bug.