Skip to content

fix(menus): keep every menu under the bar, cap its height and show a more-below hint (0.47.0) - #18

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

nodemode-ai merged 4 commits into
mainfrom
fix/menu-under-bar-0.47.0

Conversation

@nodemode-ai

Copy link
Copy Markdown
Collaborator

fix(menus): keep every menu under the bar, cap its height and show a more-below hint (0.47.0)

Summary

  • Bar menus open just under their button and never cover the menubar. Cause: MenuBar.open used openAt, the right-click routine, which flipped a menu that did not fit and clamped it to 4 px from the window top. Fix: a new openUnder sets the top to the button's bottom edge plus 4 and max-height to menuCap(y) (the smaller of 75% of the window and the room below), while the panel is hidden and before measuring.
  • Submenus (openBeside) take the root menu's floor and the same cap, so they never sit above the bar.
  • A menu cut off by the cap fades its last rows and shows a small down-chevron pill while rows remain below; it is on the first painted frame, fades out at the last row, and switches instantly under reduced motion. The panel is now a card holding a scrolling .menu-list and the .menu-more pill, so border and shadow are unchanged.
  • Right-click menus (ContextMenu in ui/context-menu.ts, also used by the tag cloud, rating button and saved searches) and PopupMenu.openAt keep their pointer-corner placement but take the bar's bottom edge plus 4 as their floor (8 px when the bar is hidden for the macOS menu bar), the same cap and the same hint. Cause: they clamped only to 8 px from the window top.
  • Explanations and the removed lines are in frontend/HASHOUT_LOG.md; the Shell wiki page describes the new behaviour.

Commits

  • fix(menus): keep bar menus and their submenus under the bar (0.47.0)
  • feat(menus): show a more-below hint on a cut-off menu (0.47.0)
  • fix(menus): keep right-click menus under the bar with the cap and hint (0.47.0)
  • chore(release): v0.47.0

Version

v0.47.0 (release commit is last), a minor bump from 0.46.2. Bumped: src-tauri/tauri.conf.json, src-tauri/Cargo.toml, the app's own entry in src-tauri/Cargo.lock, native/formref-core/Cargo.toml and its own entry in native/formref-core/Cargo.lock, frontend/package.json, the two own-version fields of frontend/package-lock.json, backend/app/core/config.py VERSION, clipper/manifest.json, the sidebar foot and the About line in frontend/index.html, and the README badge. CHANGELOG.md has a v0.47.0 section. No demo bundles are tracked in this repo.

Checks

  • npm run build in frontend (runs tsc --noEmit then vite build): clean; only the existing chunk-size warning.
  • Menu probe (headless Chrome, CPU slowed 4 times, frontend/dist served without the engine), all eight bar menus at 1280x800 and 1000x480: every menu's top was 42 px against a bar bottom of 37.5 px, and no frame while opening showed it higher. At 1280x800 Images and Organize hit the cap (600 px = 75% of 800) with the hint on; the others fit (140 to 568 px) with the hint off. At 1000x480 File, Edit, View, Images and Organize were capped at 360 px (75% of 480) with the hint on; Insert, Window and Help fit with the hint off. Every menu's bottom was inside the window, and every hint was off after scrolling to the last row.

Not run: the right-click menu was not measured, because without the engine no board loads and a right-click on the canvas opened no menu in the probe; no "before" build of origin/main was measured. The existing window test (frontend/tests/window/test_window.py) was not run, as it needs the Python engine and the Rust core binary. Not run either: the four-size matrix beyond the two sizes above, the hint fade timings, End and Home and other keyboard checks, submenu placement, and the desktop shell on any OS. DOM law: verified under throttling for the bar menus only (lowest top seen in any frame while opening equals the final top; hint state correct on open); not verified for right-click menus.

Merging

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

MenuBar.open used openAt, the right-click routine, which flipped a menu that did not fit above its point and clamped it to 4 px from the window top, so a long menu in a short window covered the bar. Submenus clamped to the window top as well.

Bar menus now open with openUnder: the top is the button's bottom edge plus 4, never moved up, and max-height is menuCap(y), the smaller of 75% of the window and the room to its bottom, set while hidden and before measuring. openBeside takes the root menu's floor and the same cap, and never places a submenu above the floor.

Run: tsc --noEmit.
A bar menu or submenu that is cut off by the cap fades its last rows into the menu's own background and shows a small pill with a down chevron at its bottom while rows remain below. It is in place when the menu opens, fades out in 160 ms at the last row and back in over 490 ms, and switches with no fade under reduced motion.

The panel becomes a card holding a scrolling .menu-list and the .menu-more pill; the mask sits on the list so the card's border and shadow stay as they were.

Run: tsc --noEmit.
…t (0.47.0)

ContextMenu clamped a menu's top to 8 px from the window top with only the stylesheet's cap, so a long right-click menu opened low in a short window was pushed up over the menu bar.

Every ContextMenu opening now takes the bar's bottom edge plus 4 as its floor (8 px when the bar is hidden for the macOS menu bar), sets max-height to menuCap(floor) before measuring, and shows the same more-below hint. It still opens at the pointer as before; submenus take the same floor and cap. PopupMenu.openAt gets the same floor, cap and hint.

Run: tsc --noEmit.
Menus from the bar stay under it, right-click and other menus opened at a point never go above the bar's bottom edge, every menu takes a cap of three quarters of the window, and a cut-off menu shows a more-below hint. The Shell wiki page says so. Every version site moved from 0.46.2 to 0.47.0 by hand.
@nodemode-ai
nodemode-ai requested a review from gbarnai as a code owner November 30, 2026 22:38
@nodemode-ai
nodemode-ai merged commit 76cac49 into main Nov 30, 2026
5 checks passed
@nodemode-ai
nodemode-ai deleted the fix/menu-under-bar-0.47.0 branch November 30, 2026 22:41
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