Skip to content

fix(editor): menus keep under the menu bar, stop at three quarters of the window and show a more-below hint (0.37.0) - #50

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

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

Conversation

@nodemode-ai

Copy link
Copy Markdown
Collaborator

fix(editor): menus keep under the menu bar, stop at three quarters of the window and show a more-below hint (0.37.0)

Summary

  • Menu bar menus open just under their button and are at most min(75% of the window, room to the bottom) tall; the rest scrolls. Cause: Menubar.place capped at the room under the bar with a 120 px floor, so with less than 124 px of room the floor pushed the menu past the bottom and Math.min(top, ...) moved it up over the bar.
  • Submenus and the folded menus that open beside More menus take the same cap measured from the bar's bottom edge (menuCap(barFloor())) and their top is clamped to at least barFloor(); they still open beside their row. Cause: beside had no inline cap (only the stylesheet's calc(100vh - 8px)) and was clamped to 4 px from the window top.
  • Right-click menus (layers, pages, canvas) and the path's hidden-levels menu, all through showContextMenu's place, keep their pointer-corner placement but take the bar floor and the cap before measuring. Cause: the same 4 px clamp and stylesheet cap.
  • New more-below hint (guide 1.2.0 rule 8): rows live in a .fw-menu-list scroller inside the .fw-menu card; the list's mask fades the bottom rows and a 56 by 12 .fw-menu-hint pill shows while rows remain below, in place on the first painted frame, out in 160 ms at the last row, back in over 490 ms. Glass tokens --glass-bg and --glass-border. The pill is not .fw-menu-more because that class is already the More menus button.
  • Arrow keys, Home and End in bar menus and context menus keep the focused row above the fade (keepInView, list-only scrolling). native-menu.ts is untouched.
  • tests/unit/ui/context-menu.test.ts read the separators from the card's children; it now reads them from .fw-menu-list (the smallest hand edit, one selector).

Commits

  • fix(editor): menus keep under the menu bar and stop at three quarters of the window, and a cut-off menu shows a fade and a pill while rows remain below
  • chore(release): bump version to 0.37.0, with its changelog

Version

v0.37.0 (release commit is last). Bumped from 0.36.0: VERSION, frontend/package.json, the two own-version fields of frontend/package-lock.json, src-tauri/tauri.conf.json, src-tauri/Cargo.toml, the formweb entry of src-tauri/Cargo.lock, native/Cargo.toml, the four own crates in native/Cargo.lock, backend/app/config.py, the README badge, .docs/wiki/Home.md and both formweb-harness skill files. CHANGELOG.md has a 0.37.0 section that also covers the unreleased commits on main since v0.36.0 (licence notices, Agent Connect, origins, MCP fixes). No committed demo bundles (frontend/public/demos is site data, not built output).

Checks

  • npm run build (tsc --noEmit && vite build): clean.
  • vitest run: 35 files, 749 tests passed.
  • Browser, production build served statically in headless Chrome with the CPU slowed 4 times (no backend, so no site open):
    • 1280x800, all 10 bar menus: top 38 under a bar whose bottom is 33.5 in every frame while opening; tallest 600 px (75% of 800), bottom 638; Edit, View, Page, Vector and Window cut off with the hint on and pill opacity 1, hint off and opacity 0 after scrolling to the end; File, Insert, Arrange, CMS and Help fit and show no hint.
    • 1000x480, the 5 visible bar menus and More menus: top 38, height at most 360 (75% of 480), bottom 398; hint on exactly when cut off, off at the end.
    • More menus cascade at 1000x480 and 1000x420: every folded menu opened beside its row with top at or under 34 + 4 and height at most 360 and 315; Vector and Window cut off with the hint on.
    • End and Home in File at 1000x480 moved focus to the last and first enabled rows; arrowing down never left the focused row in the fade.
  • DOM law: verified under 4x CPU throttling for bar menus and the More cascade (lowest top seen in any frame was 38); no network throttling.
  • Not run: right-click menus in a browser (they need an open site and the service, which were not run), so no before and after numbers for the longest one; a build of origin/main for before numbers; the 1871x1080, 1280x720 and 800x320 sizes; a nested submenu inside a bar menu (none was reachable without a site); the hint timings (part way at 80 ms, gone by 380 ms, back by 750 ms); reduced motion; type-ahead next to the fade; the window tests in tests/window (Playwright with the service); the desktop app on any system; Firefox, Safari and WebKitGTK; a screen reader.

Merging

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

… of the window, and a cut-off menu shows a fade and a pill while rows remain below

Bar menus capped themselves at the room under the bar with a 120 px floor, so
in a short window the floor pushed them past the bottom and they were moved up
over the bar. Submenus, the folded menus beside More menus and the right-click
menus (layers, canvas, pages, crumbs) had only the stylesheet's 100vh - 8px
cap and were clamped to 4 px from the window top, over the bar.

Bar menus now keep their top under their button and take min(75% of the
window, room to the bottom). Submenus and the More cascade take the same cap
from the bar's bottom edge and never go above it; they still open beside their
row. Right-click menus keep opening at the pointer and take the same floor and
cap. Rows live in a .fw-menu-list scroller inside the card, whose mask fades
the bottom rows while a 56 by 12 pill shows that rows remain below; it is in
place on the first frame, fades out at the last row and back in when scrolled
up. Arrow keys, Home and End keep the focused row above the fade.

The context menu unit test reads separators from the list instead of the card.
@nodemode-ai
nodemode-ai requested a review from gbarnai as a code owner November 30, 2026 22:40
@nodemode-ai
nodemode-ai merged commit cd7aef6 into main Nov 30, 2026
11 checks passed
@nodemode-ai
nodemode-ai deleted the fix/menu-under-bar-0.37.0 branch November 30, 2026 22:48
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