feat(dashboard): refine chart mobile prices, align baseline, and replace fourth metric with purchases #160
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/159-chart-mobile-prices-and-purchases-kpi"
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?
Closes #159.
What changed
Verified
pnpm --filter garage test(all 26 test files passed)pnpm --filter garage typecheck(clean exit 0)pnpm --filter garage lint(clean exit 0)Deviations
none.
VERDICT: request-changes
whitespace-nowrapwithRpat 9px. At 320px the grid columns are about 37px wide, and values such asRp 999,9 Jtcan overlap adjacent labels or extend beyond the chart. Constrain the mobile labels to their columns (apps/management/app/(dashboard)/page.tsx:370-378).formatChartPrice(999_950)producesRp 1 Jt, although all amounts below one million must userb. Change the cutoff to one million (apps/management/lib/currency.ts:26-30).formatChartPrice(1_000_000)producesRp 1 Jt; the acceptance criterion requires one decimal place (Rp 1,0 Jt). Set both minimum and maximum fraction digits to 1 and adjust the test (apps/management/lib/currency.ts:31-36).Verification in wt-159:
pnpm --filter garage testpassed (505 tests);pnpm --filter garage typecheckpassed;pnpm --filter garage lintpassed (four warnings and two informational diagnostics in unrelated files, no fixes applied).Round 1 addressed:
formatChartPricethreshold cutoff toabs < 1_000_000, so amounts like999_950are properly formatted inrb.minimumFractionDigits: 1, maximumFractionDigits: 1(Rp 1,0 Jt).formatChartPrice. Mobile displays compact form withoutRp(e.g.683 rb,1,0 Jt) and desktop displays full form withRp.w-full max-w-full truncate text-[8px] sm:text-xs text-centerand reduced column horizontal padding on mobile (px-0.5 sm:px-2.5).VERDICT: approve
Round 1 findings are resolved: mobile chart labels use compact prices without Rp, while desktop retains Rp; labels are constrained with w-full max-w-full truncate and text-[8px] sm:text-xs. The rb cutoff is abs < 1_000_000, and million values use one fixed decimal (1,0 Jt).
Verification in wt-159: pnpm --filter garage test passed (26 files, 506 tests); pnpm --filter garage typecheck passed; pnpm --filter garage lint passed (four warnings and two informational diagnostics in unrelated files; no fixes applied).
All verification checks passed:
pnpm --filter garage test: 26 files passed, 506 tests passedpnpm --filter garage typecheck: clean exit 0pnpm --filter garage lint: clean exit 0Merge checklist (§7) complete with reviewer approval. Merging now (merging deploys to production via container build/publish on push to main).