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

TopLevel search results always get displayed before other plugins, even if the match score is low #217

Open
wiiznokes opened this issue Jun 2, 2024 · 4 comments

Comments

@wiiznokes
Copy link
Contributor

For the top_level and desktop entries plugins, a f64 between 0 and 1 will fit.

@wiiznokes
Copy link
Contributor Author

I just saw that the service does it. But still, plugins should be able to have an impact on the final result. It's great that the service handle recent selections and stuff tho

@wiiznokes
Copy link
Contributor Author

wiiznokes commented Jun 8, 2024

Ok so after looking the code a bit, the service actually make a pretty good job at sorting the SearchResult. Comparing the score directly have similar result.
But the problem is in the plugin priority. The top_level entries will always be shown before the desktop entries, even if they score its 0.1 and the other 1.
This problem is also present in the cosmic-launcher UI. The app will try to gather all plugin search result together, by sorting the Indice field. I'm not sure its a good idea, but mixing different plugin results might be confusing. But the current behavior is not acceptable

@wiiznokes wiiznokes changed the title Rfc: add a score field to the PluginSearchResult TopLevel search result always get displayed before other plugins, even if the match score is low Jun 8, 2024
@wiiznokes wiiznokes changed the title TopLevel search result always get displayed before other plugins, even if the match score is low TopLevel search results always get displayed before other plugins, even if the match score is low Jun 8, 2024
@jacobgkau
Copy link
Member

jacobgkau commented Jun 24, 2024

TopLevel showing up first is intentional: #213

One of the items in the regression testing checklist is Open windows are sorted above applications (e.g. "web browser").

@wiiznokes
Copy link
Contributor Author

Sure, i know it is intentional, but its really not perfect. A little bonus for TopLevel result should be preferred imo.

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

No branches or pull requests

2 participants