Skip to content
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

Improve sorting of Recent Projects #20324

Open
1 task done
lee-hyunkyu opened this issue Nov 6, 2024 · 0 comments
Open
1 task done

Improve sorting of Recent Projects #20324

lee-hyunkyu opened this issue Nov 6, 2024 · 0 comments
Labels
admin read Pending admin review enhancement [core label] triage Maintainer needs to classify the issue

Comments

@lee-hyunkyu
Copy link

lee-hyunkyu commented Nov 6, 2024

Check for existing issues

  • Completed

Describe the feature

When searching through Recent Projects, the search appears to be recently used rather than potentially "best match".

For example, suppose I have two projects

Project 1 includes multiple folders alpha, beta, gamma
Project 2 includes one folder tam.

If I type in tam, Project 1 may appear above Project 2 because the ta in beta and the m in gamma leads to a fuzzy match. But the behavior makes more sense to prioritize tam above the others

I think that there are some intuitive sorting heuristics:

  1. Prioritize exact matches over fuzzy ones
  2. Prioritize fuzzy matches that match with one folder of a project over fuzzy matches over multiple projects.

For eample, suppose there are 2 projects

Project 1 includes folders alpha, beta, gamma
Project 2 includes folder zebra, wolf

If I type al, I get a match with al in alpha in Project 1. I also get a match with the a in zebra and the l in wolf in Project 2. Project 1 should be prioritized in this case since the match with alpha is with the one folder rather than needing to be found across multiple folders

  1. Prioritize matches with the folder name over the path to the folder

There might be other good heuristics but none others come to mind immediately.

I'd like to take this on if there is agreement that this sorting is a good idea

Environment

Zed: v0.160.7 (Zed)
OS: macOS 14.4.1
Memory: 16 GiB
Architecture: aarch64

If applicable, add mockups / screenshots to help present your vision of the feature

No response

@lee-hyunkyu lee-hyunkyu added admin read Pending admin review enhancement [core label] triage Maintainer needs to classify the issue labels Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admin read Pending admin review enhancement [core label] triage Maintainer needs to classify the issue
Projects
None yet
Development

No branches or pull requests

1 participant