Commit 6830121
fix(dashboard): auto-flow layout-less widgets in the positioned grid (#1925)
DashboardRenderer placed any widget WITHOUT a `layout` at a single grid
column in the positioned (explicit-columns) grid. A dashboard authored in
the Studio designer — which adds widgets without a layout and relies on
auto-flow — therefore crammed every widget into one row (charts squeezed to
a few px wide and effectively invisible).
Give layout-less widgets a sensible default span in the positioned grid
(KPIs quarter-width w:3/h:2, charts & tables half-width w:6/h:4), clamped to
the column count, mirroring the editable DashboardGridLayout's auto-placement.
The responsive flow layout (no explicit columns) is unchanged — it already
sizes each widget as one cell. `hasExplicitColumns` is hoisted so renderWidget
can read it.
Found dogfooding the Studio dashboard designer; pairs with the framework
change making DashboardWidget.layout optional.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 47c6e25 commit 6830121
1 file changed
Lines changed: 20 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
228 | 232 | | |
229 | 233 | | |
230 | 234 | | |
| |||
400 | 404 | | |
401 | 405 | | |
402 | 406 | | |
403 | | - | |
404 | | - | |
405 | | - | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
406 | 423 | | |
407 | 424 | | |
408 | 425 | | |
| |||
1003 | 1020 | | |
1004 | 1021 | | |
1005 | 1022 | | |
1006 | | - | |
1007 | | - | |
1008 | 1023 | | |
1009 | 1024 | | |
1010 | 1025 | | |
| |||
0 commit comments