Skip to content

Feature: Added option to filter items when typing #17339

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

Closed
wants to merge 3 commits into from
Closed

Conversation

yaira2
Copy link
Member

@yaira2 yaira2 commented Jul 28, 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.

  • Closes #

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. Opened Files ...
  2. ...

@yaira2 yaira2 force-pushed the ya/FilterBinding branch from bc8d064 to be90633 Compare July 28, 2025 15:44
@yaira2 yaira2 marked this pull request as draft July 28, 2025 15:44
@yaira2 yaira2 force-pushed the ya/FilterBinding branch from e6755d6 to d1a2e3f Compare July 28, 2025 21:05
@yaira2 yaira2 changed the title Code Quality: Fixed two way binding for filter header Feature: Added option to filter items when typing Jul 28, 2025
@yaira2 yaira2 force-pushed the ya/FilterBinding branch 7 times, most recently from d0c7ce5 to 4b76218 Compare July 29, 2025 14:27
@yaira2 yaira2 marked this pull request as ready for review July 29, 2025 14:27
@yaira2 yaira2 requested a review from Copilot July 29, 2025 14:27
Copilot

This comment was marked as outdated.

@yaira2 yaira2 force-pushed the ya/FilterBinding branch 2 times, most recently from 10d306e to 5afb917 Compare July 29, 2025 19:11
@yaira2 yaira2 requested a review from Copilot July 29, 2025 19:11
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 adds a new keyboard typing behavior option to filter items in the file area instead of jumping to files. Users can now choose between "Jump to file" (existing behavior) and "Filter items" (new behavior) in the Advanced settings page.

Key changes:

  • Added a new KeyboardTypingBehavior enum with JumpToFile and FilterItems options
  • Replaced character-based input handling with key-based input to support filtering
  • Integrated filter functionality with the existing filter header UI

Reviewed Changes

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

Show a summary per file
File Description
KeyboardTypingBehavior.cs New enum defining the two typing behaviors
IFoldersSettingsService.cs Added property for keyboard typing behavior setting
FoldersSettingsService.cs Implementation of the keyboard typing behavior setting
AdvancedViewModel.cs Added UI binding for the new setting in Advanced page
AdvancedPage.xaml Added settings card for keyboard typing behavior selection
BaseLayoutPage.cs Replaced character input handler with key preview handler to support filtering
BaseGroupableLayoutPage.cs Updated to use the new key preview handler
ShellViewModel.cs Added automatic filter application and clearing logic
ModernShellPage.xaml.cs Removed manual filter handling in favor of data binding
ModernShellPage.xaml Changed to use two-way data binding for the filter text box
MainPage.xaml.cs Added special handling for Back/Space keys in filter mode
FilesystemHelpers.cs Updated restricted characters logic to use Path.GetInvalidFileNameChars()
ToggleFilterHeaderAction.cs Added filter clearing when header is hidden
Resources.resw Added localized strings for the new feature

@yaira2 yaira2 force-pushed the ya/FilterBinding branch from 5afb917 to 21baf6c Compare August 4, 2025 14:46
@yaira2
Copy link
Member Author

yaira2 commented Aug 4, 2025

This feature raises some UX concerns, as it allows text input without the text box being focused. Auto focusing the text box on keypress could resolve this, but it would undermine the features purpose (allowing users to filter while staying focused on the file list), given that users can already activate the filter header via shortcut.

@yaira2 yaira2 closed this Aug 4, 2025
@mdtauk
Copy link
Contributor

mdtauk commented Aug 4, 2025

We did discuss displaying user text input as an overlay, which we could do for the initial filter - further changes to the filter text could be done from the TextBox on the filter header.
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants