Closed Bug 2084433 Opened 1 month ago Closed 15 days ago

Load categories and connect category selection

Categories

(Calendar :: Calendar Frontend, task)

task
Points:
3

Tracking

(Not tracked)

RESOLVED FIXED
162 Branch

People

(Reporter: arschmitz, Assigned: arschmitz)

References

(Blocks 2 open bugs)

Details

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

Attachments

(1 external file)

Summary:
Load the available categories and the event's selected categories. Connect the category controls to the draft—the event's unsaved values. Do not change the saved event until Save succeeds.

Links:

Acceptance criteria:

  • Load available category names and colors through existing Calendar helpers. Keep the existing calColorUtils requirement here.
  • For an existing event, load its selected categories through the shared event loader. Keep selected categories even when they are absent from the available-category list.
  • For a new event, start with no selected categories.
  • Show the draft's selected categories as chips.
  • Adding or removing a category changes only the draft. Support keyboard removal.
  • Show two or three chips as space allows, then show the correct +x more count. Show the remaining categories in an area that scrolls inside the dialog.
  • Finish the initial category display before the dialog is shown and positioned.
  • When the dialog switches events, ignore late loading results and actions from the previous event.

Required implementation details:

  • Use the existing Redux draft. Store only plain category names or IDs and needed color information.
  • Receive initial values and later changes through stable storeObserver selectors. Do not read the store from getters.
  • Reuse selector results when the selected data has not changed.
  • Send changes only to the category section.
  • Keep category lookup, open-list state, keyboard navigation, search text, and size measurements outside Redux.
  • Do not store live events, calendar objects, preferences, or page elements in Redux.
  • Do not write category preferences or add a new category service.
  • This story owns edit-category loading moved from Bug 2062008. Initialize the current event's category baseline and draft from the shared loader's plain source snapshot.

Minimum test coverage:

  • Check available-category loading and create/edit initialization.
  • Check selected categories that are absent from preferences.
  • Check add/remove actions, keyboard use, and draft-only changes.
  • Check colors, long labels, chip limits, overflow counts, and scrolling.
  • Check late results after switching events.
  • Check initial readiness before showing the dialog and automated accessibility checks.

Out of scope:

  • The markup from Bug 2062007, category settings, and saving event changes.
  • Broader category or event-color work beyond the designed row and chips.
Assignee: nobody → arschmitz
Status: NEW → ASSIGNED

Load available and saved categories into the create/edit draft. Show colored chips with keyboard controls and responsive, scrollable overflow.

Target Milestone: --- → 162 Branch

Pushed by jtracey@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/d26af47099a5
Load and select calendar event categories. r=tobyp

Status: ASSIGNED → RESOLVED
Closed: 15 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: