mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-11 05:42:19 +00:00
fix(insights): drop unhonored day-count from glucose median label
This commit is contained in:
1 parent
69e72c7fcc
commit
9065092ba0
8 files changed
+16
-15
No files matched your search
+1
-1
@@ -2791,7 +2791,7 @@
|
||||
"title": "Blutzucker",
|
||||
"description": "Deine Blutzuckerwerte im Zeitverlauf, in mg/dL.",
|
||||
"chartTitle": "Blutzucker",
|
||||
"medianLabel": "Median Blutzucker (90 Tage)",
|
||||
"medianLabel": "Median Blutzucker",
|
||||
"emptyState": {
|
||||
"title": "Noch keine Glukosedaten",
|
||||
"description": "Blutzuckerwerte erscheinen hier, sobald du einen erfasst oder ein Gerät synchronisiert."
|
||||
|
||||
+1
-1
@@ -2791,7 +2791,7 @@
|
||||
"title": "Blood Glucose",
|
||||
"description": "Your blood-glucose readings over time, in mg/dL.",
|
||||
"chartTitle": "Blood glucose",
|
||||
"medianLabel": "Median glucose (90 days)",
|
||||
"medianLabel": "Median glucose",
|
||||
"emptyState": {
|
||||
"title": "No glucose data yet",
|
||||
"description": "Blood-glucose readings appear here once you log one or a connected device syncs."
|
||||
|
||||
+1
-1
@@ -2791,7 +2791,7 @@
|
||||
"title": "Glucosa en sangre",
|
||||
"description": "Tus lecturas de glucosa en el tiempo, en mg/dL.",
|
||||
"chartTitle": "Glucosa en sangre",
|
||||
"medianLabel": "Glucosa mediana (90 días)",
|
||||
"medianLabel": "Glucosa mediana",
|
||||
"emptyState": {
|
||||
"title": "Aún no hay datos de glucosa",
|
||||
"description": "Las lecturas de glucosa aparecen aquí cuando registras una o un dispositivo sincroniza."
|
||||
|
||||
+1
-1
@@ -2791,7 +2791,7 @@
|
||||
"title": "Glycémie",
|
||||
"description": "Vos relevés de glycémie au fil du temps, en mg/dL.",
|
||||
"chartTitle": "Glycémie",
|
||||
"medianLabel": "Glycémie médiane (90 jours)",
|
||||
"medianLabel": "Glycémie médiane",
|
||||
"emptyState": {
|
||||
"title": "Aucune donnée de glycémie",
|
||||
"description": "Les relevés de glycémie apparaissent ici dès que vous en saisissez un ou qu’un appareil se synchronise."
|
||||
|
||||
+1
-1
@@ -2791,7 +2791,7 @@
|
||||
"title": "Glicemia",
|
||||
"description": "Le tue letture di glicemia nel tempo, in mg/dL.",
|
||||
"chartTitle": "Glicemia",
|
||||
"medianLabel": "Glicemia mediana (90 giorni)",
|
||||
"medianLabel": "Glicemia mediana",
|
||||
"emptyState": {
|
||||
"title": "Nessun dato di glicemia",
|
||||
"description": "Le letture di glicemia appaiono qui quando ne registri una o un dispositivo si sincronizza."
|
||||
|
||||
+1
-1
@@ -2791,7 +2791,7 @@
|
||||
"title": "Poziom glukozy",
|
||||
"description": "Twoje odczyty glukozy w czasie, w mg/dL.",
|
||||
"chartTitle": "Poziom glukozy",
|
||||
"medianLabel": "Mediana glukozy (90 dni)",
|
||||
"medianLabel": "Mediana glukozy",
|
||||
"emptyState": {
|
||||
"title": "Brak danych o glukozie",
|
||||
"description": "Odczyty glukozy pojawią się tutaj po zapisaniu jednego lub synchronizacji urządzenia."
|
||||
|
||||
@@ -75,17 +75,17 @@ describe("<MetricStatStrip>", () => {
|
||||
expect(html).toContain("Median");
|
||||
});
|
||||
|
||||
// v1.16.16 — glucose declares the trailing-90-day p50 window in the label
|
||||
// so the median is not read as an all-time central value.
|
||||
// v1.16.16 — the median cell follows the chart's active range, so the label
|
||||
// names the metric without asserting a fixed window it can't honor.
|
||||
it("renders an overridden median label when medianLabel is provided", () => {
|
||||
const html = render(
|
||||
<MetricStatStrip
|
||||
summary={populated}
|
||||
unit="mg/dL"
|
||||
medianLabel="Median glucose (90 days)"
|
||||
medianLabel="Median glucose"
|
||||
/>,
|
||||
);
|
||||
expect(html).toContain("Median glucose (90 days)");
|
||||
expect(html).toContain("Median glucose");
|
||||
});
|
||||
|
||||
it("honours fractionDigits for integer-unit metrics (0 decimals)", () => {
|
||||
|
||||
@@ -93,11 +93,12 @@ export interface MetricStatSeries {
|
||||
*/
|
||||
dataKey?: string;
|
||||
/**
|
||||
* v1.16.16 — optional override for the "Median" cell label. The strip's
|
||||
* median is a trailing-90-day p50 (see `DataSummary.median` /
|
||||
* `summaries-slice.ts`); the default generic "Median" label leaves that
|
||||
* window undeclared. Blood glucose passes a window- + context-declaring
|
||||
* string (e.g. "Median glucose (90 days)") so the number is not read as an
|
||||
* v1.16.16 — optional override for the "Median" cell label. The median
|
||||
* cell follows the chart's ACTIVE range (`windowStats`) when a range is
|
||||
* selected and only falls back to the full-range `summary` p50 otherwise,
|
||||
* so the label must NOT assert a fixed day-count it can't honor. Blood
|
||||
* glucose passes a metric-naming string (e.g. "Median glucose") so the
|
||||
* number reads as that metric's median for the visible range, not an
|
||||
* all-time central value. Omit it to keep the generic label.
|
||||
*/
|
||||
medianLabel?: string;
|
||||
|
||||
Reference in new issue
Block a user