Bug 416134 - De-couple "Sort By" and "Group By"
Summary: De-couple "Sort By" and "Group By"
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
: 463939 510670 513235 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-01-11 19:18 UTC by D. Debnath
Modified: 2026-06-11 15:01 UTC (History)
11 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description D. Debnath 2020-01-11 19:18:09 UTC
Currently, Group By = Sort By. 

I will explain why I'm not satisfied with the current scenario. By default, I like to Group By: Filetype and Sort By: Name. But there are scenarios where I would like to Group By: Filetype and Sort By: Date Modified, for example the Downloads folder. Currently, if Group By is set to filetype, then it sorts by Name, which works for me in general, but if I want to Sort By date modified, then I also have to group by date modified, which is terrible. Even Windows Explorer has this feature.

Also, I should be able to Group By and Sort By on per folder basis.
Comment 1 koyu 2020-02-26 03:48:58 UTC
Can confirm, this is a serious issue
Comment 2 D. Debnath 2023-12-22 19:14:59 UTC
Any hope of getting this in Plasma 6?
Comment 3 postix 2024-07-06 12:51:52 UTC
(In reply to D. Debnath from comment #2)
> Any hope of getting this in Plasma 6?

There's a promising looking MR: https://invent.kde.org/system/dolphin/-/merge_requests/785 :)
Comment 4 Filip 2025-12-12 19:32:53 UTC
*** Bug 510670 has been marked as a duplicate of this bug. ***
Comment 5 Filip 2025-12-12 19:33:06 UTC
*** Bug 513235 has been marked as a duplicate of this bug. ***
Comment 6 aristsakas 2025-12-27 00:39:22 UTC
*** Bug 463939 has been marked as a duplicate of this bug. ***
Comment 7 wonton.ns 2026-02-01 08:23:32 UTC
I would also like this feature.

My use case: I want to group files by Type, but sort them by Date Modified within each group.

I noticed MR !785 is working on this. Looking forward to seeing it merged!
Comment 8 User110350 2026-03-02 15:55:19 UTC
Like the idea of this.
Comment 9 Ramil 2026-06-11 15:01:16 UTC
Git commit 989c0f4f0319f7d8e573c8a88fe8011bd3315466 by Ramil Nurmanov.
Committed on 11/06/2026 at 10:30.
Pushed by meven into branch 'master'.

Allow grouping by a separate criterion

Add an explicit group role to Dolphin views so items can be grouped independently from the active sort role.
Previously, Dolphin's grouped view always used the current sort role as the grouping criterion. This meant that grouping and sorting were tied together, for example grouping by type also required sorting by type.
This change adds a separate Group By menu. It replaces the previous Show in Groups toggle and allows the user to disable grouping, keep the old Same as Sort behavior, or explicitly group by a selected criterion.
When an explicit group role is set, the model keeps groups stable and uses the normal sort role as a secondary key inside each group. The roles
updater also receives the active group role, so roles used only for grouping are still updated correctly.
Related: bug 510670, bug 513235, bug 46393

M  +2    -2    src/dolphinpart.rc
M  +2    -2    src/dolphinui.rc
M  +2    -2    src/dolphinuiforphones.rc
M  +14   -0    src/kitemviews/kfileitemlistview.cpp
M  +1    -0    src/kitemviews/kfileitemlistview.h
M  +67   -11   src/kitemviews/kfileitemmodel.cpp
M  +3    -0    src/kitemviews/kfileitemmodel.h
M  +8    -0    src/kitemviews/kfileitemmodelrolesupdater.cpp
M  +15   -3    src/kitemviews/kitemlistview.cpp
M  +1    -0    src/kitemviews/kitemlistview.h
M  +38   -3    src/kitemviews/kitemmodelbase.cpp
M  +9    -0    src/kitemviews/kitemmodelbase.h
M  +1    -0    src/settings/applyviewpropsjob.cpp
M  +6    -0    src/settings/dolphin_directoryviewpropertysettings.kcfg
M  +1    -1    src/settings/viewmodes/generalviewsettingspage.cpp
M  +82   -0    src/tests/kfileitemmodeltest.cpp
M  +33   -0    src/views/dolphinview.cpp
M  +10   -0    src/views/dolphinview.h
M  +90   -16   src/views/dolphinviewactionhandler.cpp
M  +10   -12   src/views/dolphinviewactionhandler.h
M  +14   -0    src/views/viewproperties.cpp
M  +3    -0    src/views/viewproperties.h

https://invent.kde.org/system/dolphin/-/commit/989c0f4f0319f7d8e573c8a88fe8011bd3315466