Closed Bug 2061199 Opened 3 months ago Closed 9 days ago

Implement writable calendar selector with Zeplin default behavior

Categories

(Calendar :: Calendar Frontend, task)

task
Points:
5

Tracking

(Not tracked)

RESOLVED FIXED
162 Branch

People

(Reporter: arschmitz, Assigned: arschmitz)

References

(Blocks 3 open bugs)

Details

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

Attachments

(2 external files, 1 obsolete file)

Summary:
Show which calendar the event will use. Let the user choose another calendar
when moving the event is allowed. For a new event, choose a usable default.

The selection changes only the draft: the unsaved values in the dialog. It
does not create or move an event. Save does that work.

Links:

Open decision:

  • Zeplin shows no visible label. Provide an accessible name for screen readers.
    Product/design must confirm whether to use a visible label, a hidden label,
    or another accessible pattern.
  • The default order below comes from the current Zeplin annotation.
    Product/design must identify any change before implementation.

Acceptance criteria:

  • Show the selected calendar's name and color. Give the selector an accessible name.
  • Offer only visible calendars that allow writing and can contain events.
  • For a new event, choose the user's default calendar if it meets those rules.
    Otherwise, choose the first calendar that meets them.
  • If none is available, keep the user's default-calendar ID and show the
    selector as unavailable or disabled.
  • When editing, start with the loaded event's calendar. Allow a different
    selection only if the user can move the event. Being able to edit is not
    enough: one occurrence of a repeating event can be editable but cannot move.
  • Selecting a calendar changes only the calendar value in the current draft.
    Leave the saved event unchanged until Save succeeds.
  • When the dialog starts another create or edit operation, show that operation's
    calendar. An old default lookup or selection must not change the new draft.

Required implementation details:

  • Use an HTML select element for the first version, not XUL or a custom selector.
  • Store the selected calendar ID and basic display data in Redux. Do not put a
    live calICalendar object in Redux or the draft.
  • This feature chooses the default calendar and gives its ID to the shared
    draft model. The draft model does not choose the default.
  • Render from Redux updates when the current session or draft changes. A session
    identifies one create or edit operation. Do not use a getter to read the store.
  • Check that default results and selection actions belong to the current session.
  • Bugs 2061214 and 2061218 read the selected ID when saving. This selector never
    creates or moves the event itself.

Minimum test coverage:

  • Check filtering of hidden, read-only, and event-incompatible calendars.
  • Check the usable default, first usable fallback, and no-usable-calendar cases.
  • Check the loaded event's calendar and whether moving is allowed, including
    editing one occurrence that cannot move.
  • Check that selection changes only the draft and not the saved event.
  • Start a new dialog operation before an old default lookup or selection finishes.
    Check that the old result cannot change the new draft.
  • Check Redux-driven display updates and that Redux and the draft contain no
    live calendar objects.
  • Check the calendar name, color, accessible name, and disabled state.
  • Run axe checks on the displayed selector states where supported.

Out of scope:

  • Implementing the shared draft model, title, or date/time fields.
  • Creating, moving, saving, or deleting events, and choosing which occurrences
    of a repeating event to change.
  • Save/Delete controls and a custom select component.
Blocks: 2061214
Blocks: 2062087
Blocks: 2061218
Points: --- → 5
Assignee: nobody → arschmitz
Blocks: 2072248
No longer blocks: 2072248
Blocks: 2072248
Status: NEW → ASSIGNED

Add a native calendar selector with calendar names and colors, usable defaults, move-permission checks, and Redux-driven draft updates. Reject results and selections from old operations.

Tb-Implement-Step: 284c485d-aef1-4e35-95f1-ac14e29bbc64

TB-Tools-Id: b4f8070e-4fe8-4de1-ab1d-d2ff9f8922d5

Add a native calendar selector with calendar names and colors, usable defaults, move-permission checks, and Redux-driven draft updates. Reject results and selections from old operations.

Attachment #9657017 - Attachment description: WIP: Bug 2061199 - Add writable calendar selection → Bug 2061199 - Add writable calendar selection. r=#thunderbird-front-end-reviewers
Type: enhancement → task
Attachment #9653648 - Attachment is obsolete: true
Blocks: 2080883
No longer blocks: 2072248
Attachment #9657017 - Attachment description: Bug 2061199 - Add writable calendar selection. r=#thunderbird-front-end-reviewers → Bug 2061199 - Add calendar selection UI for create/edit event dialog. r=#thunderbird-front-end-reviewers
Attachment #9677557 - Attachment description: Bug 2061199 - Fix create/edit dialog accessibility contrast. r=tobyp → Bug 2061199 - Ignore axe contrast failures for matching system colors.
Attachment #9677557 - Attachment description: Bug 2061199 - Ignore axe contrast failures for matching system colors. → Bug 2061199 - Ignore axe contrast failures for matching system colors. r=aleca
Target Milestone: --- → 162 Branch

Pushed by jtracey@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/62b259fc4393
Ignore axe contrast failures for matching system colors. r=aleca

Status: ASSIGNED → RESOLVED
Closed: 9 days ago
Resolution: --- → FIXED
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/fa5ea460efa4
Add calendar selection UI for create/edit event dialog. r=tobyp,vineet

Status: REOPENED → RESOLVED
Closed: 9 days ago → 9 days ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: