Minor Changes
-
224aca7: feat(DSTSUP-334): select one level of a grouped Table and line its children up with the group label
A
Tablewith grouped rows (treeColumn) takes two new optional props. Nothing changes for tables that don't set them.selectableRowssets which level of rows can be selected, with"all"(the default, as before),"top-level"or"nested". Use it when the bulk actions act on one level only, for example price levels whose articles are only their contents. Rows outside that level show no checkbox, their cell stays empty so the columns don't shift, and they are left out of select-all and range selection. They stay focusable, expandable and keep their row actions, and they are not announced as selectable or disabled. This replaces putting such rows intodisabledKeyswithdisabledBehavior="selection", which showed a checkbox that could never be checked. KeepdisabledKeysfor rows that can be selected in principle but not right now. They keep their disabled checkbox. After select-all,onSelectionChangestill receives'all', which now means every row on the selectable level, so resolve it from that level's items rather than from every key. Once a row is deselected after that, the selection lists only rendered rows, so the children of a collapsed group drop out of it.treeIndent="aligned"lines the first nested level up with its group's label instead of indenting it one step further, while deeper levels still indent. Use it when every top-level row is a group. It replaces overriding the indent with a negative margin.Refs DSTSUP-335.
-
fb9256b: fix(DST-1885): Pagination keeps keyboard focus when a button becomes unusable or disappears
"Previous" on the first page, "Next" on the last page and the "1" shown when there are no pages are no longer natively disabled. They now use
aria-disabled, ignore presses and stay reachable with Tab, so focus is not dropped to the page body when you reach either end. Tests that check these buttons withtoBeDisabled()orbe.disabledneed to assertaria-disabled="true"instead. When the focused page button is removed, for example becausetotalItemsshrank, focus moves to the current page's button.
Patch Changes
-
04f4206: docs(DST-1981): give the published packages a real README
The README of each package was a single line. It now says what the package is, how to install and set it up, and where the documentation lives: the docs site, the Markdown version of every page, and the
marigoldCLI. The@marigold/componentsREADME also lists the conventions that differ from other React libraries, such asdisabledinstead ofisDisabled,onPressinstead ofonClick, and noclassName. This is the first file an AI coding agent reads innode_modules, so it no longer has to guess. -
04f4206: docs(DST-1981): describe the props that had no documentation
About 160 props had no description, so an editor tooltip, the props tables in the docs and an AI agent reading the type declarations showed only a name and a type. This affected
variantandsizeon most components,ref,childrenand a few others, such as thetitle,descriptionandactionof a toast. Most of them are described now. About 70 still have none, mostly on building blocks such asFieldBase,InputandPopover, plus the sharedslotprop. Nothing changes at runtime and no types change. -
923cef8: fix(DST-1612): keep a Table inside its container when the columns no longer fit
A
Tablewhose column minimums add up to more than the space available painted outside its container instead of staying in it. At 320px, the minimum supported viewport width, that was every table with more than a couple of columns, and the rows ran across the edge of the surroundingPanel.Current: the columns never shrink below the sum of their minimum widths, and the table simply overflowed whatever box it was in. The content past the container's edge was only reachable by scrolling the page sideways, if the page scrolled at all.
New: when less width than that is available, the table scrolls sideways inside its own container, so nothing paints over the container's edge and every column stays reachable. While it scrolls, whichever edge still has columns behind it fades out, and the fade clears at each end of the travel, so it also says which directions are left. A container that can give the columns their minimums is left alone, and nothing changes in the component API.
While a table scrolls sideways, a sticky header or footer and the
actionBarpin to that scroll area rather than to the page, because it is the nearest scrollport. A table wrapped in a<Scrollable>is left alone, since that scroll area already contains the table and has a height of its own to pin them to. Tables that fit keep following the page as before.The guard that leaves a table alone looks for a
Scrollablerather than reading the scroll parent'soverflow-x. CSS computesoverflow-xtoautowheneveroverflow-yis notvisible, so every vertically scrolling ancestor would otherwise report itself as a sideways scroll area: inside aDialog, aDraweror an app shell whose main region scrolls, the table would keep overflowing its panel.One new optional theme part carries the fade,
Table.container, backed by the existingui-scroll-mask-xutility intheme-rui. Set--sc-mask-widthto change how far the fade reaches. A theme that defines the part as nothing still scrolls, it just shows a plain scrollbar. The same applies without support for CSS scroll-driven animations: there is no fade, only the scrollbar.ui-scroll-mask-xno longer hides the native scrollbar, because a scroll affordance should not take away the one the browser gives you. Hiding it is now a separateui-scrollbar-noneutility, whichTabsandSegmentedControlopt into so they look as they did. A horizontal scrollbar under a row of tabs is unconventional chrome a fade can replace, but under a table it is what a pointer user reaches for, soTable.containerpairs the fade withui-scrollbarand keeps it. If you usedui-scroll-mask-xin your own code and want no scrollbar, addui-scrollbar-none.ui-scrollbarnow setsscrollbar-coloronly in browsers without::-webkit-scrollbar, which today means Firefox. Safari ignores the::-webkit-scrollbarstyling as soon asscrollbar-coloris set and falls back to the macOS overlay scrollbar, which stays hidden until you scroll, so the Table's scrollbar never showed there. Chrome and Safari now both draw the styled 12px scrollbar, which also changes how it looks inDialog,Drawer,SidebarandContextualHelp. -
05e61f3: fix(DST-1617): keep the ContextualHelp popover inside the screen on small viewports
On narrow screens the ContextualHelp popover could end flush against the edge of the screen. A
mediumpopover did so below a 344px viewport and alargeone below 472px, cutting off its rounded corners and shadow. A popover placedleftorrightwas squeezed into the little space beside the button, at 320px only 134px wide.New: the popover keeps a 12px distance to both edges of the screen and gets narrower when it would not fit. On small screens, below the
smbreakpoint,leftandrightplacements open at thebottominstead. Larger screens are unchanged, and there is nothing to do in your app. -
36e9ad5: style(DST-2001): Stepper shows progress in neutral colours instead of success green
A completed step is now a filled check in the primary colour, with a primary connector after it, so plain progress no longer reads as a success message. Connectors are a slightly thicker line with rounded ends. The current step is an outlined marker with a bold label. Disabled steps use the disabled colours, and every step that cannot be clicked shows a not-allowed cursor on hover.
A step in both
completedKeysanddisabledKeysused to show its number and was announced only as "not available". It now shows the check and is announced as "completed, not available". It still cannot be clicked and its connector stays unfilled.The Stepper docs put Back on the far left and Continue on the far right in the multi-step form examples, without icons, and end on a "Place order" button that confirms the order. The Button page no longer lists wizards under right-to-left button order.
Nothing to change in your code.
-
4c5665a: refactor: clean up internal lint warnings
Breadcrumbsnow keys its items by their element key instead of their position, andcreateFilledIconno longer usesforwardRef. Custom icons still forwardrefto the<svg>. Nothing changes in how you use these components. -
47f2879: fix(DSTSUP-326): give the small-screen Menu and ActionMenu tray an accessible name
On small screens,
<Menu>and<ActionMenu>open their items in a tray dialog that screen readers announced without a name. The tray now takes its name from the menu'saria-labeloraria-labelledby. A<Menu>without either is named after the visible text of its trigger. -
Updated dependencies [04f4206]
-
Updated dependencies [923cef8]
- @marigold/system@18.5.0