fix(dashboard): auto-flow layout-less widgets in the positioned grid#1925
Merged
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Found by dogfooding the ObjectStack Studio dashboard designer in the browser.
DashboardRendererplaced any widget without alayoutat 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, with charts squeezed to a few px wide and effectively invisible.Fix
Give layout-less widgets a sensible default span in the positioned grid (KPIs quarter-width
w:3/h:2, charts & tables half-widthw:6/h:4), clamped to the column count — mirroring the editableDashboardGridLayout's auto-placement.hasExplicitColumnsis hoisted sorenderWidgetcan read it.columns) is unchanged — it already sizes each widget as one cell.layoutare unaffected (widget.layout ?? fallbackSpan).Verification
plugin-dashboardsuite: 4329 tests pass.Pairs with framework PR objectstack-ai/framework#2247 (
fix(spec): make dashboard widget \layout` optional`).🤖 Generated with Claude Code