Skip to content

feat(ui): smooth entrance/exit transitions and drag overlay alignment for dock & toolbar - #1809

Merged
eythaann merged 9 commits into
eythaann:masterfrom
malashkadev:feat/taskbar-toolbar-animations
Sep 15, 2026
Merged

eythaann merged 9 commits into
eythaann:masterfrom
malashkadev:feat/taskbar-toolbar-animations

Conversation

@malashkadev

@malashkadev malashkadev commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

📋 Summary

This PR adds smooth entrance and exit transitions for applications in the dock (@seelen/weg), smooth badge scaling, toolbar reordering transitions, and resolves a layout misalignment issue during drag-and-drop overlay rendering.


🔍 Problems Addressed

  1. Instant App Disappearance: Previously, unpinned applications in the dock vanished immediately (0ms) upon closing because Svelte removes DOM nodes instantly without exit transitions.
  2. Svelte 5 DOM Node Fixing Conflict: Using animate:flip on disappearing items triggered Svelte's internal nodes.fix(), forcing position: absolute and collapsing the flex slot abruptly before transitions could run.
  3. DragOverlay Misalignment: When dragging multi-instance applications with instance badges (2) or active running signs, the @dnd-kit <DragOverlay> child lacked the .weg-item-drag-container wrapper. Hover magnification caused the overlay block to expand, shifting the open indicator by +7.5px and causing badges to detach from the icon into empty space.
  4. Instant Badge Disappearance: Notification and instance badges disappeared abruptly when counts reached zero.

🚀 Changes Made

1. Dock (@seelen/weg)

  • Symmetrical Dock Transitions: Added custom dockItemEnter and dockItemExit transitions with proportional scaling and symmetrical margin collapse (halfGap = gap / 2).
  • Global Transition Modifier: Applied |global modifier to ensure transitions reliably trigger across all Svelte 5 reactive contexts.
  • Initial Load Suppression: Added isInitialLoad check (600ms guard) to avoid animating existing pinned/open applications on cold start.
  • DragOverlay Coaxial Alignment:
    • Wrapped <DragOverlay> content in <div class="weg-item-drag-container is-overlay">.
    • Added flex-centering on [data-dnd-overlay] and strict width: fit-content; height: fit-content on .weg-item-overlay.
    • Indicator drift eliminated from +7.50px to strictly 0.00px.
  • Badge Scaling: Integrated scale transition (180ms cubicOut) for notification and instance counter badges.

2. Fancy Toolbar (@seelen/fancy-toolbar)

  • Added animate:flip for smooth rearrangement of items during drag-and-drop reordering.
  • Integrated smooth badge scale transitions on notifications counter.

3. Accessibility & System Support

  • Added CSS animation tokens (--weg-animation-duration, --weg-animation-easing, --ft-animation-duration).
  • Added @media (prefers-reduced-motion: reduce) support to respect OS accessibility preferences.

🧪 Verification & Testing

  • npm run build:ui — All 22 Svelte apps and 2 React apps compile cleanly.
  • npm run type-check — Passed with 0 errors and 0 warnings (tsc, svelte-check, deno check).
  • deno fmt — Code formatted according to repository standards.
  • Automated DOM inspection with headless Edge verified 0.00px indicator drift and proper corner badge snapping during drag.
  • Verified both on default theme and custom community themes.
1.mp4

@eythaann

Copy link
Copy Markdown
Owner

I completely forgot about svelte's features for adding transitions, nice addition. I'm going to polish it after merging.

@eythaann
eythaann merged commit 6bc2423 into eythaann:master Sep 15, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants