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. -
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.