Repository navigation
fix: fixed Search view returning all events unfiltered, and converted component to typescript - #555
Merged
Merged
Conversation
TimeToBuildBob
added a commit
to TimeToBuildBob/aw-webui
that referenced
this pull request
Sep 27, 2026
… hover color dark.css overrides the hovered uncategorized bar fill (rgb(184,184,184) -> ActivityWatch#555 !important), so picking label colours from the raw hover color produced dark labels on the dark themed bar. Reuse the computed-style readback already used on mouseout for the mouseover path (shared helper). Git-Session-Id: 130d3e4b-eec6-5fcb-b7ab-fbc00b18e391
ErikBjare
pushed a commit
that referenced
this pull request
Oct 6, 2026
* fix(dark-mode): restore appsummary bar-chart label contrast
The generic 'svg text { fill: #fff !important }' rule forces white text on
ALL SVG elements including bar-chart labels in the appsummary component.
For light-colored bars (#FFE082 yellow, #90CAF9 light blue, #EF9A9A pink,
#A5D6A7 green) this produces white-on-light with failing WCAG contrast.
Add a scoped exception matching the timespiral pattern already in dark.css:
unset the fill override for appsummary text so labels fall back to the
component's own fill or SVG default (black), which is readable on both
light and dark bar backgrounds.
Closes #412
Git-Session-Id: d3f6
* fix(dark-mode): outline appsummary labels instead of unsetting fill
fill: unset made labels black, which is illegible on dark bars and on
the dark background when a short bar ends before its label does.
Keep white fill and add a dark paint-order:stroke outline so labels
read on light bars, dark bars, and background alike.
Git-Session-Id: d4b04a47-4fb8-5017-913a-9cf2f4330639
* fix(summary): colour bar labels by bar luminance, split overflow text
Replace the dark-mode stroke outline with a structural fix in summary.ts:
each label is drawn twice, once clipped to the bar (dark or light text,
whichever contrasts better with the bar colour) and once clipped to the
remaining width (default text colour, themed by dark.css for the page
background). Labels that overflow short bars stay readable in both themes
without outlines or text-shadow on the bar.
Reverts the dark.css appsummary text override.
Git-Session-Id: ec72
* fix(summary): use textColor for in-bar duration to guarantee WCAG AA contrast
The inBarColors helper used durationColor (#444) for the duration label when
dark text was chosen. On borderline bar colours where #333 just clears the
4.5:1 AA threshold, #444 could fall short. Use textColor (#333) for both name
and duration in the dark-text branch so the contrast guarantee is the same for
both labels.
Git-Session-Id: 19a84a06-0c5b-5834-91cc-5c41a80c4dae
* fix(summary): post-render pass to correct label colour after dark-mode CSS overrides; aria-hidden on visual text copies
Git-Session-Id: 347544d9-d4b9-52ca-a959-71c5eb10b5ac
* fix(summary): filter zero-duration apps; keep in-bar label colours correct across hover
P1 (ced6c2c4c7bf): extend the duration filter to also reject duration === 0.
A zero-duration app produced widthPct=0 and clipOut covering the full bar
width, drawing both label copies in the same region with conflicting fills.
P2 (14a715afce66): move clipIn/clipOut id definitions before the hover
handlers so they can be referenced in those closures. mouseover now updates
in-bar label colours to contrast against the hover fill; mouseout schedules a
requestAnimationFrame pass that re-reads the actual CSS-computed fill
(accounting for theme overrides) and restores the correct in-bar colour.
This ensures the label colours stay accurate even when a rAF fires during a
hover and when CSS (e.g. dark.css) overrides the raw appcolor.
Git-Session-Id: d67ea75f-ed61-5b13-a770-59cfac0e87b2
* fix(summary): rename shadowed _ params to satisfy no-shadow lint
Git-Session-Id: 7fda0260-02b0-5ec4-b1a4-c9c66ceac41a
* fix(summary): guard empty app list after zero-duration filter
Git-Session-Id: d4f1421c-a125-55b7-9b4b-e43da08db21d
* fix(summary): derive hover label colours from displayed fill, not raw hover color
dark.css overrides the hovered uncategorized bar fill (rgb(184,184,184) ->
#555 !important), so picking label colours from the raw hover color produced
dark labels on the dark themed bar. Reuse the computed-style readback already
used on mouseout for the mouseover path (shared helper).
Git-Session-Id: 130d3e4b-eec6-5fcb-b7ab-fbc00b18e391
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Should convert the rest of the components to ts too.