An open source design system that's fully customizable and agent ready
TypeScript
spec(Schedule): a busy month day keeps its earliest events (#7060)
Cindy Zhang5f6cd746ff0d
diff --git a/packages/lab/src/Schedule/Schedule.spec.md b/packages/lab/src/Schedule/Schedule.spec.mdindex 42cabadae0..16dfde55cf 100644--- a/packages/lab/src/Schedule/Schedule.spec.md+++ b/packages/lab/src/Schedule/Schedule.spec.md@@ -181,7 +181,7 @@ intentional decision.| FR12 | The time grid owns exactly one popover instance, rendered through `component:Popover` with that component's defaults — dialog role, modal, auto-focus, hidden fallback close, Escape dismiss, light dismiss, standard surface and padding — and named by the open event's `title`. At most one event is open at a time; opening another event closes the first and opens the second in the same gesture. The popover closes when it is dismissed, when its event is no longer painted (removed from the source, paged out of range, or the view is swapped), and its `aria-expanded` reflects the open event and no other. The content is `renderPopover(event)` for the open event only; it re-renders with the event object for the same `id` while that event stays in range. | DEC-1; DEC-5; `component:Popover` | settled || FR13 | Without `renderPopover`, event blocks remain non-interactive, painted decoration, and the hidden read-only grid remains the only accessible representation of events in the time grid. The only focusable element inside the time grid is the scroll viewport, and only while it overflows (AR1). | DEC-1; `spec:AST-002` FR10 | settled || FR14 | `renderPopover` is an option of the week and day view factories, which share the time-grid event anatomy, and of no other view. The month and list views render events read-only and expose no interaction option in this record; a future interaction contract for either is its own record change and may differ. `Schedule` and `ScheduleContextValue` carry no activation callback. The option exposes no trigger props, open state, popover instance, or Popover presentation props, and takes no close or controls argument; the time grid presents the popover as a popover at every pointer type and width. | DEC-1; DEC-5 | settled |-| FR15 | The month view paints each event as one chip per week it covers, spanning its days in that week. Chips in a week row take levels: events are ordered by first day ascending, then all-day and multi-day events before single-day timed events, then longer events first, then title, then `id`; in each week it covers, an event takes the lowest level that is free on every day it covers there. The result MUST be identical for any input order of the same events. A week row paints at most three levels, keeps its height, and MUST NOT paint a chip outside its row. The month surface is an `isolation: isolate` owner; chips and a focused "+N more" rise with a local positive `z-index` inside it only. | DEC-6; `spec:AST-027` FR1–FR6 | settled |+| FR15 | The month view paints each event as one chip per week it covers, spanning its days in that week. Chips in a week row take levels: events are ordered by first day ascending, then all-day and multi-day events before single-day timed events, then events covering more days first, then earlier start, then title, then `id`, so a busy day keeps its earliest events; in each week it covers, an event takes the lowest level that is free on every day it covers there. The result MUST be identical for any input order of the same events. A week row paints at most three levels, keeps its height, and MUST NOT paint a chip outside its row. The month surface is an `isolation: isolate` owner; chips and a focused "+N more" rise with a local positive `z-index` inside it only. | DEC-6; `spec:AST-027` FR1–FR6 | settled || FR16 | Every event of a day MUST be either painted as a chip on that day or counted by that day's "+N more"; no event is dropped. When any event covering a day sits at level four or higher, that day's third level holds "+N more" instead of a chip, and N is the number of that day's events at level three or higher. A chip whose span crosses such a day is painted on its other days and counted on that one. | DEC-6 | settled || FR17 | "+N more" is a native `<button type="button">` inside its day's cell. Click, tap, Enter, and Space toggle the month view's one popover for that day, rendered through `component:Popover` with that component's defaults and named by the day's full date. The popover lists every event of that day in start order, each with its time range or "All day" and its title, marked with its category colour and muted once past; those events are read-only. At most one day is open at a time; activating another day's "+N more" closes the first and opens the second in the same gesture. The popover closes when it is dismissed and when its "+N more" is no longer rendered — the day no longer needs more than three levels, the range is paged, or the view is swapped — and `aria-expanded` reflects the open day and no other. | DEC-6; `component:Popover` | settled |@@ -245,12 +245,12 @@ intentional decision.- **ORD3 — Pinning.** Sticky header cells paint above the columns, the gutterabove the columns, and the corner above both, all as local order inside theisolated viewport.-- **ORD4 — Month layout.** Order events (first day, all-day and multi-day- first, longer first, title, `id`) → in that order, give each event in each- week it covers the lowest level free on all its days there → for each day- with an event on level four or higher, give its third level to "+N more" and- count that day's events on level three or higher → paint the remaining- chips, cutting a span around the days where it is counted.+- **ORD4 — Month layout.** Order events (first day, all-day and multi-day first,+ covering more days first, earlier start, title, `id`) → in that order, give+ each event in each week it covers the lowest level free on all its days there+ → for each day with an event on level four or higher, give its third level to+ "+N more" and count that day's events on level three or higher → paint the+ remaining chips, cutting a span around the days where it is counted.### Performance and resources@@ -387,7 +387,7 @@ agent invent the answer.| FR11–FR14 | `Schedule.test.tsx` popover suite; `ScheduleEventPopover.a11y.chromium.spec.ts` against the `EventPopover` story | option absent, present, `null` for one event; open, Escape, light dismiss, switch, removal, paging; month and list unchanged | A button without the option, a button for a `null` event, two open popovers, a stale `aria-expanded`, an orphan dialog after removal, focus not returning, or focus inside the hidden grid fails. | `audit:Schedule/public-api` || AR1, AR4–AR5 | `ScheduleTimeGridGeometry` keyboard-reach case; `Schedule.test.tsx` hidden-grid suite; scoped axe audit of the read-only and popover stories | overflowing and fitting viewports; read-only week | An unreachable viewport, a focusable node inside `aria-hidden`, or a changed read-only grid fails. | `audit:Schedule/accessibility` || AR2–AR3, AR6 | `Schedule.test.tsx` name and popup-attribute assertions; `ScheduleEventPopover` focus-ring pixels, focus-return, and RTL cases | `EventPopover` story focused by keyboard, open and closed, LTR and RTL | A name missing the date or category, a clipped ring, a missing `aria-haspopup`, a dialog without the event title as its name, or an unmirrored pin fails. | `audit:Schedule/accessibility` |-| FR15–FR16 | `monthLayout.test.ts` pure-function suite; `ScheduleMonthOverflow.a11y.chromium.spec.ts` | three events; five events with a three-day span on level three; reversed input order; an empty week | A chip painted below its week row, an event neither painted nor counted, an input-order-dependent result, a row that grows, or a missing `isolation: isolate` fails. | `audit:Schedule/layout` |+| FR15–FR16 | `monthLayout.test.ts` pure-function suite; `ScheduleMonthOverflow.a11y.chromium.spec.ts` | three events; five events with a three-day span on level three; titles out of start order; reversed input order; an empty week | A chip below its row, an event neither painted nor counted, a single-day timed event hidden while a later one that day shows, an order-dependent result, a growing row, or no `isolation: isolate` fails. | `audit:Schedule/layout` || FR17, AR7 | `Schedule.test.tsx` month suite; `ScheduleMonthOverflow.a11y.chromium.spec.ts` | open by click and by keyboard, Escape, light dismiss, switch days, page away; LTR and RTL; light and dark | A control that is not a button, a name without the count or the date, two dialogs, a stale `aria-expanded`, focus not returning, a clipped focus ring, or a dialog left open after paging fails. | `audit:Schedule/accessibility` || AR7 structure | `Schedule.test.tsx` month table suite; `ScheduleMonthOverflow.a11y.chromium.spec.ts` accessibility-tree and Tab-order readings | quiet and busy months; Tab from the pager through the scroll container to each "+N more" in reading order; screen-reader names of headers, cells, and buttons; the Sunday cell's column header read as Sunday | A `grid` role or `aria-readonly`, a missing column, row, or corner header, a cell whose column header is not its weekday, a cell named without its full date, or a "+N more" outside the Tab order fails. | `audit:Schedule/accessibility` || FR17 close rule | `Schedule.test.tsx` month suite; `ScheduleMonthOverflow.a11y.chromium.spec.ts` refresh case | a day opened by keyboard, then a refresh leaves it three events; a day open, then the range paged | A dialog left open, a stale `aria-expanded`, focus left on the page body while the day's cell is still rendered, a cell in the Tab order, or a focused cell without the shared focus ring fails. | `audit:Schedule/behavior` |