Handoff: Logs table with divider (recipe)
Rewritten 2026-11-20 against v2.0.0-beta.21 to the lessons template (
docs/LESSONS.md, L1 to L11). The composition was checked againstLogsTableWithDivider.stories.tsx,logs-table-divider.cssand the packageTableat beta.21. This is a recipe: sections that do not apply say "none, recipe". Nothing was checked by eye in a session and the a11y panel was not run.
What and why
A recipe, not a component: a story and Usage page that compose the published PDS Table (the Logs Table pattern) with a LabeledDivider as one row. In a runtime or edge log it marks a point in time (a day change) and lets the reader jump to another one, through the divider's time menu and date picker. PDS has the Logs Table pattern but no way to put a labeled break in it. The recipe has no API of its own, so there is nothing to port beyond the components it uses (below); the engineer copies the composition. The pattern's CSS is copied from the reference checkout because the published package does not ship it (checked: no pds-logs-table in the installed package's dist/css).
Recommendation (L10): do not ship this as a production pattern until Table has a separator row. The workaround below leaves a keyboard bug (see Accessibility). It is fine as a design example.
- Figma / Jira: none. Source: Erika, 2026-10-16, "pull in the Logs Table PDS and add a divider there as an example".
- Context:
context.md
Exploration and decisions
- Recipe, with the pattern copied in. The Logs Table is a pattern in the PDS source (
src/patterns/tables/logs-table/), not a published component, sologs-table.cssis copied from there. Checked withdiffagainst the beta.21 reference: identical. The story is a trimmed copy of the pattern's Default story (8 entries, a shorter detail panel) plus one divider row. - The divider is a row, stretched across the cells.
Tableis data-driven and cannot span columns. Two tables would lose the sticky header, the scroll area and Prev/Next in the detail panel. So the divider is a row whose first cell holds theLabeledDividerand CSS stretches it across the row. - Newest first, as in the pattern, so entries above the divider are newer. The label shows the day the entries below belong to.
- The divider is the time-jump selector, not the agentic divider (Erika, 2026-10-16). "Zappy engaged" belongs in the Event log with agent recipe. The agentic divider would work the same way in a row.
Full list and reasons: decisions.md.
API
None, recipe. What it composes and how (story: LogsTableWithDivider.stories.tsx):
Table(published) inside adiv.pds-logs-table, withhasPanel,hasDesktopDetailPanel,aria-label,columns(Time, Level, Environment, Message),detailPanelTitle,maxHeightandminHeightof30rem,getRowId,prevDetailPanelRowLabel,nextDetailPanelRowLabel,renderDetailPanelandrowData.hasMobileCardsis not set (its default isfalse), so the story never shows cards. No column issortable.getRowClassNamegives status rowspds-table__row--criticalorpds-table__row--warning, and the divider rowlogs-table-example__divider-row.- The divider row is one more entry in
rowData, placed between the newer and older entries, withiddivider-time-jumpandstatus: 'divider'. Itstimestampcell holds aLabeledDividerwithsize='xs',label(the day) and anactionslot (updated 2026-11-20) holding a MenuButton (a "Jump to..." heading, then Today, Yesterday, Last week, Last month, The very beginning) and a date picker in a modal, from the story-only helper_story-helpers/LabeledDividerSelector; the Labeled Divider no longer hasmenuItems,datePickeroridprops. The other cells are empty strings. renderDetailPanelreturnsnullfor the divider row, and adl(Timestamp, Level, Source) for entries.- Event handling: the divider gets
onClickandonKeyDownhandlers that callstopPropagation, so using the menu or the date picker modal does not open the row's detail panel. The menu and modal render in portals, but their events still bubble through the React tree. - CSS (
logs-table-divider.css, story-only): the divider row getsposition: relativeandpointer-events: none; its cells getpadding-block: var(--pds-spacing-xl); the divider in the first cell isposition: absolute, full row width (inset-inline: 0), vertically centered (inset-block-start: 50%withtranslateY(-50%)),width: auto, withpointer-events: auto.
What the screen owns: the entries and their statuses, the divider's position (which day it marks), its label, the menu items and what each does (the callbacks and onChange are empty in the story), the column set, the detail panel content, and any filtering or loading that follows a jump.
Story-only (L9, the engineer drops or rewrites): LogEntry and sampleLogs, toRowData, stopRowEvents, timeMenuItems with empty callbacks, the LabeledDividerSelector helper, dividerRow, the DIVIDER_ID constant, logs-table-divider.css, and all sample text.
Tokens used
Story-only CSS; nothing here ships in the package. logs-table-divider.css itself uses only --pds-spacing-xl. The rest come from the copied logs-table.css. Full list from the pattern CSS and the divider CSS as they are now:
--pds-border-width-default--pds-color-badge-critical-muted-background--pds-color-badge-critical-muted-foreground--pds-color-border-default--pds-color-foreground-default--pds-color-foreground-default-secondary--pds-color-status-critical-foreground--pds-color-status-warning-foreground--pds-spacing-2xs--pds-spacing-3xs--pds-spacing-4xs--pds-spacing-m--pds-spacing-xl--pds-spacing-xs--pds-typography-fw-medium--pds-typography-fw-semibold--pds-typography-size-s--pds-typography-size-xs
No custom CSS variables and no raw values kept. The previous handoff said npm run check:tokens reports 0 problems; that was not re-run for this rewrite.
Impact
From impact.md: nothing reaches existing components. Everything it adds is scoped to its own classes, it is opt-in, and it redefines no --pds-* token. No other proposal imports or uses it. It depends on the proposals below, and changes to them change what the story shows.
Reused vs net-new
- Reused: the published Table (
hasPanel,hasDesktopDetailPanel,getRowClassName,renderDetailPanel, Prev/Next labels: all exist at beta.21) and the LabeledDivider proposal (../LabeledDivider/). Through LabeledDivider it also depends on the Button, Icon Button, Menu Button, Icon and Spinner proposals and Agent Avatar (fromnode scripts/port-order.mjs --needs=LogsTableWithDivider); whether AgentAvatar (shipped in beta.18) still needs a port was not re-checked here. - Net-new: no components, props or custom variables. Classes copied from the PDS Logs Table pattern (not in the published package):
.pds-logs-table(with__footer,__footer-controls) and.pds-logs-detail__section(with__badge,__label,__value,__value--critical,__value--warning). Story-only:.logs-table-example__divider-row. Details incustom.md. - Depends on LabeledDivider (updated 2026-11-20). The Labeled Divider no longer needs the Agentic Menu Button (the selector is now an
actionslot with a MenuButton), so only Icon is ahead of it indocs/PORT-ORDER.md. Check the ready tags anddocs/PORT-ORDER.mdbefore starting.
Accessibility
What the code does (read from the files; not tested with a screen reader):
- The
Tablehas anaria-label("Application logs"), and the Prev/Next detail panel buttons carry labels (prevDetailPanelRowLabel,nextDetailPanelRowLabel). The divider's menu and date picker have their own labels (menuLabel,modalTitle,pickerLabel). Keyboard and focus otherwise come fromTableandLabeledDivider. - Known gap (a real keyboard bug).
Table.tsxgives every inspectable rowtabIndex=0and an Enter and Space handler (tabIndex={isInspectable ? 0 : undefined}). The divider row is still in the row list, so it can take keyboard focus, Enter or Space opens an empty detail panel (the story returnsnullfor it), and Prev/Next steps onto it. The divider stops its own clicks and keys from reaching the row, and the row haspointer-events: none(so a mouse cannot reach it), but the keyboard still can. The row also carriesaria-selected. - Screen reader semantics of the divider row inside the table (an empty row of cells with a control in the first cell): not checked.
- Mobile cards:
hasMobileCardsis off in the story, so the story never shows them. With it on, the divider row has no card layout (not handled, not checked). - a11y panel: not run. Light and dark: not checked. Contrast: not checked.
Decisions and open questions
Each carries a recommended answer (the designer decides; the first one is for the Table owners).
- Does
Tableneed a first-class separator row (spans the columns, not inspectable, skipped by Prev/Next, sort and selection)? Owner: Table maintainers. Checked at beta.21:Table.tsxhas nocolSpan, separator or non-inspectable row API, andCHANGELOG.mdxhas no such entry. Recommendation: add a row type for it (for example arowType='separator', or a callback such asisRowInspectable(row)), which also fixes the focus gap. Until then, call the recipe an example, not a pattern to ship. - Should the divider show a time (for example the day)? The label is the screen's. Recommendation: yes, show the day, as the story does ("Jun 29, 2026"); the screen sets it.
- LabeledDivider has to land with or before this recipe. Recommendation: do not start this port until LabeledDivider ships.
Extension or new component
None, recipe: it adds no component and no prop to Table. It is the existing Logs Table pattern plus one row with a divider (L1 holds: the pattern's CSS is untouched, byte-identical to the source). The one thing that would be an extension is the Table separator row above.
Footprint
From logs-table-divider.css (not checked by eye):
- The divider is taken out of the table layout:
position: absolutewithinset-inline: 0inside aposition: relativerow. It spans the full row width (edge to edge, over every cell) and is vertically centered on50%of the row. The row's height comes only from the first cell'spadding-block: var(--pds-spacing-xl), so a divider taller than that overflows the row. - It depends on the row being the nearest positioned ancestor. The Table's scroll area sets
overflow(table.css), so the divider is clipped at it; atdmadeposition: relativeby other CSS would shrink it to one cell. - With the detail panel open, the row narrows with the table; whether the divider keeps up was not checked.
pointer-events: noneon the row means the whole row ignores the mouse except the divider, which setspointer-events: auto.- Mobile card view (
hasMobileCards): not handled. - Sticky header: the row scrolls under it like any row (not checked).
Dark mode and per-size values
None of its own, recipe. Single size (LabeledDivider size='xs', padding --pds-spacing-xl). No per-theme override in logs-table-divider.css. The status row colors and the divider come from tokens and components elsewhere; dark mode was not checked.
| Part | Value | Light and dark |
|---|---|---|
| Divider row cell padding | --pds-spacing-xl (block) |
no per-theme override |
| Divider size | xs (a prop, single size) |
set by LabeledDivider |
| Divider width | full row, inset-inline: 0 |
single size |
| Status rows (critical, warning) | pds-table__row--* from the package |
package tokens |
Expect to change
Choices that break or bend a toolkit convention, with a recommended answer:
- A row that is not a data row (L2, L10).
Tableis data-driven; the recipe adds a fake data entry (status: 'divider', empty strings) and branches on it ingetRowClassNameandrenderDetailPanel. Recommendation: replace with the separator row in Table (see open question 1) and deletelogs-table-divider.css,stopRowEventsand theDIVIDER_IDchecks. - Absolute positioning on a
tr(L6). The CSS depends onposition: absoluteandpointer-events: none. Recommendation: treat as a stopgap; the engineer may prefer a different approach in Table. stopPropagationhandlers on the divider. Needed only because the row is clickable. Recommendation: drop with the workaround.- A page example rather than API. If the engineer prefers no Recipe page for a workaround, keep the story out of the library and only note the Table gap. Recommendation: keep it as a design example until the Table change lands.
Target-version check
Checked 2026-11-20 against .pds-reference/src at v2.0.0-beta.21 and the installed package (2.0.0-beta.21).
| Item | Exists at beta.21? |
|---|---|
Logs Table pattern CSS (src/patterns/tables/logs-table/logs-table.css) |
yes in the source; identical to logs-table.css here. Not in the published package CSS |
Table props hasPanel, hasDesktopDetailPanel, getRowClassName, getRowId, renderDetailPanel, detailPanelTitle, maxHeight, minHeight, prevDetailPanelRowLabel, nextDetailPanelRowLabel, rowData, columns |
yes |
A Table separator row, colSpan or non-inspectable row API |
no (none in Table.tsx or CHANGELOG.mdx) |
LabeledDivider |
no |
pds-table__row--critical and --warning classes |
yes, defined in Table's table.css |
hasMobileCards default |
false |
Port notes
- Nothing to generate and nothing to copy into
pds-toolkit-reactfor the recipe itself, and nothing can be ported until LabeledDivider and its dependencies land. The story and Usage page then stay as documentation. logs-table.cssalready lives in PDS as the Logs Table pattern;logs-table-divider.cssis the only recipe-specific CSS and exists to stretch the divider across the row. A separator row inTablewould replace it.- Raise the Table separator row with the Table owners (open question 1) before anything else.
Preview
npm run storybook, then Recipes/Logs table with divider (story Default). Figma: none.