|
| 1 | +## ADDED Requirements |
| 2 | + |
| 3 | +### Requirement: Show multi-day times property |
| 4 | + |
| 5 | +The Calendar widget SHALL expose a `showMultiDayTimes` boolean property (default `false`) |
| 6 | +that controls whether events spanning multiple days are rendered as timed blocks (showing |
| 7 | +start/end times) in the week and day views instead of being placed in the all-day row. |
| 8 | + |
| 9 | +#### Scenario: Property is available in Studio Pro |
| 10 | + |
| 11 | +- **WHEN** a developer configures the Calendar widget in Studio Pro |
| 12 | +- **THEN** a "Show multi-day times" boolean property is available, defaulting to off |
| 13 | + |
| 14 | +#### Scenario: Enabled flag is passed through to the calendar |
| 15 | + |
| 16 | +- **WHEN** `showMultiDayTimes` is set to `true` |
| 17 | +- **THEN** the Calendar passes `showMultiDayTimes=true` to `react-big-calendar`, so multi-day |
| 18 | + events render as timed blocks in the week and day views |
| 19 | + |
| 20 | +#### Scenario: Disabled by default preserves all-day rendering |
| 21 | + |
| 22 | +- **WHEN** `showMultiDayTimes` is left at its default (`false`) |
| 23 | +- **THEN** the Calendar passes `showMultiDayTimes=false`, and multi-day events continue to be |
| 24 | + placed in the all-day row (existing behavior is unchanged) |
| 25 | + |
| 26 | +### Requirement: Multi-day event time-range formats |
| 27 | + |
| 28 | +When a time format is configured, the Calendar widget SHALL provide |
| 29 | +`eventTimeRangeStartFormat` and `eventTimeRangeEndFormat` for `react-big-calendar`, derived |
| 30 | +from the same configured time pattern used by `eventTimeRangeFormat`, so the start and end |
| 31 | +times of multi-day events are shown in a locale-aware way. |
| 32 | + |
| 33 | +#### Scenario: Start format renders the start time with a trailing separator |
| 34 | + |
| 35 | +- **WHEN** a time format (e.g. `HH:mm`) is configured and `eventTimeRangeStartFormat` is |
| 36 | + called for an event |
| 37 | +- **THEN** it returns the event's start time formatted with that pattern, followed by a |
| 38 | + " – " separator |
| 39 | + |
| 40 | +#### Scenario: End format renders the end time with a leading separator |
| 41 | + |
| 42 | +- **WHEN** a time format (e.g. `HH:mm`) is configured and `eventTimeRangeEndFormat` is called |
| 43 | + for an event |
| 44 | +- **THEN** it returns the event's end time formatted with that pattern, preceded by a " – " |
| 45 | + separator |
| 46 | + |
| 47 | +#### Scenario: Start, end, and range formats share the same time pattern |
| 48 | + |
| 49 | +- **WHEN** a time format (e.g. `h:mm a`) is configured |
| 50 | +- **THEN** `eventTimeRangeFormat`, `eventTimeRangeStartFormat`, and `eventTimeRangeEndFormat` |
| 51 | + all format times using that same pattern |
| 52 | + |
| 53 | +#### Scenario: No time format leaves start/end formats unset |
| 54 | + |
| 55 | +- **WHEN** no time format is configured |
| 56 | +- **THEN** the widget does not set `eventTimeRangeStartFormat` or `eventTimeRangeEndFormat` |
| 57 | + |
| 58 | +### Requirement: Show event date hides multi-day time ranges |
| 59 | + |
| 60 | +When `showEventDate` is disabled, the Calendar widget SHALL hide all event time-range labels, |
| 61 | +including the multi-day start and end formats, so no times are shown on events. |
| 62 | + |
| 63 | +#### Scenario: showEventDate=false blanks all time-range formats |
| 64 | + |
| 65 | +- **WHEN** `showEventDate` is `false` (with a time format configured) |
| 66 | +- **THEN** `eventTimeRangeFormat`, `eventTimeRangeStartFormat`, and `eventTimeRangeEndFormat` |
| 67 | + all return an empty string |
| 68 | + |
| 69 | +#### Scenario: showEventDate=true preserves all time-range formats |
| 70 | + |
| 71 | +- **WHEN** `showEventDate` is `true` (with a time format configured) |
| 72 | +- **THEN** `eventTimeRangeFormat`, `eventTimeRangeStartFormat`, and `eventTimeRangeEndFormat` |
| 73 | + all return a non-empty formatted label |
0 commit comments