Skip to content

Code Quality: Use action description when selecting via arrow keys #17227

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

Merged
merged 6 commits into from
Jun 30, 2025

Conversation

yaira2
Copy link
Member

@yaira2 yaira2 commented Jun 29, 2025

Resolved / Related Issues

To prevent extra work, all changes to the Files codebase must link to an approved issue marked as Ready to build. Please insert the issue number following the hashtag with the issue number that this Pull Request resolves.

Steps used to test these changes

Stability is a top priority for Files and all changes are required to go through testing before being merged into the repo. Please include a list of steps that you used to test this PR.

  1. Confirmed selecting suggestions in Command Palette sets text to the description
  2. Confirmed that it works to invoke commands

@yaira2 yaira2 requested review from 0x5bfa and Copilot and removed request for 0x5bfa June 29, 2025 23:02
Copilot

This comment was marked as outdated.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves the user experience when selecting suggestions via arrow keys by ensuring the displayed text comes from command descriptions rather than their codes. Key changes include updating the text display in the omnibar suggestion items and refining the command palette mode logic in the navigation toolbar.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/Files.App/ViewModels/UserControls/NavigationToolbarViewModel.cs Replaced command.Code with command.Description for the text properties and related comparisons in suggestion items.
src/Files.App/UserControls/NavigationToolbar.xaml.cs Updated the command palette mode handling by extracting the current mode into a local variable and iterating over commands based on their description.

@yaira2 yaira2 requested a review from 0x5bfa June 30, 2025 14:09
Copy link
Member

@0x5bfa 0x5bfa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code wise LGTM

@yaira2 yaira2 merged commit 4375067 into main Jun 30, 2025
9 checks passed
@yaira2 yaira2 deleted the ya/CommandSuggestion branch June 30, 2025 20:44
@yaira2 yaira2 added ready to merge Pull requests that are approved and ready to merge and removed needs - code review labels Jun 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Pull requests that are approved and ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants