docs(dashboards): document the Grid container widget - #11804
Conversation
The Grid container (CUB-3811) shipped in cubejs-enterprise#14769 as a new option in the dashboard builder's Add Widgets menu, alongside the existing Spacer/Divider/Stack layout widgets, but was never documented — an earlier attempt (#11556) was written against a pre-final design and closed stale. Add a Grid section to the layout widgets page describing the shipped behavior: fixed child cell positions with refuse-on-collision placement, crop-only resizing down to a 2x2 floor, the editable title, and the nesting rule (grids nest in the root and in other grids, never in a stack). Also wire it into the widgets index page and the widget taxonomy in this repo's docs-mintlify/CLAUDE.md. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019jko3RdVikXS2NEvBqEAcB
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
|
Claude finished @keydunov's task in 1m 23s —— View job Docs-only change, in good shape — 0 high, 2 medium, 3 low. Posted 2 inline comments.Full review
SummaryClean, well-scoped docs addition. The prose is specific about the interaction model (refuse-on-collision, crop-only resize, nesting rule) rather than hand-waving, which is what made the earlier attempt in #11556 go stale. Taxonomy update in I could not verify the behavioral claims against the implementation: Medium1. 2. Low3. 4. Inconsistent code formatting for dimensions. 5. Section length. The Grid section is five paragraphs where Spacer gets two and Divider one, against Not applicableSecurity, performance, test coverage, and error handling have no surface here — the change touches three Markdown files with no code, config, or build inputs. No new images or binaries were committed (correct per the docs conventions), and no |
| Click a grid's header (or open its **⋯** menu and choose **Resize**) to select it and reveal its own resize grip. A grid can only be shrunk down to the cells its children already occupy — it crops empty rows off the bottom and empty columns off the right, down to a minimum of 2 × 2 cells. | ||
|
|
||
| Give a grid a name by clicking its header once it's selected and typing a title; the title is shown on the published dashboard. |
There was a problem hiding this comment.
Two things to check here:
-
Same gesture, two outcomes. Line 39 says clicking the header selects the grid; line 41 says clicking the header (once selected) starts editing the title. A reader following line 39 will click the header and — depending on selection state — sometimes land in a text field instead. If that's genuinely the behavior, saying so explicitly ("click the header once to select the grid, again to edit its title") would save them the surprise.
-
Title vs. "no card" claim. Line 41 says the title "is shown on the published dashboard", but line 56 says a grid "draws no card of its own on the published dashboard". Both can be true (a bare title with no card chrome) but as written they read as contradictory. Either qualify line 56 (e.g. "draws no card of its own — only its title, if set") or drop the published-dashboard claim on line 41 if the title is editor-only.
| - A **spacer** picks up the same border and background settings while you are editing, so its bounds are easy to see. | ||
|
|
||
| A **stack** draws no card of its own — it only groups and sizes its children, each of which keeps its own styling. | ||
| A **stack** or **grid** draws no card of its own on the published dashboard — it only arranges its children, each of which keeps its own styling. |
There was a problem hiding this comment.
This edit narrows a previously unconditional claim: "A stack draws no card of its own" → "draws no card of its own on the published dashboard". That now implies a stack does draw a card while editing — which may well be true (the spacer note above says as much about itself), but it's a behavior change to the stack docs riding along in a Grid PR. If stacks are unchanged, keep the original phrasing for stack and scope the qualifier to grid.
Check List
What
Adds a Grid section to the dashboard layout-widgets page (
docs/explore-analyze/dashboards/widgets/layout.mdx). The Grid container (CUB-3811) shipped in cubejs-enterprise#14769, alongside the existing Spacer/Divider/Stack layout widgets, but had no public docs.The section covers:
Also updates the widgets index page's widget-type list and this repo's
docs-mintlify/CLAUDE.mdwidget taxonomy (Layout: Spacer, Divider, Stack, **Grid**).Why
An earlier attempt at this (#11556) was written against the feature's pre-final design (auto
cols × rowsgrid, a "Distribute evenly" action, swap-on-collision) and was closed once the shipped implementation diverged (free-position cells, collisions revert rather than swap, crop-only resize, no distribute action). This PR documents the interaction model as it actually shipped, read directly frompackages/console-ui/src/modules/d3/components/Workbook/DashboardBuilder/{Preview/GridContainerWidget.tsx,utils/grid-container.ts}in cubejs-enterprise.Notes
Spacer, Divider & Stack→Spacer, Divider, Stack & Grid; the sidebar label is derived from the page title, so nodocs.jsonchange is needed.🤖 Generated with Claude Code
https://claude.ai/code/session_019jko3RdVikXS2NEvBqEAcB
Generated by Claude Code