Skip to content

docs(dashboards): document the Grid container widget - #11804

Open
keydunov wants to merge 1 commit into
masterfrom
claude/gallant-ramanujan-r0eu34
Open

docs(dashboards): document the Grid container widget#11804
keydunov wants to merge 1 commit into
masterfrom
claude/gallant-ramanujan-r0eu34

Conversation

@keydunov

@keydunov keydunov commented Sep 9, 2026

Copy link
Copy Markdown
Member

Check List

  • Docs have been added / updated if required
  • N/A — Tests / linter (docs-only change)

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:

  • what a grid is and how it differs from a stack (children keep a fixed cell position/size instead of being redistributed)
  • how a grid is sized on add, and how children are placed (drag-in, refuse-on-collision — no pushing/swapping/resizing of anyone else)
  • resizing the grid itself (select via header or ⋯ → Resize; crop-only, down to the cells its children occupy, floored at 2 × 2)
  • the editable title
  • the nesting rule: a grid nests inside the root canvas or another grid, never inside a stack

Also updates the widgets index page's widget-type list and this repo's docs-mintlify/CLAUDE.md widget taxonomy (Layout: Spacer, Divider, Stack, **Grid**).

Why

An earlier attempt at this (#11556) was written against the feature's pre-final design (auto cols × rows grid, 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 from packages/console-ui/src/modules/d3/components/Workbook/DashboardBuilder/{Preview/GridContainerWidget.tsx,utils/grid-container.ts} in cubejs-enterprise.

Notes

  • Frontmatter title updated Spacer, Divider & StackSpacer, Divider, Stack & Grid; the sidebar label is derived from the page title, so no docs.json change is needed.
  • Docs-only.

🤖 Generated with Claude Code

https://claude.ai/code/session_019jko3RdVikXS2NEvBqEAcB


Generated by Claude Code

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
@mintlify

mintlify Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
cubed3 🟢 Ready View Preview Sep 9, 2026, 12:15 AM

💡 Tip: Enable Automations to automatically generate PRs for you.

@claude

claude Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

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
  • Read PR diff
  • Read full layout.mdx + widgets index + docs-mintlify/CLAUDE.md for consistency
  • Checked prior review threads (none existed — nothing to resolve or dedupe against)
  • Posted review

Summary

Clean, 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 docs-mintlify/CLAUDE.md:134 and the index list are both consistent with the new page. I verified the PR's claim that no docs.json change is needed — docs-mintlify/docs.json:120 lists the page as a bare path with no explicit label, so the sidebar does track the frontmatter title.

I could not verify the behavioral claims against the implementation: packages/console-ui/.../GridContainerWidget.tsx and utils/grid-container.ts live in cubejs-enterprise, not this repo. The two medium findings below are internal inconsistencies visible from the page text alone, not contradictions of the source.

Medium

1. layout.mdx:39-41 — same gesture described for two different outcomes, and a published-dashboard contradiction. Line 39 says clicking the header selects the grid; line 41 says clicking the header (once selected) edits the title. Separately, line 41 says the title shows on the published dashboard while line 56 says a grid "draws no card of its own on the published dashboard". Details in the inline comment.

2. layout.mdx:56 — stack behavior claim silently narrowed. A **stack** draws no card of its owndraws no card of its own **on the published dashboard** implies a stack now draws a card while editing. If stacks are unchanged, scope the qualifier to grid only. See the inline comment.

Low

3. layout.mdx:20 — "on the grid" is now ambiguous. The Stack section says "instead of positioning each one on the grid by hand", meaning the board's layout grid. With a Grid widget documented two sections below, that reads as "inside a Grid container". Changing it to "on the canvas" costs one word. (Not in the diff, so I couldn't attach this inline.) Fix this → (styling.mdx:29 has the same "dashboard grid" phrasing, but that's pre-existing and on another page.)

4. Inconsistent code formatting for dimensions. `12 × 12` and `columns × rows` are backticked (lines 33, 35) but 2 × 2 on line 39 is bare. Pick one — and note docs-mintlify/CLAUDE.md reserves inline backticks for identifiers, so plain text for all three is arguably the better call.

5. Section length. The Grid section is five paragraphs where Spacer gets two and Divider one, against docs-mintlify/CLAUDE.md's "write the shortest version that fully answers 'how do I use this?' and stop". The nesting rule (line 43) and the title (line 41) could each fold into a neighboring paragraph. Judgment call — grid genuinely has more interaction surface than a divider — so not blocking.

Not applicable

Security, 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 docs.json edit was needed.

• branch [`claude/gallant-ramanujan-r0eu34`](https://github.com/cube-js/cube/tree/claude/gallant-ramanujan-r0eu34)

Comment on lines +39 to +41
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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two things to check here:

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

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants