fix(insights): lift explainer popover body to 12px + correct target-summary doc

Two small polish items on the insights category surface.

The desktop explainer popover body rendered at 11px while the mobile
sheet used the larger `text-sm`, an uncomfortable and asymmetric read.
Lift the popover body to `text-xs` (12px) so both surfaces sit on the
type scale.

The `MetricTargetSummary` docstring claimed both the range and the
in-target share are hidden when the route flags `insufficientData`. The
range stays visible — only the share is suppressed. Correct the comment
to match the code.
This commit is contained in:
Marc-André Bombeck committed 2026-05-31 22:35:02 +02:00
1 parent 36d5c79526
commit 75380d5f39
2 files changed
+5 -4

No files matched your search

+1 -1
View File
@@ -113,7 +113,7 @@ export function MetricExplainer({ metric, className }: MetricExplainerProps) {
<p
id={bodyId}
data-slot="metric-explainer-body"
className="text-muted-foreground text-[11px] leading-snug"
className="text-muted-foreground text-xs leading-snug"
>
{body}
</p>
@@ -29,9 +29,10 @@ import { Card, CardContent } from "@/components/ui/card";
*
* The "in target" share reads `daysInRange30d / daysLogged30d` — the
* fraction of logged days over the last 30 whose mean reading landed in
* the green band. We hide the share (and the range) entirely when the
* route flags `insufficientData`, matching the `/targets` consistency
* strip so the two surfaces never disagree.
* the green band. We hide the share alone when the route flags
* `insufficientData`; the range stays visible so the band is always
* legible. This matches the `/targets` consistency strip so the two
* surfaces never disagree.
*
* A discreet "Adjust target range" link routes to `/targets`, which
* stays the canonical place to view / tune the bands.