feat(cmdpal): list hover actions with extension SDK configuration#48863
feat(cmdpal): list hover actions with extension SDK configuration#48863tonythethompson wants to merge 8 commits into
Conversation
Display up to three MoreCommands actions as icon buttons when a list row is hovered or keyboard-selected, following the PowerToys Run pattern. Tags hide while hover actions are visible. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@tonythethompson, can you confirm you built/ran this locally? Also, please add a video of this working. |
Route row pointer events through the ListViewItem template root so hover action icons receive clicks. Adds hit-test helper, UI tests, and dev scripts. Co-authored-by: Cursor <cursoragent@cursor.com>
Introduce HoverActionResolver with home host-command exclusion, EnableListHoverActions setting in Appearance, and IHostContextItem markers for pin/dock context items. Co-authored-by: Cursor <cursoragent@cursor.com>
Add HoverActionsMode, IListPage2, ICommandItem2, ICommandContextItem2, and ICommandProvider5 with toolkit defaults for extension authors. Co-authored-by: Cursor <cursoragent@cursor.com>
Add HoverActionResolverTests covering user toggle, home filtering, explicit mode, and visibility. Document hover configuration in the extension template. Co-authored-by: Cursor <cursoragent@cursor.com>
Refine host/provider resolution for home vs extension surfaces, align hover strip with static tags, use hybrid PerformCommandMessage context for top-level IPage navigation vs context-menu invokables, and remove dev-only debug logging plus QuickShell-specific UI tests from the PR. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@michaeljolley Demo: https://github.com/user-attachments/assets/737a46ed-aa93-463f-a0f8-0e855a461807 Covers:
Follow-up in latest commit: hybrid invoke context (top-level |
|
Commenter does not have sufficient privileges for PR 48863 in repo microsoft/PowerToys |
Document resolution precedence, mode semantics, host-injected filtering, visibility defaults, HomeMaxHoverActions, and the user master toggle so agents and developers can configure hover actions without reading the host. Co-authored-by: Cursor <cursoragent@cursor.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Azure Pipelines Verify XAML formatting failed on ContainerContentChanging attribute placement; reorder per repo XAML Styler settings. Co-authored-by: Cursor <cursoragent@cursor.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Honestly, I think this might need some discussion. Command Palette already has an action/context menu for this, and I'm worried this might fragment the UX. |
|
Thanks for raising this, @jiripolasek. I agree it’s worth talking through. The way I’m thinking about it: hover actions aren’t meant to replace the context menu. They’re just a quicker way to run a small subset of the same On why not stick with context menu only: For pointer users, it’s one click instead of right-click, find the action, click again. For keyboard users, with There are also a few guardrails in the design to keep this from feeling like a second, competing UI: There’s a user-level toggle in Settings → Appearance (“List hover actions”), default on but globally disableable. Extensions can opt out entirely with One thing I’d genuinely like team input on: should this stay on by default for new installs, or default off until we’ve seen more extension adoption and UX feedback? I’m also open to narrowing scope, for example extension list rows only and not home rows, if that would feel less fragmented. |
|
@michaeljolley Should we discuss things here or run it through a regular issue? |
This should have been an issue with discussions before becoming a PR. @tonythethompson feel free to create one. |
michaeljolley
left a comment
There was a problem hiding this comment.
RC just to block merging until we discuss.
You're right, sorry for jumping straight to a PR. Opened #48885 for discussion. Happy to mark this PR as draft or closed while the issue is discussed. |
Summary
ContentTemplateRootroutingHoverActionResolverwith home vs extension defaults; host pin/dock/move items excluded unless explicitly flaggedIListItemforIPagenavigation; context-menu invokables keepICommandContextItem(matches context menu)HoverActionsMode,IListPage2,ICommandItem2,ICommandContextItem2,ICommandProvider5for dev configurabilityMoreCommands)Demo
202606251352.mp4
Configuration layers
EnableListHoverActionson/offShowInHoverActions/HoverOrder, page max & visibilityMoreCommandsSDK modes
Default/FirstN— first N visible; upgrades toExplicitwhen any command setsShowInHoverActionsExplicit— flagged commands only, sorted byHoverOrderAllMoreCommands— all visible commandsNone— no hover stripNested
IListPageinstances configure themselves (no depth API).Resolution order
ICommandItem2(HomeHoverActionsMode, etc.)ICommandProvider5(DefaultHoverActionsMode)IListPage2(HoverActionsMode,MaxHoverActions,HoverActionsVisibility)Test plan
tools/build/run-cmdpal-dev.ps1HoverActionResolverTests,HoverActionClickHelperTestsOnHoverOnlyon home,HoverOrSelectedin extension lists by default)Notes
Microsoft.CommandPalette.ExtensionsNuGet ships hover APIs)