Skip to content

feat: long right-click menus stay in the window, scroll, and show a more-below hint (1.33.0) - #21

Merged
nodemode-ai merged 2 commits into
mainfrom
fix/menu-under-bar-1.33.0
Nov 30, 2026
Merged

nodemode-ai merged 2 commits into
mainfrom
fix/menu-under-bar-1.33.0

Conversation

@nodemode-ai

Copy link
Copy Markdown
Collaborator

feat: long right-click menus stay in the window, scroll, and show a more-below hint (1.33.0)

Summary

  • formDAM has no in-window menu bar (group D of FORM-MENU-OVERLAP-FIX 1.2.0), so only section 3b applies: every menu opened at a point goes through openContextMenu in frontend/src/ui/contextmenu.ts (right-click on tiles, albums, people and folders, plus Sort, Quick filters, share and output actions), and that one routine carries the fix.
  • Cause: the menu had no height cap and its top was Math.min(y, innerHeight - h - 8), so a menu taller than the window started above it and its first rows could not be reached; callers that pass rect.top - 230 or rect.top - 160 could also place it above the window.
  • Fix: an inline max-height of min(75% of the window, window - 8 px) is set while the card is visibility: hidden, before it is measured, and left and top are floored at 4 px (the window top). It still opens at the pointer, slid left or up to stay inside as before. The menu also closes on window resize.
  • New: the rows scroll inside the glass card (.ctx-menu-list), and a fade with a 56 by 12 pill (.ctx-menu-more, --glass-bg, --glass-border, --text-muted) shows while rows remain below; it is in place on the first painted frame and fades out at the last row (160 ms) and back in (490 ms). No change to colours, glass or spacing; no new z-index.
  • The filter popover in the library top bar (.menu, placed by CSS under its button, 12 rows) is not opened at a point and was left as it is.

Commits

  • feat: long right-click menus stay in the window, scroll, and show a more-below hint
  • chore(release): v1.33.0

Version

v1.33.0 (release commit is last). Bumped: frontend/package.json (formcompiler's version file; Tauri reads it), the two own-version fields of frontend/package-lock.json, src-tauri/Cargo.toml, the formdam-desktop entry in src-tauri/Cargo.lock, the README badge. BUILD_NOTES.md has a v1.33.0 section. The repo has no CHANGELOG.md and no committed demo bundles.

Checks

  • npm run build (tsc --noEmit then vite build): clean.
  • vitest run: 9 files, 36 tests passed. No test touches the menu.
  • Headless Chromium, CPU slowed 4 times, Vite dev server with no engine running, openContextMenu called with synthetic rows (not a real right-click on a library):
    • 1280x800, 30 rows at (300, 60): top 60, height 600 (75% = 600), bottom 660, hint on, off at the last row; at (600, 760): top 192, height 600, bottom 792, hint on.
    • 1000x480, 30 rows: height 360 (75% = 360), tops 60 and 112, bottoms 420 and 472, hint on, off at the last row; 13 rows (the Sort menu's length) at 1000x480: height 360, hint on.
    • Menus that fit (13 rows at 1280x800, 5 rows near the bottom right corner) had no hint and kept the pointer-corner placement.
    • In every case the first painted frame already had the final top, height and hint state (pill opacity 1 or 0); the lowest top seen in any frame equalled the final top.
  • DOM law: verified under throttling (4x CPU), for the menu opening.

Not run: a "before" measurement on origin/main; real right-clicks with a library open (no engine here); the 1871x1080 and 800x320 sizes; the hint fade timings at 80, 380, 245 and 750 ms; keyboard checks (the menu has no arrow-key navigation, only Escape and Tab); the desktop (Tauri, WKWebView) build.

Merging

Merge with a merge commit so each commit and its signature stays. Do not squash.

…ore-below hint

Menus opened at a point (right-click, Sort, Quick filters, share and album actions) are capped at three quarters of the window before they are measured, never start above the window top, and keep opening at the pointer. The rows scroll inside the glass card, and a fade with a small pill shows while rows remain below. The menu closes when the window is resized.
@nodemode-ai
nodemode-ai requested a review from gbarnai as a code owner November 30, 2026 23:21
@nodemode-ai
nodemode-ai merged commit 5e4dbe4 into main Nov 30, 2026
5 checks passed
@nodemode-ai
nodemode-ai deleted the fix/menu-under-bar-1.33.0 branch November 30, 2026 23:23
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