Repository navigation
feat(spotlight): align tab navigation with full launcher - #3205
Conversation
|
/claude review |
| ActionPanel { | ||
| id: actionPanel | ||
| anchors.top: resultsContainer.bottom | ||
| anchors.left: parent.left | ||
| anchors.right: parent.right | ||
| selectedItem: root.controller.selectedItem | ||
| controller: root.controller | ||
| } |
There was a problem hiding this comment.
The panel is never reset when the selection moves. LauncherContent.qml:757 has a Connections on the controller that does if (actionPanel.expanded && !actionPanel.hasActions) actionPanel.hide(); there is no equivalent here, so with the panel open, arrowing to another result keeps expanded true and selectedActionIndex stale.
Two ways it breaks:
- New item has fewer actions (e.g. plain app with only the primary action, so
actions.length === 1): index stays at 1,executeSelectedAction()hits theselectedActionIndex >= actions.lengthguard and returns — theKey_Returnbranch at line 199 already took the action-panel path, so Enter does nothing at all. - New item has
hasActions === false:heightcollapses to 0 butexpandedstays true, so Enter fires an action from an invisible panel and Escape only closes it instead of the launcher.
Adding function onSelectedItemChanged() { if (actionPanel.expanded) actionPanel.hide() } to the existing Connections { target: root.controller } block fixes both.
confirmed: true
| } | ||
|
|
||
| implicitHeight: _searchAreaH + resultsContainer.height | ||
| implicitHeight: _searchAreaH + resultsContainer.height + actionPanel.height |
There was a problem hiding this comment.
Growing implicitHeight works for the two hosts that size from it (DankLauncherV2ModalSpotlight, NiriOverviewOverlay), but not for the island: DankIsland/Activities/LauncherExpanded.qml fills a fixed 560px sheet (launcherExpandedTarget) with clip: true and sets maxResultsHeight: launcherExpandedTarget.height - Theme.spacingM - bottomInset - searchAreaHeight, i.e. the search bar plus a full results list already consume the whole height. With showResultsWithoutQuery: true the list is normally at that cap, so Tab expands a panel anchored entirely below the clip edge — invisible, while Enter now routes to it.
Subtracting the panel from the results cap keeps it on screen (no binding loop, actionPanel.height only depends on expanded/hasActions):
root.maxResultsHeight > 0 ? Math.max(0, root.maxResultsHeight - actionPanel.height) : Math.min(430, ...)
Claude reviewTwo issues with the action panel now that Spotlight can open it: stale state on selection change, and it being clipped out of view in the island host.
Checked: key handling parity with |
|
/claude review |
Claude reviewNo issues found. Both findings from the previous run are fixed: Checked: the Checked: key handling, panel lifecycle, and layout across all three SpotlightLauncherContent hosts. Model: claude-opus-5. |
Please review PR #3204 first.
Align Spotlight keyboard navigation with Full Launcher.
TabandShift+Tabnavigate the action panel, whileCtrl+TabandCtrl+Shift+Tabcycle launcher categories.Closes #3172