Skip to content

fix: in-window menus keep to the window and show a more-below hint (0.13.0) - #22

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

nodemode-ai merged 3 commits into
mainfrom
fix/menu-under-bar-0.13.0

Conversation

@nodemode-ai

Copy link
Copy Markdown
Contributor

fix: in-window menus keep to the window and show a more-below hint (0.13.0)

Summary

  • The in-window menus (Windows, Linux, the browser builds and the browser demo) had no height limit: .fx-menu carried no max-height or overflow, so a menu longer than the room under the bar ran off the bottom of the window. open() in frontend/src/shell/menubar.ts now sets an inline max-height: menuCap(top) (the smaller of 75% of the window and the room down to 4 px above its bottom) while the card is visibility: hidden, and the rest scrolls. The top is unchanged: the button's bottom edge plus 2 px, never moved up.
  • New more-below hint (FORM-MENU-OVERLAP-FIX 1.2.0, rule 8): the card is built once with .fx-menu-list (the rows, which scrolls, with the mask) and .fx-menu-more (the pill). showMore(true) runs before the card shows, so the hint is in place on the first painted frame; the list's scroll runs showMore(). Fade out 160 ms, back in 490 ms, none with reduced motion. The pill uses the card's own --bar and --edge-strong tokens.
  • An open menu now closes on window resize, as it already did on blur, so the cap never goes stale.
  • Section 3b: form.ext has no right-click or other point-anchored menu (searched contextmenu, openAt(, place(, popover, role="menu" under frontend/src). The dock's .ft-dock-menu is a CSS-placed panel inside the shared module src/dock/, which is never edited here, so nothing else changed. native-menu.ts is untouched.
  • The browser demo in demo/ is rebuilt with its own README steps and carries the fix and 0.13.0.

Commits

  • fix: cap the in-window menus at three quarters of the window and scroll the rest
  • feat: show a fade and a pill at the bottom of an in-window menu while rows remain below
  • chore(release): 0.13.0, menus in the window keep to the window and show a more-below hint

Version

v0.13.0 (release commit is last), minor bump from 0.12.2. Bumped: src-tauri/tauri.conf.json (formcompiler's version file), src-tauri/Cargo.toml, the formext entry in src-tauri/Cargo.lock, frontend/package.json, the two own-version fields in frontend/package-lock.json, backend/app/__init__.py, frontend/src/shell/version.ts, the demo engine's health version in frontend/src/demo/engine/router.ts, the README badge, and the rebuilt demo/assets/formext.js. CHANGELOG.md has a 0.13.0 section; frontend/HASHOUT_LOG.md (#menu-cap, #menu-more) and demo/HASHOUT_LOG.md are updated.

Checks

  • npm run build in frontend/ (tsc --noEmit then vite build): clean.
  • The demo rebuild (npx tsc -p ../demo/tsconfig.json --noEmit then npx vite build --config ../demo/vite.config.mjs): clean.
  • npx vitest run in frontend/: 10 files, 268 tests passed. No test reads the menu card, so none needed a change.
  • Browser measurement of the rebuilt demo (served over http) in headless Chrome with the CPU slowed 4 times, every bar menu (form.ext, File, Edit, View, Project, Package, Publish, Help) at 1280x800, 1000x480 and 800x320: every menu opened at top 33.5 in every frame seen while opening (button bottom 31.5 + 2), inside the window and within 75% of it. At 1280x800 and 1000x480 no menu is cut off (the longest, File, is 280 px), so no hint showed. At 800x320 the cap is 240 px: File (270 px of rows) and Project (242 px) were cut to 240 px with the hint on (pill opacity 1), and at their last row the hint was off (opacity 0); every other menu fit and showed no hint.
  • Opened from file://, the rebuilt demo at 800x320 showed File with the pill at opacity 1 in each of its first five animation frames after the click (CPU not slowed), and the pill and fade in a screenshot.
  • DOM law: verified under throttling for placement (no frame with the menu at another top while opening, 4x CPU); the hint's first-frame opacity was checked without throttling.

Not run: the engine tests (./formext test engine); the desktop shell (Tauri) and macOS or Windows; the guide's 1871x1080 and 1280x720 sizes; the hint's fade timings (part way out at about 80 ms, back in by about 750 ms); End and Home, and arrow-key focus against the fade (the in-window menus have no arrow-key handling; Tab focus was not checked); reduced motion; a "before" build of origin/main. Note for review: the menu's top (button bottom + 2, unchanged from main) sits 3.5 px above the bottom edge of the 38 px title row that holds the bar (.fx-menubar box bottom at 37), as it did before this change; moving it down would change the look, so it was left as the guide's form.ext row asks.

Merging

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

@nodemode-ai
nodemode-ai requested a review from gbarnai as a code owner November 30, 2026 22:53
@nodemode-ai
nodemode-ai merged commit ad5cc23 into main Nov 30, 2026
3 checks passed
@nodemode-ai
nodemode-ai deleted the fix/menu-under-bar-0.13.0 branch November 30, 2026 22:55
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