Skip to content

Animate dock items, the tray flyout and window previews - #154

Open
JulienMaille wants to merge 6 commits into
SumirSeth:mainfrom
JulienMaille:feat/dock-animations
Open

JulienMaille wants to merge 6 commits into
SumirSeth:mainfrom
JulienMaille:feat/dock-animations

Conversation

@JulienMaille

Copy link
Copy Markdown
Contributor

What changed

Three related motion changes to the dock:

  1. Dock items animate. Icons slide to their place, fade in on entry and fade out on exit, on a 220 ms enter / 240 ms move / 190 ms exit. The transitions are interruptible: an icon that comes back while it leaves continues from where its exit got to, rather than jumping.
  2. The notification flyout settles with a bounce. It zooms from 0.82 to just past full size and rests at 1, over 240 ms, also interruptible.
  3. Window previews rise into place as they fade in. The preview popup starts 10 DIP below its rest position and rises over 180 ms with the dock's usual smoothstep, so the motion reads across the whole show. It records the position the layout gave it, so a resize while it shows keeps the rise anchored.

The rise and the flyout bounce are the only parts not already upstream; the dock item motion and the preview fade both came from feat/dock-pins-motion and feat/dock-thumbnail-previews, where the preview rise had been lost in b7cf58f when previews were rewritten as popup-owned DWM thumbnails.

The last two commits are a tidy-up of the motion code (constructors on Motion, a named TrayPrior instead of a five-tuple, splitting update_tray_motion) and a changelog entry. No behaviour change: the rise measured 860 -> 850 px over ~167 ms before and after the tidy-up.

How I verified it

  • cargo fmt --all --check, cargo clippy --workspace --all-targets -- -D warnings and the same clippy with --features wisp/nightly,wisp/perf-trace, all clean. Before the tidy-up clippy failed on a dead frame_paced field the cherry-picks carried.
  • cargo test --workspace: 283 pass, 4 ignored. New tests cover the rise's rest position and DPI scaling, the flyout's overshoot, and that a slide in overshoots while a slide out does not.
  • Built this branch in release and ran it on this machine: one 1920x1080 screen at 100% scale, autohide on, dock visible, Window list = thumbnails.
  • Hovered an app with several windows until the preview popup appeared, then sampled the popup's rect every 4 ms with GetWindowRect: the popup travelled 10 px upward over ~167 ms (860 -> 850) and settled at rest. The same probe on main v0.9.1 shows no movement at all.
  • Opened and closed an app to drive the item entry and exit motion, and hovered the dock row, with nothing unexpected in the process logs.

What I did not test

  • Multiple monitors, 125%+ scale, Windows 10, autohide off, virtual desktops. The rise scales by DPI in code but I only measured it at 100% on this one screen.
  • The tray flyout bounce with a busy tray. This machine shows few notification icons, so the flyout's icons barely fill a grid and its bounce has had little to move.
  • Perf. I did not run measure-perf.ps1 or bench/bench.ps1 before and after. The motion only runs while something is moving and shares the existing 11 ms tick, so idle should be unchanged, but that is an argument, not a measurement.

Not fixed

No issue.

Julien Maille and others added 6 commits November 30, 2026 20:12
The dock slid in with a small overshoot, but its notification flyout appeared all at once. Start the flyout slightly small and let it settle just past full size, using the same ease-out-back curve.
Window previews only faded before: the popup appeared at its full
position and the alpha came up, with no sense of settling.

Give the popup a little travel as it shows. It starts 10 DIP lower and
rises to its rest position over 180 ms, easing with the dock's usual
smoothstep so the motion reads across the whole show rather than
flickering at its start. The popup records the position the layout gave
it, so a resize while it shows keeps the rise anchored and the popup
ends exactly where it belongs.

An 11 ms tick drives it, as the fade already needed, so nothing new
runs while the dock is idle.
The cherry-picks left the motion code heavier than it needs to be, and
one field, `frame_paced`, was never read, so CI's clippy run failed.

Changes that keep the motion exactly as it was:

- Drop the dead `frame_paced` field.
- Build each `Motion` through `arriving` or `departing` instead of
  spelling out the same six fields at every call site.
- Reuse `ease::out_cubic` rather than repeating its cubic in
  `Motion::progress`.
- Name the position a tray icon had before the tray changed
  (`TrayPrior`) instead of passing a five-element tuple around, and
  split `update_tray_motion` into `tray_prior` and `queue_tray_exits`
  so each part states one thing.
@JulienMaille
JulienMaille marked this pull request as ready for review November 30, 2026 22:26
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.

1 participant