Add Aero Peek preview with snap-back to dock peek - #392
Conversation
- Hovering a peek card temporarily restores/focuses the window and tracks the prior state (minimized / previously-focused window). - Moving away snaps the window back — minimized windows re-minimize, and focus returns to the previously-focused window. - Clicking commits the preview permanently by clearing the tracking before the dismiss + focus transition. - Accent-coloured border + glow on [data-preview] cards distinguishes preview from plain hover; reduced-motion fallback to a 2px outline.
- Verify minimized → hover restore → leave snap-back chain - Verify non-minimised preview returns focus to previous window - Verify clicking a previewed card commits without snap-back - Verify already-focused cards skip preview entirely - Update window stub to mutate state on restore/minimize so conditional guards behave realistically
- Align left/right dock popovers to the tile's top edge instead of vertical centre, so minimised cards expand downward on hover - Remove translateY(-50%) from left/right CSS transforms; the old centering pushed the top edge into the browser chrome on growth. - Bottom dock anchor is unchanged (stays above the tile, grows upward).
- Reduce the a11y rule which was being overridden by box-shadows.
|
An Open Question: Since introducing a new default peek behavior might not feel seamless for everyone, Should we consider adding an option that lets users choose between the current behavior and an Aero Peek (Windows-style) experience ? |
|
I'm fine adding more settings under the OS Settings :) |
|
@KarunyaChavan Is this PR ready to test/review? |
|
@AllTerrainDeveloper, yes, it's ready for review. You can take a look at the Aero Peek behavior. Regarding the toggle question, I decided to ship with preview as the default behavior and skip adding a toggle for now. The previous hover interaction was destructive because it permanently changed the layout. The new preview is much safer, since it only shows a temporary preview and clicking still behaves exactly the same. I'd especially appreciate your feedback on the peek interaction itself. Does it feel smooth and natural, or does it come across as too abrupt? |
This PR introduces Aero Peek–style preview for dock peek cards. Hovering a card temporarily shows the window's content; moving away snaps the window back to its prior state (minimized windows re-minimize, focus returns to the previously-focused window). Clicking commits the preview permanently.
Closes #359
What changed?
src/dock-peek/index.ts