Repository navigation
feat(frontend): range compare on every price chart, with click-anchor and a pinned result - #389
Merged
Merged
Conversation
… and a pinned result Range compare (drag across a chart to read the change between two points) was only switched on for the portfolio, net worth, bank balance and forecast charts. The security price charts never had it. - scrub.ts: one gesture state for both readings of "click, then drag". Press-drag-release compares the range in either direction and keeps it on screen. Click-move-click anchors a point, follows the pointer, then pins. A click on a pinned range, Escape, blur or leaving clears it. - ScrubOverlay.tsx: band tinted gain/loss with edge hairlines and value dots, plus a readout with the period and Δ (abs + %) for every series. Before, only series[0] was shown, which on the portfolio hero chart is the dashed "invested" line. The readout stays inside the chart box. - ComposedChart gains `scrubbable` (chart builder price chart). - Turned on for the watchlist chart dialog, market lookup, research compare, chart builder and portfolio forecast. - Clicking a chart no longer draws the browser's default focus outline; keyboard focus keeps the ring. - Shortcut tip (en/nl) describes the click gesture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018QJtaMokesZfp18PhCAeFD
Coverage Report for backend
File CoverageNo changed files found. |
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.
Requested by EraPartner · project thread
Summary
Tor reported that dragging across a chart after clicking a point no longer shows the price change. A Playwright check on main showed that press-and-drag still worked on the charts that had
scrubbableturned on. The security price charts (watchlist dialog, market lookup, research compare, chart builder) never had it, and release cleared the result straight away. This PR:scrub.ts): one reducer supports both readings of "click, then drag".ScrubOverlay.tsx): the band is tinted gain or loss and has edge hairlines and value dots at both ends. The readout shows the period and Δ (absolute and %) for every series and stays inside the chart box. Before, onlyseries[0]was shown, which on the portfolio hero chart is the dashed "invested" line.ComposedChartgainsscrubbable.WatchlistChartDialog,MarketLookupPage,ResearchComparePage,ChartBuilderPage(main chart) andPortfolioForecastPage. Statistics flow charts, the oscillator and AI tool charts stay off.docs/components/charts.md,docs/reference/code-patterns.md,docs/architecture/frontend-architecture.md) are updated.Type of change
feat— new featureChecklist
tsc -p tsconfig.app.json)docs/pages updatedvalidate-localespassesArchitecture & data
Verification
chartScrub.test.tsxcover both drag directions, the pinned result, click to clear, click-move-click, Escape and leave, the not-scrubbable case, and Line and Composed charts. Chart suite: 8 files, 48/48 pass.useCsvPreview,FileHeadersPanel,PortfolioCsvColumnMapper), which expect windows-1252€and get\u0080. That points to the container's ICU, and this PR touches none of those files.Residual risk & follow-ups
Generated by Claude Code