mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 04:50:59 +00:00
fix(measurements,settings): visual disambiguation polish
Two related polish items:
- Mobile measurement list rendered systolic and diastolic BP
rows with the same heart icon, so a 117 mmHg row and a
79 mmHg row underneath looked identical until you read the
number. Mirror the desktop "Sys" / "Dia" badges on the
mobile cards too.
- Telegram settings card was showing two separate badges side
by side ("Configured" green + "Enabled" outline). They
carried no visual hierarchy and made the difference between
the two unclear. Collapsed into a single status pill — green
"Active" when both bits are set, neutral
"Configured · Disabled" when the channel is paused.
Also brought a stale settings-sections SSR-smoke test in line
with the F-07 threshold-naming change.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
98cd13c8e0
commit
876e074fd8
3 files changed
+22
-5
No files matched your search
@@ -475,6 +475,16 @@ export function MeasurementList({ onEdit, onAddFirst }: MeasurementListProps) {
|
||||
</div>
|
||||
)}
|
||||
<div className="min-w-0">
|
||||
{(m.type === "BP_SYS" || m.type === "BP_DIA") && (
|
||||
<Badge
|
||||
variant="outline"
|
||||
className="mr-1.5 h-5 px-1 text-[10px]"
|
||||
>
|
||||
{m.type === "BP_SYS"
|
||||
? t("measurements.typeBpSys")
|
||||
: t("measurements.typeBpDia")}
|
||||
</Badge>
|
||||
)}
|
||||
<span className="font-semibold tabular-nums">
|
||||
{m.value} {m.unit}
|
||||
</span>
|
||||
|
||||
@@ -202,7 +202,9 @@ describe("settings sections — SSR smoke", () => {
|
||||
// - the editor mount-point is present
|
||||
// - no raw i18n key leaks
|
||||
const html = render(<ThresholdsSection />);
|
||||
expect(html).toContain("Personal targets");
|
||||
// F-07 (v1.4.19): page title aligned with the URL slug — was
|
||||
// "Personal targets", now "Personal thresholds".
|
||||
expect(html).toContain("Personal thresholds");
|
||||
expect(html).toContain('data-testid="thresholds-editor"');
|
||||
expect(html).not.toContain("settings.sections.thresholds.");
|
||||
});
|
||||
|
||||
@@ -112,14 +112,19 @@ export function TelegramCard({
|
||||
<h2 className="text-lg font-semibold">{t("settings.telegram")}</h2>
|
||||
</div>
|
||||
<div className="flex flex-wrap items-center gap-2">
|
||||
{settings?.hasBotToken && settings?.chatId && (
|
||||
{/* F-16 (v1.4.19): show one unified status pill instead of
|
||||
the previous "Configured" + "Enabled" pair, which had no
|
||||
visual hierarchy and made it unclear how the two states
|
||||
differed. The new pill collapses both bits of info:
|
||||
green when active, neutral when configured-but-paused. */}
|
||||
{settings?.hasBotToken && settings?.chatId && settings?.enabled && (
|
||||
<Badge className="border-dracula-green/30 bg-dracula-green/15 text-dracula-green">
|
||||
{t("settings.configured")}
|
||||
{t("common.active")}
|
||||
</Badge>
|
||||
)}
|
||||
{settings?.enabled && (
|
||||
{settings?.hasBotToken && settings?.chatId && !settings?.enabled && (
|
||||
<Badge variant="outline" className="text-xs">
|
||||
{t("common.enabled")}
|
||||
{t("settings.configured")} · {t("common.disabled")}
|
||||
</Badge>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user