Repository navigation
fix(menus): menus keep under the menu bar, at most three quarters of the window tall, with a more-below hint (0.94.0) - #18
Merged
Conversation
…most three quarters of the window tall, and scroll the rest (0.94.0) MenuBar.open placed its menus with openAt, the right-click routine, which flipped a menu taller than the room under the bar above its point and clamped it to 4 px from the window top, over File, Edit and the rest of the bar. Bar menus now open with openUnder: the top stays at the button's bottom edge plus 4 px, and an inline max-height of min(75% of the window, the room below) is set before the menu is measured. Submenus take the same floor and cap.
…menu while rows remain below (0.94.0) The rows move into their own scrolling list inside the menu's glass card, so the bottom rows fade into the card's own glass and a 56 by 12 pill with a down chevron sits over the fade. At the last row both fade out in 160 ms; scrolled back up they return over 490 ms. A menu opens with the hint already in place, a menu that fits shows nothing, and reduced motion shows and hides it with no fade.
…ree quarters of the window and show the more-below hint (0.94.0) openAt, used by the layers, pages, links and panel group menus, clamped a long menu to 4 px from the window top, over the menu bar. It now keeps the menu's top at or under the bar's bottom edge (the window top when the bar is hidden for the macOS system menu), sets the same cap before measuring, and shows the hint. The menu still opens at the pointer, flipped above or left when there is no room, and its submenus follow the same floor and cap.
Version 0.94.0 in the fourteen places it is kept, the changelog entry, and the three browser demos rebuilt with this version so they carry the menu fix and the more-below hint. Sites: README badge, backend/app/__init__.py, frontend/package.json and package-lock.json (two fields), frontend/src/version.ts, native/Cargo.toml and native/Cargo.lock (seven packages), src-tauri/Cargo.toml, Cargo.lock (two packages) and tauri.conf.json, and the backend, frontend and native HASHOUT headers. Demos: npm run demo rewrites demo/assets/demo.js and demo.css (the event and report pages share them); npx tsc --noEmit -p ../demo 0. Ran: npx tsc --noEmit 0, npm run build clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(menus): menus keep under the menu bar, at most three quarters of the window tall, with a more-below hint (0.94.0)
Summary
MenuBar.openplaced them withPopupMenu.openAt, the right-click routine, which flips a menu that does not fit below its point and clamps it to 4 px from the window top; the stylesheet capcalc(100vh - 8px)was bigger than the room under the bar. Fix: a newopenUnderkeeps the top at the button's bottom + 4 and sets an inlinemax-heightofmin(75% of innerHeight, innerHeight - top - 4)while the panel is hidden, before it is measured.openBeside) read the root menu's floor, take the same cap before measuring and are never placed above the floor (they clamped to 4 px from the window top before)..cv-menu-listinside the non-scrolling.cv-menuglass card; the list carries the mask fade and.cv-menu-moreis the 56 by 12 pill on--glass-bgand--glass-border. 160 ms out, 490 ms back in, none under reduced motion, already in place on the first painted frame (showMore(true)beforevisibilityis restored).openAt: the layers, pages and links panels' menus, the panel group menus and the group head menu) keep their pointer-corner placement but now take the.cv-menubarbottom + 4 as their floor (4 px when the bar is hidden for the macOS system menu), the same cap and the hint.native-menu.ts,wantsNativeMenus) is untouched. No colour, glass, blur, spacing or z-index change. The removed lines are quoted infrontend/HASHOUT_LOG.md.Commits
Version
v0.94.0 (minor bump from 0.93.2; release commit is last). Sites bumped: README badge,
backend/app/__init__.py,frontend/package.json,frontend/package-lock.json(two own fields),frontend/src/version.ts,native/Cargo.tomlandnative/Cargo.lock(the seven formdesign-* packages),src-tauri/Cargo.toml,src-tauri/Cargo.lock(formdesign and formdesign-gpu) andsrc-tauri/tauri.conf.json(formcompiler's version file), plus the backend, frontend and native HASHOUT headers.CHANGELOG.mdhas a 0.94.0 section, which also lists the two changes merged to main after 0.93.2 (third-party notices in Preferences, agent finder 1.1.0). The browser demos were rebuilt withnpm run demo(demo/assets/demo.jsanddemo.css, shared by the event and report pages).Checks
npx tsc --noEmit(frontend): 0 errors, after the hint commit and after the right-click commit.npm run build(tsc and vite build): clean.npm run demo: built all three pages;npx tsc --noEmit -p ../demo: 0 errors. The rebuiltdemo/assets/demo.jscarries 0.94.0, anddemo.csscarries@property --menu-more,.cv-menu-listwith the mask, and.cv-menu-more.file://and from a local http server, in headless Chrome. The page stayed on Home: the demo session did not open its document, so the menu bar was never built (it is built when the engine's command list arrives) and there were no menus to measure. No menu numbers were taken.Not run: every browser measurement in guide section 5 (bar menus and submenus at 1871x1080, 1280x720, 1000x480 and 800x320 under 4x CPU slowdown; the right-click before and after numbers; the hint timings, End and Home, the focused-row check; each demo opened from
file://showing the hint). The app's existing window smoke (frontend/tests/window/test_window.py) was not run, because it needs the Python engine and the Rust layout core, which this brief does not build. The DOM law is not verified in a browser; by reading the code, cap, position and hint are all set while the panel isvisibility: hiddenand no rows are rebuilt. The menus have no arrow-key navigation in this app, so the keyboard checks do not apply.Merging
Merge with a merge commit so each commit and its signature stays. Do not squash.