Open Bug 2061578 Opened 3 months ago Updated 1 month ago

Implement advanced date-range interactions

Categories

(Calendar :: Calendar Frontend, task)

task

Tracking

(Not tracked)

People

(Reporter: arschmitz, Unassigned)

References

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

Details

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

Summary:
Let users replace or move a date range with the mouse or keyboard. Apply the
finished selection to the current draft's dates only. Do not change the saved event.

Links:

Open decisions:

  • The interaction guide requires range selection and Shift+click/Shift+Enter.
    Zeplin does not show their feedback, focus treatment, or range-replacement
    details. Product/design must confirm those details.
  • A plain input type="date" cannot provide these interactions. Decide whether
    to use a suitably licensed picker or a Thunderbird-owned component.

Acceptance criteria:

  • Selecting a date inside the existing range replaces the range and makes
    that date the new start.
  • Dragging replaces the old range. Use the earlier endpoint as start and the
    later endpoint as end, including when dragging backwards.
  • Shift+click and Shift+Enter move the range to the selected start date and
    keep its length unchanged.
  • Escape accepts the current date selection, just like clicking outside the
    small calendars. Accepting updates the draft; it does not save the event.
  • Support keyboard operation and expose range, focus, and selection changes
    to assistive technology.
  • Preserve time, timezone, All-day, recurrence, and all other non-date values.
  • After switching events or dismissing the picker, an old drag or key action
    must not change the newer draft. Dismissal completes any required acceptance
    above, then prevents unfinished old actions from being applied later.

Required implementation details:

  • Keep unfinished drag and keyboard selections and focus inside the picker.
    When a selection is accepted, send one typed date-only draft update.
  • Render and calculate ranges from stable storeObserver selections of the
    current session's plain dates. A session identifies one create or edit
    operation. Do not add getters that read the store directly.
  • Keep calIEvent, calIDateTime, live calendars, input elements, and editor
    objects out of the stored values and dispatched actions.
  • Keep the basic layout, popup positioning, and selection model from
    Bug 2061240. This story adds the advanced interactions to that picker.

Minimum test coverage:

  • Check selecting inside a range and replacing it by dragging in either direction.
  • Check Shift+click and Shift+Enter preserve range length.
  • Check Escape and clicking outside accept the same selection.
  • Check keyboard operation, focus, and accessible range/selection information.
  • Check one date-only update on acceptance and preservation of non-date values.
  • Switch events or dismiss the picker during an interaction. Check that its
    old events cannot update a newer draft.
  • Run axe checks on displayed picker states where supported.

Out of scope:

  • Basic picker layout and positioning, initial dates, and the shared draft model.
  • Time, timezone, or recurrence changes.
  • Saving or changing source events.
Blocks: 2062088
Type: enhancement → task
You need to log in before you can comment on or make changes to this bug.