Repository navigation
fix(menus): menus keep under the menu bar, at most three quarters of the window, with a more-below hint (0.11.0) - #30
Merged
Conversation
…most three quarters of the window tall
… bottom while rows remain below
… cap and show the hint
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, with a more-below hint (0.11.0)
Summary
MenuBar.openplaced them withPopupMenu.openAt, the routine for a point, which flipped a menu that did not fit below its button above it and clamped it to 4 px from the window top; the stylesheet capcalc(100vh - 8px)was taller than the room under the bar. Fix: a newopenUnderkeeps the top at the button's bottom plus 4 px and sets an inlinemax-heightofmin(75% of the window, room to the bottom less 4 px)while the menu is hidden, before it is measured. Right to left the menu's left is still the button's right edge less the menu's width.openBesidereads the top menu's floor instead of clamping to the window top..cv-menu-listinside the card so the mask does not fade the glass, border or shadow.openAt(point-anchored menus) gets the same floor (the.cv-menubarbottom edge, or the window top when the bar is hidden for the macOS system menus), cap and hint, and keeps its pointer-corner placement. FormNET has no caller ofopenAttoday; this keeps the routine right for any future right-click menu.Commits
Version
v0.11.0 (release commit is last). Bumped:
MakefileVERSION(formcompiler's version file), the README badge,src-tauri/Cargo.toml, theformnet-desktopentry insrc-tauri/Cargo.lock,src-tauri/tauri.conf.json,web/package.jsonand the two own-version fields ofweb/package-lock.json.CHANGELOG.mdhas a 0.11.0 section. No committed demo bundles in this repo.Checks
tsc --noEmit -p tsconfig.jsoninweb/: clean, after each commit.npm run buildinweb/(type check and Vite production build): passes.?token=set, no server behind it), CPU slowed 4 times, all five bar menus at 1280x800 and 1000x480: every menu's top was 38 in every frame while it opened, under the bar's bottom edge at 33.5, and inside the window. At 1280x800 every menu fits (tallest View, 512 of a 600 cap), no hint. At 1000x480 View is 360 tall (75% of 480), hint on and pill opacity 1 when measured after opening, off after scrolling the list to its end; the other menus fit and show no hint.origin/main: View at 1000x480 opened at top 4, 472 tall, over the bar whose bottom edge is at 33.5.dir="rtl"set on the page) at 1000x480: View's right edge 911 equals its button's right edge 911.openAt); the window smoke (web/tests/window/test_window.py) andmake check/make test, which need the Go server built; Go, Rust and Tauri builds; the desktop app on Linux, Windows and macOS with Menus in Window. No browser demo bundles exist to open fromfile://. DOM law: verified under throttling for position and size (the menu's top never above 38 in any frame while opening, CPU 4 times slower); the hint's first frame was not frame-sampled.Merging
Merge with a merge commit so each commit and its signature stays. Do not squash.