mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-14 22:50:51 +00:00
fix(labs): polish the biomarker-detail header and description
Resolve the catalog slug from both the current-locale display name and the English canonical name. A marker stores the catalog name as it read at creation time, so one minted under the English default and then viewed in another locale never matched a map built only from the current locale's names — its rich per-biomarker description silently fell back to the generic line. The English bundle is always in the client chunk, so adding its names makes the lookup independent of the locale the marker was created in. Tidy the header control cluster: - Drop the standalone "adjust target range" control and its sheet; the reference bounds are already editable inside the full marker editor behind the pencil. Remove the now-dead handler, mutation, and `targetRange.*` strings across all locales. - Give the show-all-values, edit, and delete controls one shared ghost-icon treatment instead of the show-all control's separate muted variant. - Add hover tooltips to edit and delete, matching the other icon controls. - Order the controls left → right: delete, edit, show all values, add value.
This commit is contained in:
1 parent
4266203d3a
commit
c6cbd5442f
9 files changed
+83
-189
No files matched your search
@@ -32,6 +32,7 @@ export function DeleteButton({
|
||||
description,
|
||||
cancelLabel,
|
||||
confirmLabel,
|
||||
triggerTitle,
|
||||
className = "",
|
||||
iconClassName = "h-3.5 w-3.5",
|
||||
}: {
|
||||
@@ -40,6 +41,8 @@ export function DeleteButton({
|
||||
description: string;
|
||||
cancelLabel?: string;
|
||||
confirmLabel?: string;
|
||||
/** Native hover tooltip on the trigger; defaults to the accessible name. */
|
||||
triggerTitle?: string;
|
||||
className?: string;
|
||||
iconClassName?: string;
|
||||
}) {
|
||||
@@ -52,6 +55,7 @@ export function DeleteButton({
|
||||
size="icon-lg"
|
||||
className={`text-destructive ${className}`}
|
||||
aria-label={confirmLabel ?? t("common.delete")}
|
||||
title={triggerTitle ?? confirmLabel ?? t("common.delete")}
|
||||
>
|
||||
<Trash2 className={iconClassName} />
|
||||
</Button>
|
||||
|
||||
Reference in new issue
Block a user