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

Show classes first when searching #60

Open
A6GibKm opened this issue Nov 22, 2023 · 1 comment
Open

Show classes first when searching #60

A6GibKm opened this issue Nov 22, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@A6GibKm
Copy link
Contributor

A6GibKm commented Nov 22, 2023

When searching for e.g. "scrolledwindow" the GtkScrolledWindow class is not in the first page of results. While one can enter any method and go up, it might make sense to sort the results so that the classes appear first.

@sonnyp sonnyp added the enhancement New feature or request label Nov 25, 2023
@AkshayWarrier
Copy link
Collaborator

AkshayWarrier commented Dec 4, 2023

I'm actually not quite sure how we can do this. The search results are found using fzy.js which is the module used by gi-docgen as well for fuzzy searching. When someone searches for scrolledwindow, there's no way to know the intention of the user whether they want the class or a method on scrolled window. If we just increase the score of all results which are classes so that they appear at the top, then searching for say "button" will just give GtkButton, AdwTabButton, FontButton...etc before any of the methods or properties of button start. I think it becomes hard to find a good balance.

I understand your point that it's easy to go from a class to a method/property, but if someone just simply wants search for a property or a method it might become harder to find it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants