diff --git a/src/components/berths/berth-detail-header.tsx b/src/components/berths/berth-detail-header.tsx index 1c4500e..4ac0c7b 100644 --- a/src/components/berths/berth-detail-header.tsx +++ b/src/components/berths/berth-detail-header.tsx @@ -178,7 +178,10 @@ export function BerthDetailHeader({ berth }: BerthDetailHeaderProps) { return ( <> -
+ {/* Stacks vertically on phone widths so the action buttons don't + squeeze the area subtitle into a two-line wrap. From sm up the + title/area block sits side-by-side with the action buttons. */} +

@@ -193,7 +196,7 @@ export function BerthDetailHeader({ berth }: BerthDetailHeaderProps) { {berth.area &&

{berth.area}

}

-
+
- {/* Bottom / right: tag + actions. Hidden while the phone editor is active - to keep focus on the form — no chips fighting for space, no noise. */} + {/* Bottom / right: tag + actions. + Two layers of hiding compose here: + (a) phoneEditing — when the phone editor is open, hide the entire + action cluster (tag + star + trash) so the user can focus on + the form without chips fighting for space. + (b) contact.value — when the value is empty (stale import row, + aborted edit), hide just the tag + Make-primary star; + neither makes sense without a value. The trash icon stays + so the user can clean up the empty entry. + On touch (no hover), trash is always rendered; on desktop it + fades in on hover only (sm:opacity-0 + sm:group-hover:opacity-100). */} {!phoneEditing ? (
-
- { - await onUpdate({ label: v }); - }} - /> -
+ {contact.value ? ( + <> +
+ { + await onUpdate({ label: v }); + }} + /> +
- + + + ) : null}