Closed davidfraser closed 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.
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: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@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.
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...
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!
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.
Summary:
Introduced category-based coloring for timeline events in
src/util/color.ts
and updatedsrc/visualizations/VisTimeline.vue
to apply these colors.Key points:
getCategoryColorFromEvent
insrc/util/color.ts
for category-based event coloring.src/visualizations/VisTimeline.vue
to usegetCategoryColorFromEvent
for event colors.currentwindow
,web.tab.current
,afkstatus
,app.editor
,general.stopwatch
.getCategoryColorFromString
for debugging.Generated with :heart: by ellipsis.dev