PowerToys Run Plugin interface cannot enforce result order #36519
Labels
Issue-Bug
Something isn't working
Needs-Triage
For issues raised to be triaged and prioritized by internal Microsoft teams
Microsoft PowerToys version
0.87.0
Installation method
Microsoft Store
Running as admin
Yes
Area(s) with issue?
PowerToys Run
Steps to reproduce
I'm not sure whether it is a bug or something weird that is either not documented or I could not find the documentation for, but here we go:
When making a plugin, it is not possible to fix the order of the results from the plugin side for specific sets of searches.
Let's take a specific example, which is a barebone plugin (not global, no result tuning [although] that does not matter because it is a user setting which should be possible to ignore on purpose), and the following Query function:
The interface for ordering, as far as I know, is the
Score
, and it does work until something is selected, which in general makes sense because of the order tuning, but the issue is that the order tuning cannot be avoided from the plugin side properly when a set of results are meant to have a strict order (I want to have it most of the time, but sometimes I to provide a strict order)As it can be seen above, I tried to also set the
SelectedCount
based on a snippet I found in the PowerToys source code (PowerLauncher > ResultsViewModel > Sort), and while I did not spend much time on it, I assume that is more or less what is happening (please correct me if I'm wrong)The issue is that while I have no weight boost and have a good score the
SelectedCount
seems to have no effect because as I select something, it jumps to the top regardless, and that persists, even though the results are recreated with 0SelectedCount
, so I don't get what theSelectedCount
does at all (which is mostly why I marked this as a bug, but it's the smaller issue)Technically I could multiply the scores, but that's just a weird workaround, which works until it doesn't as the user selects enough stuff, and making the user change the tuning is not a good solution, especially when in some cases the tuning is preferred within the same plugin.
In case it is not a bug, and the method to do fixed ordering exists, I'd appreciate a link to the docs, and if there are no docs, then I'd appreciate help with this, and some docs to be made on the plugin and result interface because I can't find docs when it comes to doing anything meaningful
✔️ Expected Behavior
The code above does this regardless of selecting items
❌ Actual Behavior
The code above does this after selecting items
Other Software
No response
The text was updated successfully, but these errors were encountered: