Bug 431204 - Order search results the same way as in KRunner
Summary: Order search results the same way as in KRunner
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Application Launcher (Kickoff) (show other bugs)
Version: master
Platform: Other Linux
: HI wishlist
Target Milestone: 1.0
Assignee: Alexander Lohnau
URL:
Keywords: usability
: 438860 446239 448196 459489 460836 467975 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-01-06 03:01 UTC by Nate Graham
Modified: 2023-04-23 17:25 UTC (History)
12 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2021-01-06 03:01:25 UTC
It would be nice if the two could share code/data for ordering the search results so that it always matched between the two
Comment 1 Alexander Lohnau 2021-01-06 21:57:51 UTC
It is a KF6 goal to provide a standardized model.

But TBH the sorting is really weird and there are also hacks here and there implemented. Like https://phabricator.kde.org/D22888.
Comment 2 Nate Graham 2021-07-23 16:12:00 UTC
*** Bug 438860 has been marked as a duplicate of this bug. ***
Comment 3 dagobertram 2021-07-24 08:25:17 UTC
1. May I ask how Kickoff differs from KRunner except of showing more than just the search bar when activated? It might be confusing for newcomers why there are two tools doing pretty much the same stuff.
2. Do we really need both when we say "simple by default, powerful when needed"?
Comment 4 dagobertram 2021-07-24 08:25:57 UTC
(In reply to dagobertram from comment #3)
> 2. Do we really need both when we say "simple by default, powerful when
> needed"?

... at least in the standard configuration.
Comment 5 Nate Graham 2021-07-26 14:49:29 UTC
Indeed, at this point they do the same things.

However KRunner is an invisible UI that is totally out of the way and unobtrusive, so I'm not sure how important it is to remove from the default configuration.
Comment 6 Lyubomir 2021-08-20 15:43:49 UTC
Does this bug also include grouping results like:
* Browser tabs
* Browser history
* Image
* Document
* Software centre
* etc...
Comment 7 Nate Graham 2021-08-20 15:45:30 UTC
Yes, they are already grouped. However the order of groups is difference in Kickoff vs KRunner, which is why this bug report is open.
Comment 8 Lyubomir 2021-08-20 17:31:03 UTC
Well i kinda imagine it like no scrolling once menu opens - all initially shown content's height taken together takes at most the height of the menu itself. Each group has group name displayed above its results with smaller font size than the results themself. The number of entries shown in this initial view is possibly calculated this way - each group shows the same number of entries like all the other groups, for example if the height allows it there are 3 entries shown for each group, but if height doesn't allow it then there are 2 entries shown for each group. Minimum number of entries per group is 1, and if menu height doesn't allow showing each group with at least one result per group, then and only then the menu can scroll with the initial results/show up.
If you want to see more results from specific group then there can be some button for each group which replaces all content of the menu with all the results from this group and only from this group (scrolling is allowed of course here).

Nevermind as you'll find it way too convoluted and would not implement it - take it as a plan or as a science-fiction as per your liking.
Comment 9 Nate Graham 2022-01-11 17:00:43 UTC
*** Bug 448196 has been marked as a duplicate of this bug. ***
Comment 10 Prajna Sariputra 2022-02-12 06:21:28 UTC
*** Bug 446239 has been marked as a duplicate of this bug. ***
Comment 11 Nate Graham 2022-09-22 20:00:24 UTC
*** Bug 459489 has been marked as a duplicate of this bug. ***
Comment 12 Nate Graham 2022-10-25 18:35:51 UTC
*** Bug 460836 has been marked as a duplicate of this bug. ***
Comment 13 Alexander Lohnau 2023-04-03 17:58:31 UTC
I have a working version of this on Plasma (with Qt6).
Comment 14 Nate Graham 2023-04-04 02:28:24 UTC
*** Bug 467975 has been marked as a duplicate of this bug. ***
Comment 15 Bug Janitor Service 2023-04-07 12:20:18 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2802
Comment 16 Alexander Lohnau 2023-04-23 17:25:07 UTC
Git commit 7a6bf2d15b791da8d765b40a41d3cfa83c821cd6 by Alexander Lohnau.
Committed on 23/04/2023 at 17:24.
Pushed by alex into branch 'master'.

applets/kicker: Replace RunnerMatchesModel sorting with KRunner::ResultsModel

We still need to provide additional features, like the context menu actions.
But the sorting will be the same.

Also, each KRunner::ResultsModel takes care of managing the RunnerManager internally.
Meaning we can not have one shared RunnerManager and then redistribute the results
to different models in case we have mergeResults=false.
Instead, we have multiple ResultsModels in case mergeResults is false, but
each RunnerManager loads exactly one runner.

This also means that we should not delete the models after the query changed,
because the plugin instantiation and initialization would cause overhead.
FIXED-IN: 6.0

M  +28   -68   applets/kicker/plugin/runnermatchesmodel.cpp
M  +8    -14   applets/kicker/plugin/runnermatchesmodel.h
M  +36   -183  applets/kicker/plugin/runnermodel.cpp
M  +2    -3    applets/kicker/plugin/runnermodel.h

https://invent.kde.org/plasma/plasma-workspace/commit/7a6bf2d15b791da8d765b40a41d3cfa83c821cd6