From b868a72a910c4490c9ebc47d30612b2035394b72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Mon, 1 Jun 2026 23:38:54 +0200 Subject: [PATCH] fix(targets): merge the profile-incomplete hint into the deprecation banner The deprecation notice and the profile-incomplete hint rendered as two near-identical warning cards stacked on top of each other, so an incomplete-profile user saw two warning banners. Fold the profile detail into the single deprecation card as a secondary line beneath the headline message, shown only when height or age is missing. The page now carries one warning banner. --- src/app/targets/page.tsx | 62 +++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/src/app/targets/page.tsx b/src/app/targets/page.tsx index e09739f5c..20f8a80c2 100644 --- a/src/app/targets/page.tsx +++ b/src/app/targets/page.tsx @@ -216,44 +216,46 @@ export default function TargetsPage() {

{t("targets.introText")}

- {/* v1.8.6 — deprecation banner. Target editing moved inline into + {/* v1.8.6 — single warning banner. Target editing moved inline into the Insights category pages; this page stays reachable but will - be removed in a future release. */} + be removed in a future release. + + Design Low fix: the deprecation notice and the profile-incomplete + hint used to stack as two near-identical warning cards. They are + folded into one card now — the deprecation message stays the + headline, and the profile-incomplete detail (height / age missing) + renders as a secondary line beneath it only when relevant, so the + page never shows two warning banners. */} -
-

- {t("targets.deprecation.title")} -

-

- {t("targets.deprecation.body")} -

+
+
+

+ {t("targets.deprecation.title")} +

+

+ {t("targets.deprecation.body")} +

+
+ {profileIncomplete && ( +
+

+ {t("targets.profileIncomplete")} +

+

+ {!data.profile.heightCm && !data.profile.age + ? t("targets.profileIncompleteHeightAge") + : !data.profile.heightCm + ? t("targets.profileIncompleteHeight") + : t("targets.profileIncompleteAge")} +

+
+ )}
- {/* Profile incomplete hint */} - {profileIncomplete && ( - - - -
-

- {t("targets.profileIncomplete")} -

-

- {!data.profile.heightCm && !data.profile.age - ? t("targets.profileIncompleteHeightAge") - : !data.profile.heightCm - ? t("targets.profileIncompleteHeight") - : t("targets.profileIncompleteAge")} -

-
-
-
- )} - {/* v1.4.25 W3e — page-level summary line. Renders nothing when the API hasn't shipped pageSummary yet (older clients during rollout / mocked test fixtures that pre-date this addition). */}