Stack: the picked card comes to the front; ⋯ toggles its menu (#245) #292

Closed
kayg wants to merge 0 commits from issue/245-front-and-toggle into dev
Owner

Two things from kayg's phone review of round 3 (#245).

1. The picked card comes to the front again (mockup gallery).

  • A tap, a click or the arrow keys bring the picked card to the front: straight, lifted on a spring (scale 1.06, deeper shadow), and above its neighbours (z-index).
  • It stays there after the pointer leaves.
  • Round 3's motion is unchanged: the bounce-in, and the original's hover push for a mouse.
  • A tap doesn't push the neighbours aside, so nothing slides off a phone's narrow line.

2. ⋯ toggles its menu (shared ContextMenu, packages/ui).

  • One tap opens, the next tap on the same ⋯ closes.
  • Before, the menu's outside-press handler closed it on the second tap's press, and the click that followed opened it again, replaying the opening on every tap.
  • The fix:
    • nextMenu() in packages/ui/src/lib/menu.ts decides open or close by the trigger.
    • The menu remembers its trigger, and its outside-press handler leaves that trigger alone.
    • The web app and the mockup both open menus through nextMenu().
  • Test: packages/ui/src/primitives/e2e/menu.spec.ts (harness section added).
    • It covers toggle open, then closed, then open; four taps give exactly two openings; tap outside and choose still work.
    • It passes in Chromium and WebKit, and fails 2 of 3 with the fix switched off.
  • The web app's svelte-check passes with 0 errors.

Screenshots and frame strips are on #245. Preview is updated.

🤖 Generated with Claude Code

https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T

Two things from kayg's phone review of round 3 (#245). **1. The picked card comes to the front again (mockup gallery).** - A tap, a click or the arrow keys bring the picked card to the front: straight, lifted on a spring (scale 1.06, deeper shadow), and above its neighbours (z-index). - It stays there after the pointer leaves. - Round 3's motion is unchanged: the bounce-in, and the original's hover push for a mouse. - A tap doesn't push the neighbours aside, so nothing slides off a phone's narrow line. **2. ⋯ toggles its menu (shared ContextMenu, `packages/ui`).** - One tap opens, the next tap on the same ⋯ closes. - Before, the menu's outside-press handler closed it on the second tap's press, and the click that followed opened it again, replaying the opening on every tap. - **The fix:** - `nextMenu()` in `packages/ui/src/lib/menu.ts` decides open or close by the trigger. - The menu remembers its trigger, and its outside-press handler leaves that trigger alone. - The web app and the mockup both open menus through `nextMenu()`. - **Test:** `packages/ui/src/primitives/e2e/menu.spec.ts` (harness section added). - It covers toggle open, then closed, then open; four taps give exactly two openings; tap outside and choose still work. - It passes in Chromium and WebKit, and fails 2 of 3 with the fix switched off. - The web app's `svelte-check` passes with 0 errors. Screenshots and frame strips are on #245. Preview is updated. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
Stack: the picked card comes to the front; ⋯ toggles its menu (#245)
Some checks failed
CI / web (pull_request) Failing after 19s
CI / server (pull_request) Successful in 20s
CI / rust (pull_request) Successful in 1m32s
f2cdbf7f25
- Gallery stack: a tap, click or arrow pick brings that card to the front,
  straight, with a springy lift (scale 1.06, deeper shadow), and it stays
  there after the pointer leaves. A mouse still gets the original's hover
  push; a tap only brings the card forward, so nothing slides off a
  phone's line. Round 3's motion is unchanged.
- Shared context menu (packages/ui): a tap on the ⋯ a menu was opened
  from closes it. nextMenu() decides open or close, and the menu's
  outside-press handler leaves its own trigger alone, so the click that
  follows can't reopen it and replay the opening. The web app and the
  mockup both open menus through it. Browser test in the primitives
  harness (fails without the fix, passes with it, Chromium and WebKit).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
Author
Owner

Landed in merge train #329.

Landed in merge train #329.
kayg closed this pull request 2026-10-14 17:39:22 +00:00
Some checks failed
CI / web (pull_request) Failing after 19s
CI / server (pull_request) Successful in 20s
CI / rust (pull_request) Successful in 1m32s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal!292
No description provided.