From 2e2f07c48cc4ccbc3cc6d1fa73d16bffaaac2c70 Mon Sep 17 00:00:00 2001 From: Clarence Date: Wed, 2 Dec 2026 20:21:07 +0800 Subject: [PATCH 1/2] fix: size axis and stamp labels in rem so text-size setting scales them Co-Authored-By: Claude Sonnet 5.5 --- CHANGELOG.md | 6 ++++++ package.json | 2 +- src/app/dashboard/stats/README.md | 2 +- src/app/dashboard/visits-bars.tsx | 2 +- src/components/landing/card-screen.tsx | 2 +- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a02a63c8..98a44b93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to loopkit are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). +## [0.8.2] - 2026-12-02 + +### Fixed + +- Visits chart axis labels and the landing card-screen stamp labels are sized in rem, so the Text size setting scales them. + ## [0.8.1] - 2026-12-02 ### Added diff --git a/package.json b/package.json index 11e196ca..dfcfc092 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "loopkit", - "version": "0.8.1", + "version": "0.8.2", "private": true, "packageManager": "pnpm@11.10.0", "engines": { diff --git a/src/app/dashboard/stats/README.md b/src/app/dashboard/stats/README.md index 72fee5c8..be38b1ee 100644 --- a/src/app/dashboard/stats/README.md +++ b/src/app/dashboard/stats/README.md @@ -8,7 +8,7 @@ Vendor stats page at `/dashboard/stats` — enrollment, retention, and visit met - `page.tsx` — `StatsPage` server component; requires a vendor, redirects to the single program when there's exactly one, renders `ProgramSwitcher` below the page header, then nine stat tiles in three groups (Customers, Visits, Rewards: total customers, active, not seen in 30 days, visits, "Came back", days between visits, rewards redeemed, rewards claimed, rewards expired unclaimed) with day-over-day deltas and a shared `VisitsChart`, sourced from `getVendorStats`/`getProgramStats` plus the separately-sourced `countExpiredVouchers`. Each tile's own `Tile` helper wraps `@merqo/ui`'s shared `StatTile` (label/value/delta content, value-above-label via its `reverse` prop) in `@merqo/ui`'s `ElevatedCard` shell. Both return branches' root element is a plain `
` — the page no longer sets its own `max-w-*`/padding; the enclosing `../layout.tsx` `
` now owns the shared `max-w-7xl` width and padding for the whole `/dashboard` tree. The vendor-wide branch also renders a "By mechanic" card from `getVendorMechanicBreakdown` (`@/lib/stats`), shown only when the vendor runs 2+ distinct mechanics — a single-mechanic shop already sees those numbers in the tiles above. - `stats-page.dom.test.tsx` — jsdom tests for `StatsPage`: renders vendor-wide stat tiles (including "Came back" and "Rewards expired unclaimed") and the visits chart with no program selected, renders program-scoped tiles when `?p=` is set, shows the empty state at zero enrolled customers, and shows/hides the "By mechanic" card based on how many mechanics `getVendorMechanicBreakdown` returns. -- `visits-chart.tsx` — `VisitsChart({ data })`: the 30-day visits bar chart, extracted so both of `page.tsx`'s branches (all programs / single program) share one implementation instead of ~110 duplicated lines; renders a `border-t border-border` baseline under the bars and `text-[10px]` first/last date labels (via `formatShortDate`) beneath it, since the per-bar `title` tooltip alone is invisible on touch — the primary device per PRODUCT.md. +- `visits-chart.tsx` — `VisitsChart({ data })`: the 30-day visits bar chart, extracted so both of `page.tsx`'s branches (all programs / single program) share one implementation instead of ~110 duplicated lines; renders a `border-t border-border` baseline under the bars and `text-[0.625rem]` first/last date labels (via `formatShortDate`) beneath it, since the per-bar `title` tooltip alone is invisible on touch — the primary device per PRODUCT.md. ## Reuse and ownership diff --git a/src/app/dashboard/visits-bars.tsx b/src/app/dashboard/visits-bars.tsx index ddcd4913..ec73c124 100644 --- a/src/app/dashboard/visits-bars.tsx +++ b/src/app/dashboard/visits-bars.tsx @@ -49,7 +49,7 @@ export function VisitsBars({ )} {first && last && (
{formatShortDate(first.date)} {formatShortDate(last.date)} diff --git a/src/components/landing/card-screen.tsx b/src/components/landing/card-screen.tsx index 379282d9..acb59b6e 100644 --- a/src/components/landing/card-screen.tsx +++ b/src/components/landing/card-screen.tsx @@ -36,7 +36,7 @@ export function CardScreen({
Date: Wed, 2 Dec 2026 20:32:29 +0800 Subject: [PATCH 2/2] docs: note rem-sized labels in READMEs Co-Authored-By: Claude Sonnet 5.5 --- README.md | 2 +- src/app/dashboard/README.md | 2 +- src/components/landing/README.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 32c8d151..64a35d89 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Day keys, short dates and dollars-to-cents conversion come from `@merqo/ui` (`sgDayKey`, `formatShortDate`, `dollarsToCents`), not local helpers. -The visits trend, Counter last-program memory, "Serve a customer" button and retired-card notice read and write browser storage and media queries through `@merqo/ui`'s `readStored`/`writeStored`/`useMediaQuery` (see `src/features/card-check/components/README.md`). The account menu's Text size is a Preferences submenu from `@merqo/ui` v0.68.0. +The visits trend, Counter last-program memory, "Serve a customer" button and retired-card notice read and write browser storage and media queries through `@merqo/ui`'s `readStored`/`writeStored`/`useMediaQuery` (see `src/features/card-check/components/README.md`). The account menu's Text size is a Preferences submenu from `@merqo/ui` v0.68.0. Text outside SVG is sized in rem so that setting scales it; SVG text (wheel, scratch card) uses viewBox units and scales with its SVG. Shared UI is pinned to audited commit `989d934c1cc8d957ff383934debf8ef083b6b6a4`. The lockfile and exact build allowlist select this same source, including image lifecycle cleanup, malformed storage-URL handling and bounded money inputs. diff --git a/src/app/dashboard/README.md b/src/app/dashboard/README.md index 21ee703e..c0f8de60 100644 --- a/src/app/dashboard/README.md +++ b/src/app/dashboard/README.md @@ -65,7 +65,7 @@ submenu. ## Reuse and ownership -`visits-bars.tsx` supplies pure bars and calendar axes to Overview and Stats; each view retains its own window and captions. `serve-customer.tsx` composes Counter panels around `counter/use-serve-customer.ts`. Customer-notify and qkit-earn settings share `hooks/use-save-settings.ts` and `components/form-card.tsx` while keeping their distinct defaults and entitlement rules. +`visits-bars.tsx` supplies pure bars and calendar axes (rem-sized labels, so Text size scales them) to Overview and Stats; each view retains its own window and captions. `serve-customer.tsx` composes Counter panels around `counter/use-serve-customer.ts`. Customer-notify and qkit-earn settings share `hooks/use-save-settings.ts` and `components/form-card.tsx` while keeping their distinct defaults and entitlement rules. Server Actions here return `ActionResult` from `@merqo/ui/kit-api`. `useAsyncAction` comes from `@merqo/ui`; call sites pass `(fn: () => Promise) => fn()` as the action. The plan page reads `merqoBaseUrl` from `@merqo/ui/kit-api`. diff --git a/src/components/landing/README.md b/src/components/landing/README.md index c5cc6215..6e3c33db 100644 --- a/src/components/landing/README.md +++ b/src/components/landing/README.md @@ -10,7 +10,7 @@ Shared controls and `cn` used by this folder's modules are imported from `@merqo ## Contents - `card-journey.tsx` — `CardJourney` (`#how`): the three-step scroll journey (watch, tap, come back) built from `@merqo/ui` `Journey`/`JourneyStep`/`PhoneFrame`/`PressButton`; scroll is the play head and rewinds, a tap overrides until scroll moves on, and under reduced motion each step shows its finished state with a Replay button -- `card-screen.tsx` — `CardScreen`, `JoinScreen`, `CounterScreen`: the customer card, join page and vendor counter shown inside phones +- `card-screen.tsx` — `CardScreen`, `JoinScreen`, `CounterScreen`: the customer card, join page and vendor counter shown inside phones; its stamp labels are sized in rem so the Text size setting scales them - `card-labels.ts` — the product strings the mock-ups quote (pinned to app source by `card-labels.test.ts`) - `rhythm.ts` — shared container width and section padding - `sections.tsx` — `LandingFaq` (three `FaqRows`) and `LandingClosing` (`ClosingCall` with the unchanged pricing line and the auth-aware CTA)