2.8 KiB
2.8 KiB
Calendar Editor Requirements
Purpose
Define implemented requirements for the authenticated calendar editor used from the /calendar UI.
Scope
This document covers:
- Event CRUD in the modal editor
- Supported event fields and validation
- Implemented recurrence options
- Recurrence preview and single-occurrence deletion UX
Access Model
- Public users are read-only.
- Plugin users in
activestatus can create, update, and delete events. - WordPress users with
edit_postscapability can also perform write actions.
CRUD Requirements
The editor must support:
- Create event
- Edit event
- Delete event
- Delete one occurrence from a recurring event (exception-based, no series split)
Behavior requirements:
- Create/edit use modal overlay forms.
- Save/update/delete actions show status feedback.
- Delete event requires explicit user confirmation.
- Single-occurrence delete requires selecting a specific occurrence key.
Event Fields
Supported fields:
title(required)visibility(publicorprivate; defaultpublic)descriptionlocationcategoryall_day_eventstart_datetime(required)end_datetime(required, must be on/after start)repeat_typerepeat_intervalrepeat_range_moderepeat_countrepeat_until- Monthly pattern fields:
repeat_nth_mode,repeat_nth_day,repeat_nth_pos,repeat_nth_weekday
UI behavior requirements:
- Start and end use separate date and time controls.
- Date controls use date-picker inputs.
- Time controls hide when
all_day_eventis selected. - Floating/persistent labels keep field purpose visible.
- Internal event ID is hidden from users.
- Editor must provide a control to mark events as
publicorprivate.
Recurrence Model
Supported repeat_type values:
nonedailyweeklymonthlyyearly
Supported monthly modes:
day_of_month(nth day)weekday_of_month(nth weekday, includinglastvia negative position)
Supported range modes:
nonecountuntil
Recurrence Preview and Occurrence Selection
- For recurring events, editor shows a 3-month occurrence chooser grid.
- Grid supports previous/next month paging.
- Selecting an occurrence sets the occurrence key used by
Delete Occurrence. - Deselect/reselect behavior must be supported.
- For
repeat_type=none, occurrence controls remain hidden and delete-occurrence is disabled.
Verification Requirements
Acceptance should verify:
- Approved/authenticated users can complete full CRUD.
- Recurring events render selectable occurrences in preview grid.
- Deleting one occurrence creates an exception while preserving the series.
- Monthly ordinal patterns save and reload correctly.
- Validation blocks invalid start/end ranges.
- Privacy visibility setting saves and reloads correctly.