apache / netbeans

Apache NetBeans
https://netbeans.apache.org/
Apache License 2.0
2.61k stars 841 forks source link

Go to File Search Should Not Prioritize Alphabetical "Fuzzy" Match Over Exact Match in Results #5439

Open TheCookieLab opened 1 year ago

TheCookieLab commented 1 year ago

Description

When using the Go to File search the results appear to be sorted alphabetically which means the default selection is commonly not what the user is looking for.

For example: In the below screenshot I search for "DirectionalMovementOfIndicatorTest" and in the results, the default selection is a "fuzzy" match despite the exact match was also found.

Search Annoyance

It would be nice if there's an exact match it's placed first and selected by default. The fuzzy matches can then come after, sorted via the existing criteria.

How to reproduce

  1. In a new or existing project create three new class files, all named similarly. For example:

DirectionalMovementDownOfIndicatorTest.java DirectionalMovementOfIndicatorTest.java DirectionalMovementUpOfIndicatorTest.java

  1. Open the "Go to File" search (alt+shift+o on Windows)
  2. Search for a file which name is not the first in natural sorting order (i.e. DirectionalMovementOfIndicatorTest.java)
  3. Press ENTER as soon as the search results pop up cause you're in the zone
  4. Notice with chagrin that you are not where you expected to be. Level of confusion correlated with how similar the classes are.

Use case/motivation

This is low priority but if a UX uplift initiative ever gets going this should be included.

Related issues

No response

Are you willing to submit a pull request?

No

Code of Conduct

Yes

mbien commented 1 year ago

added https://github.com/apache/netbeans/labels/Contribution%20welcome label. I suppose you didn't mean to select that you are planning on opening a PR for this?

TheCookieLab commented 1 year ago

@mbien good catch thanks. Yeah I'm probably not the best suited person for this.

mbien commented 1 year ago

@TheCookieLab didn't mean it like that. Contribution is always welcome!

albilu commented 1 year ago

There is a setting to change the ordering to match Similarity instead of alphabetic order. Try it and tell if better: image