Add a Recent Documents places item to Dolphin and file pickers by default
Needs RevisionPublic

Authored by ngraham on Aug 20 2017, 11:06 PM.

Details

Summary

BUG: 357542

Add a Recent Documents places item (recentdocuments:/) to Dolphin and file pickers by default.

Test Plan

Tested this diff in up-to-date KDE Neon. By default, a recentdocuments:/ places item appears in the Places view in both Dolphin and all file pickers:

Diff Detail

Repository
R241 KIO
Lint
Lint Skipped
Unit
Unit Tests Skipped
ngraham created this revision.Aug 20 2017, 11:06 PM
Restricted Application added a subscriber: Konqueror. · View Herald TranscriptAug 20 2017, 11:06 PM

I don't know, this is not really a "place". I would expect to find such an item in the "Recently Saved" section (even though recentdocuments:/ seems to only show recently *opened* files).
What I'd like is an actually functional timeline:/ ioslave... :/

ngraham added a comment.EditedAug 21 2017, 12:46 PM

I made it a bookmark for the following reasons:

  1. It was a small, focused, low-risk change
  2. This bookmark shows recently opened files, not recently saved files.
  3. This change also has the effect of automatically adding it to the Places panel in file pickers, which is part of the feature request. If we put this in the Recently Saved section, that would involve much more work and risk, both to add it there and also to modify the file pickers to show that section.

I would prefer this item to either go *before* Trash or after Home. Also, can this be done in KFilePlacesModel, so it also shows up in the file dialog?

I haven't forgotten about this, but life has intervened and I'm not going to have time to work on it for a few days, maybe even a couple of weeks. If anyone else wants to run with it and take over, I won't be in the least bit offended. If not, I'll resume work at some point in the near to medium term future.

ngraham retitled this revision from Add a Recent Documents places item to Dolphin by default to Add a Recent Documents places item to Dolphin and file pickers by default.Aug 27 2017, 11:16 PM
ngraham edited the summary of this revision. (Show Details)
ngraham changed the repository for this revision from R318 Dolphin to R241 KIO.
ngraham updated this revision to Diff 18867.EditedAug 27 2017, 11:19 PM

This update implements the following requested changes:

  1. Located the new Recent Documents bookmark after Home bookmark and before Trash bookmark
  2. Made the change in KIO's kfileplacesmodel.cpp, which makes it appear in file pickers as well
Restricted Application added a project: Frameworks. · View Herald TranscriptAug 27 2017, 11:19 PM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
ngraham edited the test plan for this revision. (Show Details)Aug 27 2017, 11:21 PM

Any remaining objections or requested changes?

Anybody object?

markg added a subscriber: markg.Sep 22 2017, 8:54 PM

You could continue and add about a dozen more "semi-useful" protocol links (ftp, settings, programs, bluetooth, and much more) ;) .
I don't think that's the route for the places panel to go. Not by default that is.
If the user wants it, it can be added just like any shortcut can be added in the places thingy. By default it should stay rather clean. recentdocuments is (in my opinion) not one that should be there by default. Also, for me personally it seems rather weird as recently visited url's are also in the recent documents.... And files I've accessed on the console don't appear in it at all (understandable though).

However, it would be a nice candidate for a custom panel! I would have guessed there'd be a panel for that, but there isn't. So a new panel with recent documents in it (that the user can just turn on or off, off by default!) sounds much more valuable then a mere link.

I don't think this is "semi-useful". " A Recent Documents feature in the file manager and open/save dialogs is IMHO really important, especially for lesst-technical users who use features like this on other platforms expensively instead of making extensive use of folder hierarchies. "The user can add it" is a problematic response since 99.9% of users don't know this exists, and therefore don't know that this functionality is available in the first place (and if they did, they would find it challenging to add).

The file managers and open/save dialogs in macOS and GNOME both have some kind of "recent stuff" feature shown by default, and it's really nice. And ad evidenced by the but report and the fact that people have voted for it, this is a desirable feature to some of our users.

markg added a comment.Sep 22 2017, 9:24 PM

I don't think this is "semi-useful". " A Recent Documents feature in the file manager and open/save dialogs is IMHO really important, especially for lesst-technical users who use features like this on other platforms expensively instead of making extensive use of folder hierarchies. "The user can add it" is a problematic response since 99.9% of users don't know this exists, and therefore don't know that this functionality is available in the first place (and if they did, they would find it challenging to add).

The file managers and open/save dialogs in macOS and GNOME both have some kind of "recent stuff" feature shown by default, and it's really nice. And ad evidenced by the but report and the fact that people have voted for it, this is a desirable feature to some of our users.

As i said, as a "link" i see no use for it.
As a separate panel, i do see a use for it, but still not enabled by default imho.

Also, really, look at the output of recentdocuments:/ In my case i have the following issues:

  1. It shows a folder. (my home downloads folder). Clicking it shows a "The file or folder recentdocuments:/Downloads does not exist." (it's text is /hom/mark/Downloads which does exist on my local drive! Also, why does a folder show up in recentdocuments amyhow, it's not a "document".
  2. just 1 file in the list! (i only have 9 entries, guess i don't open much files, hehe)
  3. Everything else is web links
  4. The error as said in 1. can be closed however many times you want, it keeps reappearing if you press F5 or enter "recentdocuments:/" again. It only goes away if you close the error, go to another location and then to recentdocuments:/

How can you possibly want to present that to the user by default? Let me put it this way, the ioslave "probably" hasn't seen much development. It needs some love to be suitable for a real recent documents and even be considered to put in the places panel.

Yeah I also find weird to see weblinks in there. Maybe if we call it "History" would be a bit better (and it would also match the History tab in Kickoff).

markg added a comment.Sep 22 2017, 9:33 PM

Yeah I also find weird to see weblinks in there. Maybe if we call it "History" would be a bit better (and it would also match the History tab in Kickoff).

Perhaps, but then we'd still miss a real "recentdocuments" :)

It seems odd to have all of these special KIO URLs that we don't actually want to use because they're rough and underdeveloped. They're rough and underdeveloped because they're hidden by default, so nobody sees them, and nobody files bugs or submits patches for them. But I do see your point.

That said, the advantage to adding this as a Places item is that it shows up in file open/save dialogs for free, which is where it's most useful. If we make this into a whole new panel, we'll have to do a bunch of otherwise unnecessary special work to get it into open/save dialogs. I don't see the advantage.

If the objection is that the content isn't useful (why does it show URLs?), then I can fix that too, but only if by doing so, folks will be amenable to adding a "Recent Documents" entry by default. It really is useful to have recent documents aggregated somewhere.

That said, the advantage to adding this as a Places item is that it shows up in file open/save dialogs for free, which is where it's most useful.

This would support the use case presented here: https://store.kde.org/p/1156273 and here: https://bugs.kde.org/show_bug.cgi?id=384411

Regarding those use cases, are you planning to add a list of recent folders to the Select Folder dialog, too?

It seems odd to have all of these special KIO URLs that we don't actually want to use because they're rough and underdeveloped. They're rough and underdeveloped because they're hidden by default, so nobody sees them, and nobody files bugs or submits patches for them. But I do see your point.

That said, the advantage to adding this as a Places item is that it shows up in file open/save dialogs for free, which is where it's most useful. If we make this into a whole new panel, we'll have to do a bunch of otherwise unnecessary special work to get it into open/save dialogs. I don't see the advantage.

If the objection is that the content isn't useful (why does it show URLs?), then I can fix that too, but only if by doing so, folks will be amenable to adding a "Recent Documents" entry by default. It really is useful to have recent documents aggregated somewhere.

Regarding the advantage in the file open/save dialog. It's only a advantage because the places panel is there by default.
A recently used files/documents entry just doesn't belong in there (in my opinion).
So you would have to add a second panel for that. It is the best looking way, but yeah, requires quite a bit more code changes.

Recent documents just doesn't fit the open/save dialog imho. How useful is it to see the recently accessed files there? Not very. What you would want (and i would in fact like to have that) is a recent folders in open/save. That would be very useful! A IO slave for that does not exist.
In dolphin a "recentfiles" panel would be interesting (i still wouldn't like it on by default..), but as it currently stands, no IO slave can currently do that. You would either have to "fix" recentdocuments to be that or make a new one.

Also note that everything i said is merely my opinion. I'm not blocking you (i don't feel like i have the right to with my lack of contributions in recent years). If more people find it useful the way you intend it and if there is no comment on the code change then you are quite simply allowed to commit. But in this case you'd probably want to wait (or ask) for a few more opinions before making that decision. All i'm trying to do is provide constructive feedback :)

works for the VDG really good job. well done. I like it.

@markg, I strongly disagree that "recent files" are not useful in open/save dialogs.

As I've mentioned before, a common use case that this enables is when you save an item from one program and need to open it in another without having a Dolphin window open that shows it. One example is attaching files to websites. You just go to the "Recent files" entry in the Open window and voila, your latest saved file is right there on the top. It's a super fast workflow.

There is a reason why "Recent items" is a default entry in the file manager and open/save dialogs in macOS and GNOME. They didn't add it for no good reason.

markg added a comment.Oct 12 2017, 5:31 PM

@markg, I strongly disagree that "recent files" are not useful in open/save dialogs.

As I've mentioned before, a common use case that this enables is when you save an item from one program and need to open it in another without having a Dolphin window open that shows it. One example is attaching files to websites. You just go to the "Recent files" entry in the Open window and voila, your latest saved file is right there on the top. It's a super fast workflow.

There is a reason why "Recent items" is a default entry in the file manager and open/save dialogs in macOS and GNOME. They didn't add it for no good reason.

As you seem eager to compare against others who do have it. How about others who don't. That's for instance XFCE with Thunar, it doesn't have that.
Windows 7 had is partly, called "Recent places" which only lists folders, not files.
Windows 10 doesn't have it.
macOS finder - contrary to what you keep telling here - does not show recent documents or folders by default.

All of the above is for the main applications. I'm not entirely sure about the file/folder open dialogs.

The only way i could find this convenient is if it were by context and the file open dialog boxes only. What i mean by that is when you get a file open dialog box and need to select a file then having the recently used files in there might be neat.
But by default in dolphin' main view in the favorites section... No, that doesn't seem the appropriate place.

I could get behind only adding it to Open File dialogs. Let me have a think on that.

That said, it's not just me who wants this in Dolphin, too. There's a Bugzilla ticket with one dupe and 32 votes: https://bugs.kde.org/show_bug.cgi?id=357542

Also, we have a semi-functional version of this already in the form of the Places panel's Recently Saved section. So there does seem to be some interest, both historical and current, in having Dolphin show recent files by default.

markg requested changes to this revision.Oct 12 2017, 6:03 PM

That said, it's not just me who wants this in Dolphin, too. There's a Bugzilla ticket with one dupe and 32 votes: https://bugs.kde.org/show_bug.cgi?id=357542

Also, we have a semi-functional version of this already in the form of the Places panel's Recently Saved section. So there does seem to be some interest, both historical and current, in having Dolphin show recent files by default.

Be aware that the thing you're trying to get approved here is not the fix for that bug!
You'd have to dig in Baloo to fix that bug.

You should not even be looking into the recentdocuments KIO slave as that is just not the part where the bug is (in this case).
Also, the users' case is for the file open/save dialog, again not the main application.

You yourself even said in the bug that this patch would only be a non optimal workaround. This is imho the most nasty thing; patches that "seem" to solve something but are in fact workarounds that merely hide the real problem. I admit, I - unknowingly - also did that in the past but was often corrected by someone. As you are now :)

So, to make things clear.
-1 for having this in dolphin' main window. Doesn't mean that it never gets in, just that i don't like it.
+1 for having this on a contextual basis in the file/folder open/save dialogs, that would in fact be very beneficial! You should still look at Baloo for fixing it, not recentdocuments.

This revision now requires changes to proceed.Oct 12 2017, 6:03 PM

You can add recent documents as an action like in Kate. Places model looks in not correct destination.

You can add recent documents as an action like in Kate. Places model looks in not correct destination.

I'm not sure exactly what this is referring to. Can you clarify?

I support having the recently used option, perhaps by default in the open/save dialogue, and also as an optional panel.
This would be highly useful for workflow for many, including using other software as suggested, but also coming back to documents (in multiple locations) being referred to (though not necessarily saved, so not appearing in the 'recently saved' section.

(It's unfortunate that there's not a user-friendly way of selecting components of the Places panel).