Repository navigation
fix(app): clamp context menus using their measured size - #45
Merged
Merged
Conversation
The terminal and tab menus clamped to a hard-coded height guess, so Find… and the last tab items were cut off near the bottom edge. Measure the rendered menu and clamp with its real size; stay hidden until measured.
4 of 5 tasks
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.
What and why
The terminal and tab context menus clamped their position with a hard-coded height/width guess, so Find… and the last tab items were cut off when opened near the bottom or right edge. Both menus now measure their rendered size and clamp with it (
utils/menuPosition.ts), and stayvisibility:hiddenuntil measured. Initial focus waits for the measured render. Position is unchanged when there is room.Fixes #44
How you checked it
cargo fmt --check,cargo clippy -- -D warningsandcargo testpass (95 Rust tests)pnpm turbo check test buildandpnpm version:checkpass (159 Vitest tests)menuPosition.test.ts)CHANGELOG.mdupdatedKnown gap: not checked visually in the running app at 100/125/150% display scaling.