Skip to content

fix(next): restore modular dashboard widget layout#16685

Open
GermanJablo wants to merge 3 commits into
mainfrom
cursor/modular-dashboard-default-card
Open

fix(next): restore modular dashboard widget layout#16685
GermanJablo wants to merge 3 commits into
mainfrom
cursor/modular-dashboard-default-card

Conversation

@GermanJablo
Copy link
Copy Markdown
Contributor

@GermanJablo GermanJablo commented May 19, 2026

Fixes a UI regression in the modular dashboard that was introduced by #16619 and #16627.

Payload v3

Original modular dashboard layout before the regression.

image

After #16619 / #16627

Widgets lost their spacing, and the revenue/private widgets no longer stretched correctly.

image

After This PR

Modular dashboard widget spacing and widget card layout are restored.

image

Why fix align-items on the global .card and not on .modular-dashboard .widget-content > .card

I initially scoped the override to .modular-dashboard to minimize blast radius. After reviewing how Card is actually used I switched to fixing it at the source. The trade-off:

  • Inside the monorepo, the Card React component is imported in exactly one place (packages/ui/src/widgets/CollectionCards/index.tsx), and CollectionCards is only registered as the default collections widget of the modular dashboard. So today every .card in the rendered DOM lives inside .modular-dashboard, and the scoped selector was functionally equivalent to a global fix.
  • However, Card is a public export in packages/ui/src/exports/client/index.ts, so third parties can use it in custom admin components or custom widgets. A scoped override would silently leave them on the new flex-start behavior, which differs from v3 and is not what the title/actions layout was designed for (the title lost its width: 100% and .card__actions is now position: absolute, so neither of them benefit from flex-start over stretch).
  • Scoping by consumer (.collections .card) was also considered but rejected: the behavior we want belongs to the Card contract itself, not to CollectionCards.

The .widget padding stays scoped to .modular-dashboard because that is genuinely a dashboard-layout concern, not a Card concern.

…onent colors

Added padding to the widget and adjusted alignment for card content in the ModularDashboard. Updated background and text colors in the Private component to align with the new design specifications.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 19, 2026

📦 esbuild Bundle Analysis for payload

This analysis was generated by esbuild-bundle-analyzer. 🤖
This PR introduced no changes to the esbuild bundle! 🙌

Move the align-items override from the dashboard scope to the global
.card element. The Card React component is only used internally by
CollectionCards, which is the only widget that renders into the
modular dashboard, so scoping the fix to .modular-dashboard was
functionally equivalent today but would silently regress for any
third-party consumer of the exported <Card> component, which is part
of the public API.
@JarrodMFlesch
Copy link
Copy Markdown
Contributor

Lets fix this misalignment.

CleanShot 2026-05-19 at 13 20 34@2x

@GermanJablo
Copy link
Copy Markdown
Contributor Author

Fixed!

image

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants