Skip to content

Add search modes support (Normal, Fuzzy, Regex) to different components - #4314

Open
darklinkpower wants to merge 22 commits into
JosefNemec:masterfrom
darklinkpower:SearchBoxSearchModes
Open

darklinkpower wants to merge 22 commits into
JosefNemec:masterfrom
darklinkpower:SearchBoxSearchModes

Conversation

@darklinkpower

@darklinkpower darklinkpower commented May 16, 2026 •

Copy link
Copy Markdown
Contributor

Adds support for multiple search modes across SearchBox and filtering logic with support to switch between modes by clicking a button:

  • Normal search
  • Fuzzy search
  • Regex search

Changes:

  • Introduced a reusable TextMatcher utility to centralize matching behavior and ensure consistent search logic across different component across Playnite.
  • Implemented a three-state search mode toggle button directly in the SearchBox control to allow users to quickly switch search behavior without opening settings.
  • Added support to Game Edit Dialog dropdowns as well.

TODO:

  • Replace placeholder strings with proper localization strings Done
  • Remove now obsolete global fuzzy search setting and localization entries Done
  • Test in Fullscreen Mode Done
  • Add/update tests (Unless they are not needed? 😁) Done
  • Implement same functionality in Keyboard Launcher Canceled
  • Reuse TextMatcher in Keyboard Launcher for consistent behavior Canceled

Edit: There's too many moving parts in the Keyboard Launcher and I don't want to break something. I've canceled adding it, at least as part of this PR.

@darklinkpower

Copy link
Copy Markdown
Contributor Author

Screenshots

Demo:

HaYWAeUKrV.mp4

Top Panel:

image

Filter Panel Name:

image

Filter Panel Version:

image

Game Edit window:

image

@darklinkpower

Copy link
Copy Markdown
Contributor Author

Tests added

image

@darklinkpower

Copy link
Copy Markdown
Contributor Author

Updated tests results after all changes

image image

@darklinkpower
darklinkpower marked this pull request as ready for review May 16, 2026 07:23
… with more explicit [NameInitial]: prefix to prevent collisions with valid queries such as Regex (^ indicates Start of String)
@darklinkpower

Copy link
Copy Markdown
Contributor Author

I've replaced the ^ prefix used by the Explorer Panel with a more explicit [NameInitial]: in d050dd8 to prevent collisions with valid queries that use this prefix but let me know if that's an issue. It didn't occur to me that leaving it as is could be problematic with the new Regex functionality.

But I can't find any indication of ! being used anywhere, is it really used somewhere?

image

From what I see it's not and could be safely removed. Only use using this behavior is in this test but nothing in the real application:

image

@darklinkpower

Copy link
Copy Markdown
Contributor Author

I've changed the Explorer Panel Name prefix filter to ^: to make it simpler. I think it keeps it simple and unlikely to cause conflicts. If that's not good and it needs to be a single character, perhaps we could use more uncommon characters such as ~, @ or % but in my opinion it works fine this way.

image

@JosefNemec

Copy link
Copy Markdown
Owner

I didn't check the code yet, but quick things:

  • needs to be based on devel branch
  • I'm not a fan how it visually looks, it should be probably embedded in the search box

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants