Summary: | Show accessed remote shares as on-demand items in the Networks section of the places panel | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kio | Reporter: | Nate Graham <nate> |
Component: | general | Assignee: | KIO Bugs <kio-bugs-null> |
Status: | REPORTED --- | ||
Severity: | wishlist | CC: | kdelibs-bugs, miranda, sitter |
Priority: | NOR | Keywords: | usability |
Version: | git master | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Nate Graham
2021-09-08 17:27:33 UTC
The places tech doesn't have any infrastructure for this, does it? I reckon this needs addressing in kio/dolphin (a way to temporarily inject new places - whatever temporary here means) first before we can do anything from the slave side. It has the ability to display transient items like this for removable devices. I was thinking we could maybe re-use that tech. It wouldn't surprise me if supporting work on Dolphin and/or KIO were required, though. (In reply to Nate Graham from comment #2) > It has the ability to display transient items like this for removable > devices. I was thinking we could maybe re-use that tech. That's different though. That is simply querying solid for mount points. Nothing is actively "injecting" resources for that If there's nothing for the ioslave to do, feel free to move this to kio or dolphin Well, it needs discussing with someone ;) I would imagine the easiest would be to give the places system (which I think is in kio?) to handle all this and then have select slaves push urls into it. But I havent really thought about it very long. Long story short there may be something to do for the slave but first need the foundational tech somewhere After some musing I'm not convinced the worker actually should do anything. The main trick here is that the worker doesn't know what the client application is doing. e.g. you could have a sync application that uses KIO to implement network syncing. The user doesn't necessarily know about it nor did they take any active actions to visit the host, so it'd be odd if a random host then appears in the places model. That leads me to conclude that realistically this needs to be entirely handled in a higher level system. There is also the fact that this should extend to all remote slaves. There's no reason bluetooth, sftp, gdrive shouldn't all work the same. So, also from a code reuse POV it probably makes more sense that a higher level system takes care of this for all workers with a suitable property set to opt into this. A number of questions also popped into my mind: What does temporary mean exactly? Do they go away when you log out? Or on reboot? What if you don't reboot for a year? Or maybe there's always only N entries at most? What exactly is the UX here? You go into a host in dolphin and it adds it into the model? Or do you have to actually open a file there? Does it also apply if you manually enter the URL? What if you manually open a program with an url (`gwenview smb://foo/meow.jpg`)? Do file open dialogs work the same as though used through dolphin? https://invent.kde.org/frameworks/kio/-/blob/master/src/filewidgets/kfileplacesmodel.cpp#L425 Uses kactivities under the hood https://invent.kde.org/network/kio-extras/-/blob/master/recentlyused/recentlyused.cpp#L67 It's not really folded into the model though but an entry that leads to the recentlyused worker. Dolphin could use that to add entries to its places view. Or indeed the KIO model could expand the content. Bonus advantage that this would build on existing tech and not require any extra changes to track recent url activities. Potentially relevant: https://invent.kde.org/system/kio-fuse/-/issues/18 > What does temporary mean exactly? Do they go away when you log out? Or on reboot? > What if you don't reboot for a year? Or maybe there's always only N entries at most? In my mind, for Samba at least, it means "while logged into the share, until logging out of it (manual or automatic)". > What exactly is the UX here? You go into a host in dolphin and it adds it into the > model? Or do you have to actually open a file there? Does it also apply if you > manually enter the URL? What if you manually open a program with an url > (`gwenview smb://foo/meow.jpg`)? Any action that causes you to log into the share should do it IMO. Whether this means logging into the share and entering the password (or letting the system enter a saved password) or accessing a file on it from some other means, and entering the password. > Do file open dialogs work the same as though used through dolphin? In this manner, they should, IMO. Generally they do. They currently share the same data model; Dolphin just does custom drawing for its Places Panel (which IMO it should stop doing anyway). Bug 442258 also looks relevant. Moving to KIO. Since you want this in both dolphin and fopendialog we'll probably need support in the kfileplacesmodel. Also since it should trigger on pretty much any interaction with a share, injecting into the model probably needs to happen in a fairly central place as well (kdirmodel maybe?). In a way it feels like what you are describing is simply a more opinionated recent locations system, really. We could possibly just build on the existing locations tech... - KIO would need to actually inject visited locations into KActivities (fileopen for example does not seem to do that right now) - Then the placesmodel can ingest recent location data from KActivities and only show remote schemes. We need a way to figure out which protocols are remote though. That is all very KDE though... A more "native" option would be to always trigger kio-fuse when first accessing a network protocol, so we have a mount reflected in the system, and that mount then shows up to all programs as well as solid. Kfileplacesmodel then can simply model NetworkShare types from solid. |