Skip to content

CmdPal: experiments with the great context menu #40721

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jiripolasek
Copy link
Contributor

@jiripolasek jiripolasek commented Jul 20, 2025

Summary of the Pull Request

This is not expected to be a production-worthy branch—consider it more of a dumping ground for sharing ideas.

  • Always place the context menu in its natural position when invoked by mouse 🐭

    • Make the position predictable
  • Mouse cursor changes to a resize arrow after opening the context menu 🐭

    • Figure out the root cause / find a better workaround / report or fix in WinUI
  • Prominent search box

    • The area feels cramped and too busy; it draws too much attention
    • Remove explicit focus, but focus the box if the user starts typing with the menu open
    • Drop the accent bottom line (like the Start menu search)
  • Fluent menu items don't have pills (only list items do)

  • If ListView in context menu has focus, cyclic navigation won't work

  • Match CmdPal aesthetics

    • Backdrop (acrylic)
    • WinUI × System × CmdPal popup style
    • menu item separators draw too much attention; should be more subtle, the negative space / absence of content should provide the separation
      • (solved) night is day, dead are walking amongst the living and background is foreground
      image
  • Contextual context menu

    • IMO, the More Actions menu (in the command bar) and the context menu (invoked via contextual action, e.g., (🐭⌨️) should behave a bit differently
    • The contextual menu (🐭⌨️) should always be available, even if there’s only a primary or secondary command (blame Mr. Fitss)
Recording.2025-07-20.141129.mp4

Updated separator brush:

image

PR Checklist

  • Closes: #xxx
  • Communication: I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected
  • Tests: Added/updated and all pass
  • Localization: All end-user-facing strings can be localized
  • Dev docs: Added/updated
  • New binaries: Added on the required places
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

…element and allow it to overlap the root window boundaries
…e app by adding a border brush matching the window border and section separators
@jiripolasek jiripolasek marked this pull request as draft July 20, 2025 11:55
@jiripolasek
Copy link
Contributor Author

@michaeljolley Do you find something from this useful?


[DllImport("user32.dll")]
private static extern int ToUnicode(
uint wVirtKey,

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

Virt is not a recognized word. (unrecognized-spelling)
Copy link

@check-spelling-bot Report

🔴 Please review

See the 📂 files view, the 📜action log, or 📝 job summary for details.

Unrecognized words (1)

Virt

These words are not needed and should be removed fff

Some files were automatically ignored 🙈

These sample patterns would exclude them:

^src/modules/powerrename/PowerRenameUITest/testItems/

You should consider adding them to:

.github/actions/spell-check/excludes.txt

File matching is via Perl regular expressions.

To check these files, more of their words need to be in the dictionary than not. You can use patterns.txt to exclude portions, add items to the dictionary (e.g. by adding them to allow.txt), or fix typos.

To accept these unrecognized words as correct, update file exclusions, and remove the previously acknowledged and now absent words, you could run the following commands

... in a clone of the [email protected]:jiripolasek/PowerToys.git repository
on the experiment/context-menu branch (ℹ️ how do I use this?):

curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/c635c2f3f714eec2fcf27b643a1919b9a811ef2e/apply.pl' |
perl - 'https://github.com/microsoft/PowerToys/actions/runs/16401993410/attempts/1' &&
git commit -m 'Update check-spelling metadata'
Warnings ⚠️ (1)

See the 📂 files view, the 📜action log, or 📝 job summary for details.

⚠️ Warnings Count
⚠️ binary-file 3

See ⚠️ Event descriptions for more information.

If the flagged items are 🤯 false positives

If items relate to a ...

  • binary file (or some other file you wouldn't want to check at all).

    Please add a file path to the excludes.txt file matching the containing file.

    File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

    ^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

  • well-formed pattern.

    If you can write a pattern that would match it,
    try adding it to the patterns.txt file.

    Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

    Note that patterns can't match multiline strings.

@michaeljolley
Copy link
Contributor

That "show filter on top vs bottom" was actually discussed. The reason we ended up putting it on the top for right-clicks is that if you filter, the list will jump around. It's visually jarring as the filter box jumps up and down based on your typing.

@michaeljolley michaeljolley added the Product-Command Palette Refers to the Command Palette utility label Jul 20, 2025
@jiripolasek
Copy link
Contributor Author

jiripolasek commented Jul 20, 2025

That "show filter on top vs bottom" was actually discussed. The reason we ended up putting it on the top for right-clicks is that if you filter, the list will jump around. It's visually jarring as the filter box jumps up and down based on your typing.

Oh, holy squirrel, I did commit that? Yop, I did. 🤦‍♂️ Sorry, your reasons are totally right.

@zadjii-msft
Copy link
Member

this is pretty hot ngl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Product-Command Palette Refers to the Command Palette utility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants