SUMMARY I spent awhile trying to figure out why my applications in the application menu widget were sorted so oddly on a fresh installation on new hardware until I found the culprit: the "sort applications alphabetically" option on the application menu settings page. If you enable that setting, the sort order that is applied to all categories in the application menu is as follows: 1- All separators (no matter how many) 2 - All submenus in alphabetical order) 3 - All application launchers that are not in a submenu, sorted alphabetically This is very confusing because the sort order being applied is very unnatural. This could confuse a new user greatly. I have been using KDE for years and this had me confused for 2 days. The only way this setting would produce a natural feeling sort order is if your application menu had no separators or submenus at all. There are many ways in which this bug could be dealt with, however I think the best way would be that the "sort applications alphabetically" setting should leave separators in the same position as they appear in the KDE Menu Editor and then sort all applications or submenus within that space between separators/ends of that category alphabetically. This would be a more natural feeling sort order. STEPS TO REPRODUCE 1. Add the applications menu widget to the taskbar. 2. Right click on the widget, select "configure application menu" 3. On the general tab in the behavior section, check the "Sort applications alphabetically" box and click OK 4. Check the sort order applied to the applications. OBSERVED RESULT The sort order is all separators, all submenus alphabetically, and finally all applications not in submenus alphabetically. EXPECTED RESULT I would expect separators to be left where they were placed, and all applications/submenus between separators or the beginning/end of the category of applications to be sorted alphabetically. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Arch Linux KDE Plasma Version: 5.27.0-1 KDE Frameworks Version: 5.103.0-1 Qt Version: 5.15.8+kde+r181-1
Created attachment 156345 [details] Screenshot I can't seem to replicate this. I've set my launcher to "Application Menu" and enabled "Sort applications alphabetically" but I get a normal-looking and sorted menu. See attached screenshot.
Created attachment 156350 [details] Screenshot showing how the application menu is sorted with "Sort applications alphabetically" off
Created attachment 156351 [details] Screenshot showing how the application menu is sorted with "Sort applications alphabetically" enabled
(In reply to Justin Zobel from comment #1) > Created attachment 156345 [details] > Screenshot > > I can't seem to replicate this. I've set my launcher to "Application Menu" > and enabled "Sort applications alphabetically" but I get a normal-looking > and sorted menu. See attached screenshot. I believe that you are reproducing the bug in your screenshot, it is showing the exact sort order that I described with all submenus in alpha order on top and all applications that are not in submenus beneath. You don't have any separators in that category, so they are not present. Your manual sort order might be similar to this arrangement already so it is not noticeable. I have attached two screenshot attachments, one showing the sort order with "sort applications alphabetically" disabled and another with it enabled. In mine, I have my applications not in a submenu first, then a separator, then a submenu. The issue becomes more noticeable when my manual sort order is different from what winds up happening. Like I said, I am not sure what the correct way to deal with this issue is because it partially comes down to personal preference, but I don't think all separators going to the top is correct. I have also since reproduced this issue on two other machines, both running the exact same software load out as described in my OP.
> I would expect separators to be left where they were placed This isn't possible when sorting alphabetically. A separator's position is manually decided, so it only makes sense when using a manual app arrangement. When the arrangement is automatic (because you turned alphabetical sorting on), the separators lose the ability to know where they should live. Really the separators should just disappear when using alphabetical sorting. Let's make the bug report about that, since it's an actionable and self-contained thing. Otherwise, the sort ordering looks perfectly logical to me. First sub-menus, arranged alphabetically, then apps, arranged alphabetically. The only alternative I could imagine that would make more sense is to sort everything alphabetically, so as to allow sub-menus to be interspersed between apps. That might look messy though, so I can see why it's done the way it is.
(In reply to Nate Graham from comment #5) > > I would expect separators to be left where they were placed > This isn't possible when sorting alphabetically. A separator's position is > manually decided, so it only makes sense when using a manual app > arrangement. When the arrangement is automatic (because you turned > alphabetical sorting on), the separators lose the ability to know where they > should live. Understood. If separators can't remain where they were placed manually, then this is definitely the best path forward. Thanks Nate!
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2708
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1426
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1433
Git commit 90ad64ba638649b68cf2ffb7f68e227e86a8b8f1 by Joshua Goins. Committed on 18/03/2023 at 15:44. Pushed by redstrate into branch 'master'. applets/kicker: Hide separators when sorted alphabetically Users are able to manually add separator items at custom positions in their menu structures. When they do so, the location of these separators are inherently custom, and only make sense when the menu structure is being displayed in its custom order. When using the option to display everything alphabetically, the separators' custom position no longer exists and any automatic placement becomes nonsensical. Currently, the separators get sorted to the beginning of the list, which looks quite weird. This commit instead hides the separators when sorting alphabetically. Only Kicker is affected by this change; the underlying model providing the items is unchanged. FIXED-IN: 5.27.4 M +3 -1 applets/kicker/package/contents/ui/ItemListDelegate.qml M +2 -0 applets/kicker/package/contents/ui/ItemListDialog.qml M +1 -1 applets/kicker/package/contents/ui/ItemListView.qml https://invent.kde.org/plasma/plasma-desktop/commit/90ad64ba638649b68cf2ffb7f68e227e86a8b8f1
Git commit d492a691d44a2878eb3c189219dc04260294bb77 by Joshua Goins. Committed on 18/03/2023 at 15:45. Pushed by redstrate into branch 'Plasma/5.27'. applets/kicker: Hide separators when sorted alphabetically Users are able to manually add separator items at custom positions in their menu structures. When they do so, the location of these separators are inherently custom, and only make sense when the menu structure is being displayed in its custom order. When using the option to display everything alphabetically, the separators' custom position no longer exists and any automatic placement becomes nonsensical. Currently, the separators get sorted to the beginning of the list, which looks quite weird. This commit instead hides the separators when sorting alphabetically. Only Kicker is affected by this change; the underlying model providing the items is unchanged. FIXED-IN: 5.27.4 (cherry picked from commit 90ad64ba638649b68cf2ffb7f68e227e86a8b8f1) M +3 -1 applets/kicker/package/contents/ui/ItemListDelegate.qml M +2 -0 applets/kicker/package/contents/ui/ItemListDialog.qml M +1 -1 applets/kicker/package/contents/ui/ItemListView.qml https://invent.kde.org/plasma/plasma-desktop/commit/d492a691d44a2878eb3c189219dc04260294bb77