Bug 404149 - Natural sorting for items in activities pager
Summary: Natural sorting for items in activities pager
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Activity Switcher sidebar (show other bugs)
Version: 5.12.6
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: 1.0
Assignee: Ivan Čukić
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-09 19:48 UTC by Dimitrios T Tanis
Modified: 2021-06-29 11:04 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitrios T Tanis 2019-02-09 19:48:54 UTC
SUMMARY
It would be nice for activities to use natural order when displayed sorted.

STEPS TO REPRODUCE
1. Assign number prefixes to activities (eg 1.Home, 2.Work, ... 9.Holidays, 10.Fun) 
2. Add Activities pager to desktop or panel
3. Set display: Activity Name in activities pager settings

OBSERVED RESULT
Activities are ordered in the classic way (1.Home, 10.Fun, 2.Work, etc)

EXPECTED RESULT
Activities should be ordered naturally (1.Home, 2.Work,... 9.Holidays, 10.Fun)

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.12.6
KDE Frameworks Version: 5.45.0
Qt Version: 5.9.4

ADDITIONAL INFORMATION
This does not affect activities:/ path in dolphin where activities use natural order when sorted by name.
Comment 1 Nate Graham 2019-02-12 15:51:14 UTC
Are you talking about the Meta+tab switcher, or the configuration interface?
Comment 2 Dimitrios T Tanis 2019-02-17 21:37:55 UTC
(In reply to Nate Graham from comment #1)
> Are you talking about the Meta+tab switcher, or the configuration interface?

Neither.
Meta+tab switcher sorts activities by most recent.
The configuration interface has nothing to do with the sorting.

I am talking about the pager widget ie the activities preview in a panel, much like there is for virtual desktops.
Comment 3 David Edmundson 2019-02-18 10:14:56 UTC
Git commit b344bc2e3468c24124aa83f11b3b2498a882a40f by David Edmundson.
Committed on 12/02/2019 at 12:55.
Pushed by davidedmundson into branch 'master'.

Use natural sorting in ActivityModel

Summary:
ActivityModel sorts internally.
It currently does a non-locale or number aware sort on user-facing
strings.

This patches uses QCollator.

This changes the order in the KCM.

It doesn't affect the order in the activity switcher as that has it's
own sorting proxy on top handling last used time.

It doesn't quite fix the issue in the bug report as PagerModel mixes
sources.

Test Plan:
Set activities named
"10.asdf"
"1.foo"
"2.bar"

KCM now shows them in the order 1,2,10

Reviewers: #plasma

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D18957

M  +9    -6    src/imports/activitymodel.h
M  +10   -6    src/lib/activitiesmodel_p.h

https://commits.kde.org/kactivities/b344bc2e3468c24124aa83f11b3b2498a882a40f
Comment 4 Paul Worrall 2021-06-29 11:04:24 UTC
I'd like to add my vote to have the option for the Activity switcher to sort activities in lexical order please. I think it would make switching activities using the mouse a little quicker.