Repository navigation
fix(menus): menus keep under the menu bar and show when more rows are below (0.14.0) - #22
Merged
Merged
Conversation
MenuBar.show opened its menus with openAt, the right-click routine, which flips a menu above its point and clamps it to 4 px from the window top, so a menu taller than the room under the bar covered the bar. The new openUnder keeps the top under the button and sets an inline max-height of 75% of the window (never past its bottom) while the card is hidden. Submenus read that floor, take the same cap and never rise above the bar.
The menu card now holds a scrolling list and a small pill. While rows remain below the cap, the bottom rows fade into the card's glass and the pill with a down chevron shows; at the last row both fade out (160 ms) and come back when scrolled up (490 ms). The hint is in place on the first painted frame, a menu that fits shows nothing, reduced motion drops the fades, and End and Home focus the last and first row.
…ow the hint openAt clamped to 4 px from the window top, so a long right-click or other point menu could cover the menu bar. It now keeps the pointer-corner placement and its flips but never rises above the bar's bottom edge (the window top when the bar is hidden), takes the same three-quarter cap before measuring and shows the more-below hint. Open menus close on a window resize.
Sets 0.14.0 at the version sites of the 0.13.2 release (README badge and line, backend, frontend package and lock, version.ts, the native and desktop Cargo files and their lock entries, pyproject, tauri.conf.json, form-functions.json) and adds the CHANGELOG entry. The three demo bundles are rebuilt with the commands of demo/README.md; they carry the menu fix and the hint and say 0.14.0.
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 and show when more rows are below (0.14.0)
Summary
MenuBar.showopened them withopenAt, the right-click routine, which flipped a tall menu above its point and clamped it to 4 px from the window top, over the bar; the stylesheet cap ofcalc(100vh - 8px)was taller than the room under the bar. Fix: newopenUnder, which sets the cap inline while the card is stillvisibility: hiddenand records the bar floor; submenus (openBeside) read that floor and take the same cap.contextMenu()andopenAt) keep their pointer-corner placement and flips but never rise above the bar's bottom edge (the window top when the bar is hidden for the macOS system menus), and take the same cap..cv-menu-listand a.cv-menu-morepill. While rows remain below the cap the bottom rows fade into the card's glass and the pill shows; at the last row both fade out (160 ms) and return when scrolled up (490 ms). It is in place on the first painted frame (showMore(true)while hidden); reduced motion drops the fades. End and Home focus the last and first row.Commits
Version
v0.14.0 (release commit is last), a minor bump from 0.13.2. Bumped: README badge and version line,
backend/app/__init__.py,frontend/package.jsonand the two own-version fields offrontend/package-lock.json,frontend/src/version.ts,native/Cargo.tomland the seven fencoder entries ofnative/Cargo.lock,native/fencoder-py/pyproject.toml,src-tauri/Cargo.tomland the formencoder entry ofsrc-tauri/Cargo.lock,src-tauri/tauri.conf.json(formcompiler's version file),form-functions.json. CHANGELOG section added. Demo bundlesdemo/,demos/broadcast/,demos/inspect/rebuilt; each reads 0.14.0 and containscv-menu-more/has-more.Checks
npm run buildinfrontend/(runstsc --noEmitthenvite build): clean, exit 0.demo/README.md, run once after the bump: exit 0. Each bundle's only version string reads 0.14.0.demo/(served over http), CPU slowed 4 times, at 1280x800 and 1000x480. The demo has two bar menus. File: top 38 px against a bar bottom of 33.5 px, height 190 px, bottom 228 px, inside the window and under 75% at both sizes. Help: top 38, height 74, bottom 112 at both sizes. The lowest top seen in any frame while opening was 38 for both, so nothing painted over the bar. Queue output row right-click menu: opened at the pointer (499, 185), top 185, height 117, bottom 302 at both sizes. None of these menus is cut off at these sizes, so the hint was correctly off and its on state was not exercised.Not run: the existing window test (
frontend/tests/window/test_window.py) and backend tests, because they need the Python engine service with the native Rust core built, which this machine does not build; it does not read menu rows orscrollTop, so no test edit was needed. The full desktop interface in Chrome (it needs the engine), so the longer bar menus of the app (Edit, View, Window and the like), the hint in its on state, and its 160 ms and 490 ms timings were not measured. The 4-size matrix of guide section 5, End and Home and other keyboard checks, submenus,file://opening of the demos, the macOS system-menu path, and a before measurement onorigin/mainwere not run. DOM law: verified under throttling only for the demo's bar menus and the Queue right-click menu (the lowest top while opening equalled the final top); not verified for a capped menu with the hint on.Merging
Merge with a merge commit so each commit and its signature stays. Do not squash.