refactor(statistics-deck): consolidate the period views' shared helpers into the shell #156
Labels
No labels
blocked
bug
enhancement
high-priority
low-priority
needs-info
needs-triage
ready-for-agent
ready-for-human
referenced
research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gabogg/hikcentral#156
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The Day, Week and Month views (#134–#136; PRs #149, #148, #147) were built in parallel. On purpose, each keeps its shared-looking helpers local until all three are merged. This issue consolidates them into the shell.
Scope
statistics_deck/views/kit.js), extracted from the three view files:DAILY_AVERAGEtag);ctx.locale(memoisedIntl.NumberFormat);statisticsDeck.comparison.reason.*texts. The views arrived with three different wordings; the Month wording is canonical, applied at merge.withDatascope. Document it as whole counts only, and add a helper that renders one<data value={raw}>formatted</data>for formatted figures (decimals, thousands separators, percentages). This came from the #149 second-pass review, S2-1. Week'snumberPartsfolds into it.deckChartOptions: deep-mergescales.*.ticks, so views stop re-spreading defaults (#149 S2-3).rgba()anywhere.Acceptance