Repository navigation
ui: a Tree's rows are inside the box Tree returns for Box.Shortcut - #9
Closed
xiaoyumuxi wants to merge 1 commit into
Closed
xiaoyumuxi wants to merge 1 commit into
xiaoyumuxi wants to merge 1 commit into
Conversation
Box.Shortcut on the box a List returns covers the List's rows, which are named in their own scope, through listRowScope. A Tree builds on a ListState and names its rows in the same way, but listRowScope looked only at the Lists of the paint, so a Shortcut on a Tree acted only while the scroll area itself had the focus, never while a row had it: an F4 that opens the selected file of a project tree did nothing once a row was clicked or reached with the arrows. listRowScope now looks at the Trees too.
1 task done
xiaoyumuxi
added a commit
to 1lck/Lithe-IDEA
that referenced
this pull request
Nov 11, 2026
… 测试;项目树 F4 依赖 Lithe-IDEA/Lithe-viva#9(Tree 行焦点下 Box.Shortcut 不生效),测试暂时跳过
32 of 61 tasks
Author
|
上游已以 vivaui#234 合入同等改动,fork main 已通过上游同步 #21(merge commit 7df24f7)包含它,这里不再单独合入。Upstream merged the same change as vivaui#234; fork main carries it through the upstream sync #21 (merge commit 7df24f7). |
21 of 24 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 this changes
Box.Shortcuton the boxTreereturns now acts while one of the tree's rows has the keyboard focus, as it already does forList.listRowScope, which gives a Shortcut the scope a List names its rows in, looked only at the Lists of the paint; it now looks at the Trees too. TheBox.Shortcutdocumentation says Tree rows count as inside the box, andTestTreeShortcutActsWhileARowHasFocusmirrorsTestListShortcutActsWhileARowHasFocus.Why
A Tree builds on a
ListStateand names its rows in their own scope (TreeState.rows), outside the scroll area's scope, exactly as a List does. Without the row scope, a Shortcut on a Tree matched only while the scroll area itself had the focus, which a click or an arrow key never leaves it with. Seen in Lithe: F4 on the project tree, which opens the selected file, never fired once a row was clicked or reached with the arrows.How it was verified
test -z "$(gofmt -l $(git ls-files '*.go'))"go vet ./...go test ./... -count=1exceptcmd/viva, whose 15 packaging tests fail on this machine on base too (Go 1.27.3 and an Xcode SDK that builds for macOS 13.0 or later while the test manifests saymin_system = 12.0); everything else passesthe Tree's F4 acted 0 times with a row focused) and passes with itlistRowScoperuns once perBox.Shortcutdeclaration and now also walks the paint's Trees, usually a handfulWhere the boundary sits
Framework: which focused elements
Box.Shortcutcounts as inside a Tree.Cost
One more short loop when a Shortcut is declared on a box that is not a List.