Repository navigation
fix(dashboard): give every live session trace its own gradient fill - #566
Merged
Merged
Conversation
The live card drew a single area fill, for the selected or busiest session, so every other trace was a bare line. Each trace now has its own area and linearGradient with a unique id, inheriting the trace's series color, and the fills sit under all the lines.
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.
The live sessions card drew a single gradient area, under the selected session or else the busiest one. Every other session's sparkline was a bare line, so only the first row looked filled in.
What changed
live-fill-N, from a counter), so one session's fill can't point at another's.style.csstakes the fill color from--trace-color, the same variable the line uses, instead of a separate--live-fill-color.The top opacity of the fill is unchanged at 0.32. With six or more overlapping sessions the card gets busier; lower it if that looks heavy.
Tests
tests/e2e/dashboard-live.spec.ts: with at least three sessions, every trace has its own gradient id, its area'sfillreferences that gradient, the area path isn't empty, and the gradient's stop color equals the line's stroke.live-sessionsscenario (five sessions) in headless Chromium in light and dark and checked a gradient under every line.bun run typecheck,bun run lint,bun test tests/dashboard-liveand the 19 dashboard-live Playwright tests pass.