Skip to content

feat(dashboard): elevate widget cards with shadow, entrance and hover - #63509

Open
karlitschek wants to merge 1 commit into
masterfrom
feat/dashboard-widget-polish
Open

feat(dashboard): elevate widget cards with shadow, entrance and hover#63509
karlitschek wants to merge 1 commit into
masterfrom
feat/dashboard-widget-polish

Conversation

@karlitschek

Copy link
Copy Markdown
Member

Summary

The dashboard widgets are frosted but flat — they float a little weightlessly on the background. This adds some depth and life without changing the layout or behaviour.

  • Elevation — a soft drop shadow plus a hairline edge lift each card off the background. Colours come from theme tokens (--color-box-shadow-rgb, --color-border), so the effect adapts to light/dark and high-contrast automatically.
  • Entrance — the board eases in (fade + slight rise) once the widgets appear. It's triggered on .panels:has(.panel) rather than on mount, so it plays only when the widgets are actually present (the container is created empty and filled slightly later) and can't replay when the widget list re-renders.
  • Hover — cards lift gently (translateY(-4px)) with a smooth, symmetric ease.
  • Reduced motion — under prefers-reduced-motion the movement (entrance + hover translate) is disabled; the elevation stays.

Drag & drop

The .panel is drag-sortable (SortableJS via vuedraggable). To avoid interfering with reordering, the hover transform is excluded on .sortable-chosen / .sortable-ghost / .sortable-drag, and the transition is switched off in those states so SortableJS drives the card unimpeded.

Notes

  • Pure styling change, contained to DashboardApp.vue's scoped block.
  • :has() and prefers-reduced-motion are already used elsewhere in the codebase.

Checklist

  • Adapts to light / dark / high-contrast themes via existing tokens
  • Respects prefers-reduced-motion
  • Does not interfere with widget drag-and-drop reordering

The dashboard widgets are frosted but flat, so they float weightlessly on the
background. Give them a bit more presence:

- A soft drop shadow plus a hairline edge lift each card off the background.
  Both use theme tokens (--color-box-shadow-rgb, --color-border), so they adapt
  to light/dark automatically.
- The board eases in once the widgets appear. It is triggered on
  `.panels:has(.panel)` rather than on mount, so it plays only when the widgets
  are actually present and cannot replay when the widget list re-renders.
- Cards lift gently on hover. The hover transform and the transition are disabled
  while SortableJS is dragging a card, so reordering is unaffected.
- All motion is disabled under prefers-reduced-motion (the elevation stays).

Signed-off-by: Frank Karlitschek <frank.karlitschek@nextcloud.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@karlitschek
karlitschek requested a review from a team as a code owner August 23, 2026 15:36
@karlitschek
karlitschek requested review from kristian-zendato, skjnldsv and sorbaugh and removed request for a team August 23, 2026 15:36
@karlitschek

Copy link
Copy Markdown
Member Author

@jancborchardt

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.

2 participants