Skip to content

Add a fuzzy search dialog#1159

Closed
treagod wants to merge 12 commits intoelementary:masterfrom
treagod:fuzzy-finder
Closed

Add a fuzzy search dialog#1159
treagod wants to merge 12 commits intoelementary:masterfrom
treagod:fuzzy-finder

Conversation

@treagod
Copy link
Contributor

@treagod treagod commented Dec 14, 2021

This implements a fuzzy search to solve #134.

I adapted the fuzzy search from this blog and integrated it into a modal, which can be opened with Ctrl+p,

For now I want to implement the search as a plugin so that the user can opt-in as long the fuzzy search is not mature enough - but I think in the long run this functionality should be part of the core of the editor.

preview

@treagod treagod marked this pull request as draft December 14, 2021 18:41
@treagod treagod changed the title Fuzzy finder Add a fuzzy search dialog Dec 14, 2021
@treagod treagod marked this pull request as ready for review December 18, 2021 13:31
Copy link
Collaborator

@jeremypw jeremypw left a comment

Choose a reason for hiding this comment

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

Sorry for not reviewing this sooner - this is some good work. Ignoring code style issues for now, here are some issues I've noticed:

  1. The search dialog shows on pressing the shortcut even if there are no projects loaded.
  2. The search results are not disambiguated where there are more than one project loaded
  3. Clicking on a search result does not load the file (need to press Enter)
  4. The search is a bit too fuzzy for my liking - some apparently poor matches appear before good or exact matches. It might be better to start with a simpler search i.e. only showing files with basenames starting with the typed letters. Later PR maybe could show different levels of match in different categories in a similar way to Files search.
  5. I wonder whether it would be possible to incorporate filename search into the existing global text search function, or piggyback on it somehow. Both iterate through project files. It would then be unnecessary to create a new plugin.

@jeremypw jeremypw added the Needs Design Needs the UX team to specify or implement a solution. May need new icons or css for example label Feb 8, 2022
@tvallois
Copy link

Hello @treagod ,

Are you still working on this? I'd be glad to help if you need to.

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

Labels

Needs Design Needs the UX team to specify or implement a solution. May need new icons or css for example

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants