Repository navigation
Scroll a cut-off menu label to its end while its row has the cursor - #19822
Open
onno-schuit wants to merge 2 commits into
Open
onno-schuit wants to merge 2 commits into
onno-schuit wants to merge 2 commits into
Conversation
A menu row too long for the card ends in dots, and nothing shows the rest: the Super+K keybindings menu opens at a fixed 800 wide, so a longer binding description cannot be read there at all. The label under the cursor, from the pointer or the arrow keys, now scrolls to its end after a short pause, waits, and comes back. Labels that fit never move, and with animations turned off the row stays as it was.
Contributor
[Medium impact] The PR appears safe to merge; all three previous findings are addressed. SummaryLong labels scroll while their menu row is highlighted.
All three previous findings are addressed. No new actionable issues were found. Reviews (3) · Last reviewed commit: "Stop a menu label's scroll when the menu..." · Reviewed by Greptile |
The menu stays loaded when it closes and keeps its cursor, so the label under the cursor went on scrolling in a menu nobody could see. The marquee now also needs the menu open. The fixture holds Style.reduceMotion off, so a desktop with animations turned off no longer fails it, and it runs from menu-test.sh instead of a file of its own.
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 changes
A menu row whose label is too long for the card ends in dots, and nothing shows the rest. Hovering does nothing, and clicking runs the row. In the Super+K keybindings menu, which opens at a fixed 800 wide, that means a binding with a longer description can't be read at all: mine, "Sleep when all Claude Code sessions are done (arm / disarm)", showed as "Sleep when all Claude Code sessions ...".
With this change, the label of the highlighted row (what
Menu.qmlcalls the cursor) scrolls to its end after a short pause (700 ms), waits there (1.5 s), and comes back. It doesn't matter whether hovering or the arrow keys highlighted the row. Moving the pointer off the row doesn't stop it: the highlight stays, and so does the scroll, until another row is highlighted or the menu closes. Labels that fit never move, a row that isn't highlighted stays elided as before, and withomarchy toggle animationsoff nothing scrolls (Style.reduceMotion). Right-to-left labels start at their right edge and scroll the other way.All durations go through
Style.duration(). The scroll itself is linear, because it's constant motion, and the way back eases out withStyle.easeOutin 250 ms.#15758 and #18320 widen menus to fit their widest row, up to 520, but both leave menus that set their own width (dmenu,
omarchy-menu-select --width) as they are, so Super+K keeps cutting labels off with either of them. This change works alongside both. Related: #11212.Verification
test/shell.d/menu-test.shnow also runs the realMenu.qmlunder Quickshell (fixturemenu-marquee) with a select menu narrower than its first option. With the short row highlighted, the long label is cut off and still. With the long row highlighted, it scrolls to its end. With the short row highlighted again, it's at rest, and the short label, which fits, never moves. With the long row highlighted again and the menu closed, the long label is at rest too. The fixture holdsStyle.reduceMotionoff, so a desktop with animations turned off doesn't fail it.quattrowithout this change, that test fails with "the long row with the cursor does not scroll". With faults rigged into the change it fails each time: no reset when the highlight moves on, scrolling without the highlight, short labels scrolling too, and scrolling on after the menu closes ("the long label keeps scrolling after the menu closed").hyprctlthat reports animations off, the fixture passes; without the hold onStyle.reduceMotionit fails with "the long row with the cursor does not scroll".test/shell.d/motion-test.shpasses, andtest/shell.d/menu-test.shpasses in full.Menu.qml, passes six behavior tests offscreen inqmltestrunner: elided at rest, scrolls to its end and back, resets when the highlight moves on, short label still, reduced motion still, right to left.Screenshots
Super+K, "sleep" typed, the row highlighted: the label scrolls to its end and back.
menu-label-marquee.mp4