WIP Add an ioslave to access KActivityStat data
AbandonedPublic

Authored by meven on Jun 24 2019, 4:45 PM.

Details

Reviewers
ngraham
ivan
Group Reviewers
Frameworks
Summary

To accomplish D7446, we want to add a better recent document ioslave to Dolphin/KFileWidgets than current recentdocuments:/
This adds activity awareness to recent documents and allows consistency with kicker/kickoff recent documents.

The code started out of kio-extras recent-documents and Kicker/Kickoff.
This is my first ioslave so I think I will need a bit of mentoring, if anyone feels like it to guide me a little.

This repository may not be the appropriate one, the other obvious candidate would be kio-extras.

Future features would allow users to filter parent dir, switch only-folders, number of elements returned.

Test Plan

compile
open recentdocumentsactivities:/ in Dolphin/KFileWidgetItem

Diff Detail

Repository
R159 KActivities Statistics
Branch
add-logging
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 13373
Build 13391: arc lint + arc unit
meven created this revision.Jun 24 2019, 4:45 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptJun 24 2019, 4:45 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
meven requested review of this revision.Jun 24 2019, 4:45 PM
meven edited the summary of this revision. (Show Details)Jun 24 2019, 4:46 PM
meven updated this revision to Diff 60631.Jun 25 2019, 9:43 AM

Allow to filter mimetype with ?type=mimetype1[,mimetype2]

meven updated this revision to Diff 60633.Jun 25 2019, 10:03 AM

Allow to override default 30 results limit

meven added a subscriber: ivan.

I have added you @ivan as you were the main author of KAcvitiesStat and might be interested in the review.

meven edited reviewers, added: ivan; removed: lunakl.Jun 25 2019, 10:50 AM
meven updated this revision to Diff 60646.Jun 25 2019, 2:44 PM

Implement proper logging, add url filter parameter

meven updated this revision to Diff 60653.Jun 25 2019, 3:34 PM

Add activity filtering

ivan added a comment.Jun 26 2019, 6:45 AM

I'd add support for HighScoredFirst and RecentlyCreatedFirst. Maybe the protocol could be something like "used:/" or something.

It should also support getting items for the current activity, or all recently used items.

meven added a comment.EditedJun 26 2019, 6:58 AM
In D22082#486782, @ivan wrote:

I'd add support for HighScoredFirst and RecentlyCreatedFirst. Maybe the protocol could be something like "used:/" or something.

Adding sorting options is on my todo-list, I also need a way to enforce this ordering in dolphin, perhaps this will be code in dolphin and will be specific to this ioslave.

used:/ this to me like a great suggestion. I will probably update the code to this.

@ivan Should it be in kio-extras, or do you feel it is fine in kactivities-stats repo ?

It should also support getting items for the current activity, or all recently used items.

Yep, it does already, just need to support the "global" special case.

I am putting this in planned changes for now, because I have a few things to take care of before it is worth reviewing in depth :

  • documentation
  • ResultWatcher and KDirNotify : notify ioslaves users when the content as soon as some new content has arrived
  • dolphin must follow sorting of ioslave rather than the one from the files/directories
  • needs to check it works with smb nfs sftp differently mounted, needs to avoid displaying files on no mounted-drives, and other network-fs related checks

By the way KAcitivityStats library is quite nice to use :)

meven updated this revision to Diff 60676.Jun 26 2019, 7:55 AM

Allow to find data accross all activities using ?activity=any

ivan added a comment.Jun 26 2019, 3:15 PM

I think it would be better to put it into kio-extras - activities kio is also there.

By the way KAcitivityStats library is quite nice to use :)

People were skeptical about the API at first, but it grew onto them. Glad you like it :)

[...] have a few things to take care of before it is worth reviewing [...]

You took up quite a big task I have to say :)

meven updated this revision to Diff 60708.Jun 27 2019, 6:21 AM
  • Add a logging category kf5.kactivity.stat
meven planned changes to this revision.Jun 28 2019, 7:32 AM

recentlyused:/ will be moved to kio-extras.

meven updated this revision to Diff 60779.Jun 28 2019, 1:54 PM
  • Add proper logging using ECMQtDeclareLoggingCategory
meven planned changes to this revision.Jun 28 2019, 1:54 PM
meven updated this revision to Diff 60782.Jun 28 2019, 2:02 PM
  • Add proper logging using ECMQtDeclareLoggingCategory
meven planned changes to this revision.Jun 28 2019, 2:02 PM
meven abandoned this revision.Jun 28 2019, 2:51 PM

Abandoned in favor of D22144