Unify icon/folder views
Open, WishlistPublic

Description

Dolphin's main View, Gwenview and digiKam's Browse views, Plasma's Folder View, the Open/Save dialogs' main view, and the MauiKit Index app's main view all have similar behaviour/goal: they show a list or grid of icons (usually with thumbnails) in a specific folder, allow navigating through the directory hierarchy, and manipulate the items with contextual actions.

Some offer features that others don't. For example Dolphin and Index offer to show files in a list instead of a grid, while Gwenview lacks this feature. Dolphin and Gwenview allow selecting individual items with an overlay selection marker, while the Open/Save dialogs do not. And so on.

By extracting and unifying the different implementations, one could de-duplicate the code as well as unify the look and behaviour across applications while allowing easier maintenance.

ngraham updated the task description. (Show Details)Jul 18 2018, 2:55 PM
ngraham added a project: Frameworks.
ngraham added a subscriber: ngraham.
nicolasfella updated the task description. (Show Details)Jul 18 2018, 3:01 PM
rkflx added a subscriber: rkflx.EditedJul 18 2018, 10:49 PM

@nicolasfella Speaking for Gwenview: That sounds just like an idea I had a couple of months ago (I might even have mentioned it here and there). However, in the meantime I read more of the codebase and realized it's not as easy as it sounds.

From a high-level view it makes sense, but once you dig into the interaction details and also how tightly this integrates with the rest of the codebase (thumbnailing, custom sorting and filtering models, optimized image grid, integration with the data models used in other parts, reuse for the thumbnail strip etc.), you'll find that there are features unique to Gwenview. It's not just Dolphin with thumbnails turned on and a darker background.

I'm not saying it cannot be done, but I'd expect it to be a lot of work to unify the technical architecture and reach feature parity with the current implementation.


You might also want to look into the history of each component, and try to find out why each made the decision to go with custom code instead of reusing what was already there. I believe Dolphin was first (end of KDE 3 era, not sure how much based on Konqueror, view component later rewritten and now even used in Konqueror). Then Gwenview was totally rewritten for KDE 4 (code still in use today). I guess Plasma's folder view is the most recent, with the shift from QGraphicsView to QML?

Worth mentioning in this context is https://maui-project.org, which also has "folder views" for file management and image applications.

In T9226#151961, @rkflx wrote:

@nicolasfella Speaking for Gwenview: That sounds just like an idea I had a couple of months ago (I might even have mentioned it here and there). However, in the meantime I read more of the codebase and realized it's not as easy as it sounds.

From a high-level view it makes sense, but once you dig into the interaction details and also how tightly this integrates with the rest of the codebase (thumbnailing, custom sorting and filtering models, optimized image grid, integration with the data models used in other parts, reuse for the thumbnail strip etc.), you'll find that there are features unique to Gwenview. It's not just Dolphin with thumbnails turned on and a darker background.

I agree that this could be a lot of work for the actual thumbnail grid in Gwenview. But it would probably make more sense and be easier for the Browse mode file browser and the Folders tab, both of which are custom widgets right now.

In T9226#151961, @rkflx wrote:

You might also want to look into the history of each component, and try to find out why each made the decision to go with custom code instead of reusing what was already there. I believe Dolphin was first (end of KDE 3 era, not sure how much based on Konqueror, view component later rewritten and now even used in Konqueror). Then Gwenview was totally rewritten for KDE 4 (code still in use today). I guess Plasma's folder view is the most recent, with the shift from QGraphicsView to QML?

If I recall, Dolphin stopped using KDirOperator in favor of a custom view to gain better animation support. Folder View had to be in QML because QWidgets cannot be used in Plasma widgets.

In T9226#151961, @rkflx wrote:

Worth mentioning in this context is https://maui-project.org, which also has "folder views" for file management and image applications.

These are built on top of Kirigami. I wonder if they would be willing to upstream it. The result looks really, really good:

ngraham triaged this task as Wishlist priority.Oct 6 2018, 11:06 PM
ngraham renamed this task from Unifiy folder views to Unify icon/folder views.Oct 12 2018, 11:39 PM
ngraham updated the task description. (Show Details)

This task was briefly discussed at today's Dolphin BoF at Akademy. It was pointed out that the QGraphicsView dependency of the custom view-engine cannot go away, as that would not be worth the effort.

This does not mean that we cannot make dolphin consistent with the other folder views we have in KDE (Plasma, gwenview, etc.).

ngraham updated the task description. (Show Details)Jan 29 2020, 7:13 PM