ActivityWatch / aw-webui

Webapp for visualizing and browsing ActivityWatch data, built with Vue.js.
Mozilla Public License 2.0
105 stars 108 forks source link

Timeline category colors #609

Closed davidfraser closed 1 month ago

davidfraser commented 1 month ago

This is a first draft of supporting using category colors for the main Timeline view. It still contains some verbose logging...

See ActivityWatch/activitywatch#573 which was a request for this which was closed stale, and #257 which listed it as follow-up work.


:rocket: This description was created by Ellipsis for commit 6f5581bf288b4bf3c8003884c25f2619144df6f0

Summary:

Introduced category-based coloring for timeline events in src/util/color.ts and updated src/visualizations/VisTimeline.vue to apply these colors.

Key points:


Generated with :heart: by ellipsis.dev

davidfraser commented 1 month ago

I've also checked running tests, and they pass - though I haven't added new tests for this code:

Test Suites: 7 passed, 7 total
Tests:       16 passed, 16 total
Snapshots:   2 passed, 2 total
Time:        109.462 s
Ran all test suites in 2 projects.
codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 7.69231% with 12 lines in your changes missing coverage. Please review.

Project coverage is 25.98%. Comparing base (e6ad4cd) to head (cd3fee8). Report is 1 commits behind head on master.

Files Patch % Lines
src/util/color.ts 7.69% 12 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #609 +/- ## ========================================== - Coverage 26.13% 25.98% -0.15% ========================================== Files 27 27 Lines 1630 1643 +13 Branches 273 292 +19 ========================================== + Hits 426 427 +1 + Misses 1178 1157 -21 - Partials 26 59 +33 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

RTnhN commented 1 month ago

@davidfraser I just tried this, and it works great on my machine. I think that it is a good solution to #604. I would be happy with merging something like it.

davidfraser commented 1 month ago

This looks pretty good!

I might forget about this PR, but I'd love to see it merge, so do ping me when you're ready for review/merge!

Thanks @ErikBjare ! I'm happy with this from my side - just changed some quoting to please the linter - so shout with any other things you think should be addressed...

ErikBjare commented 1 month ago

Thanks a lot for this contribution @davidfraser! ❤️

I must admit I am a bit shocked it was this easy the whole time, some excellent low-hanging fruit you picked!