Update to using the latest aw-client#6
Conversation
johan-bjareholt
left a comment
There was a problem hiding this comment.
Nice with the addition of the new version of aw-client-js!
I haven't had time to test this and @Otto-AA is the one with the most expertise with this watcher so I'll let him review.
But looks pretty good to me!
| duration: 0, | ||
| data: { | ||
| language: this._getFileLanguage() || 'unknown', | ||
| projectName: this._getProjectName() || 'unknown', |
There was a problem hiding this comment.
When I and @Otto-AA first made the support for editors and discussed the format and came up with this after some discussions:
https://activitywatch.readthedocs.io/en/latest/buckets-and-events.html#app-editor-activity
The reason why we don't have a read-friendly "projectName" property is because many editors don't support that and we want to support as many as possible, so the web-ui simply checks for a path and takes the name of the top folder. In the case of vscode where we actually have a read-friendly project name that's great, but we are not going to be using that property to display in aw-webui so it's essentially going to be worthless in the end unless someone does third-party visualization with an edge-case for this watcher specifically which doesn't seem very likely.
So in conclustion, while the code looks good it's not going to be used so I suggest to just keep the code base small and remove it.
|
Thanks for your contribution, it seems fine to me 👍 Regarding merging and publishing via vsce, I guess it would be better if someone else becomes the maintainer of this watcher. I myself sadly don't have time for maintaining, testing new pull requests, finding bugs, etc. anymore, so I would suggest to find a new maintainer or mark it as unmaintained. And here is the discussion about the format if you want to read it: https://forum.activitywatch.net/t/bucket-and-event-design-fo-vs-code-extension/120/9 |
|
@Otto-AA Alright, I guess that I can take up the maintainership until we find a better maintainer I guess then. |
|
@johan-bjareholt Is your email address from github still correct? If yes, I will give you owner rights for the extension (for publishing via vsce) |
|
@Otto-AA Yes that is still my mail, that'll work fine. Also, I tested the code and everything seems to work fine |
|
I'll merge this, fix the comment I made and add it to the ChangeLog because I'm likely not going to have time to review this later in the week. |
|
@devzsolt Thanks for the PR by the way! 😃 |
|
@johan-bjareholt @Otto-AA you're welcome. Sorry that I didn't follow the conversation. I'm glad that you have found my PRs useful. I'm using it for almost a week now and works well. Thank you for developing this extension in the first place! Thanks for explaining why you discarded the project name idea. I'm not sure yet if I'll ever use it but in the future I'm thinking about some pattern based categorization and a simplified custom visualization. Of course the full path is unique for pattern matching and possibly the patterns would have a metadata containing the project name (which I would enter once manually)... so you're right, it's possibly useless data :) |
|
@devzsolt If you're interested in categorizing activity using pattern-matching, check out my work in aw-research here: ActivityWatch/aw-research#12 And the general issue on the matter: ActivityWatch/activitywatch#95 |
This changeset contains several small changes:
projectName(I liked the previous logic better so restored it into a new field keepingprojectintact logging the project path)