Skip to content

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

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

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

@karlitschek

Copy link
Copy Markdown
Member Author

@kra-mo

@karlitschek

Copy link
Copy Markdown
Member Author

@susnux

@susnux
susnux requested review from jancborchardt and kra-mo August 26, 2026 15:11
@kra-mo

kra-mo commented Aug 27, 2026

Copy link
Copy Markdown
Member

@karlitschek could you attach a screen recording?

@solracsf solracsf added this to the Nextcloud 36 milestone Sep 12, 2026
@provokateurin

provokateurin commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

Your PR description is AI-written, so I'm closing it as per our AI policy: https://github.com/nextcloud/.github/blob/master/AI_POLICY.md#human-written-communication
If you disagree and my judgement was wrong, feel free to re-open this PR.

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.

5 participants