diff --git a/src/components/insights/sub-page-shell.tsx b/src/components/insights/sub-page-shell.tsx index 1142b5a51..e12d34a60 100644 --- a/src/components/insights/sub-page-shell.tsx +++ b/src/components/insights/sub-page-shell.tsx @@ -143,37 +143,55 @@ export function SubPageShell({ return (
-
-

- {title} -

- {/* v1.8.6 — the diversity nudge now rides the heading as a - `Lightbulb` glyph (the node self-gates to nothing when the - spread is healthy), replacing the old inline block. */} - {diversityNudge} - {badge ? ( - - {badge} - - ) : null} + {/* v1.8.6 — the heading row pins the Coach icon top-right while the + title / nudge / badge wrap together on the left. + + Design M2 fix: the Coach icon is a `shrink-0` sibling of the + left group (not an `ml-auto` member of a single flex-wrap row), + so a long or wrapped title can never isolate it or crowd it on a + 375 px screen — it stays cleanly top-right and the title text + reflows in the space that remains. + + Design M1 fix: the row reserves a constant `min-h-10` so the + baseline holds whether or not the self-gating diversity-nudge + glyph (a 44 px-tall touch target) is present — category pages + with and without a nudge now align. `items-start` keeps the + Coach icon at the top of the row when the title wraps to two + lines. */} +
+
+

+ {title} +

+ {/* v1.8.6 — the diversity nudge rides the heading as a + `Lightbulb` glyph (the node self-gates to nothing when the + spread is healthy), replacing the old inline block. */} + {diversityNudge} + {badge ? ( + + {badge} + + ) : null} +
{/* v1.8.6 — Coach launch sits top-right at heading height as an - icon. `ml-auto` pushes it to the row's trailing edge so it - aligns with the title regardless of badge / glyph presence. - The button self-gates on the Coach flag + per-user opt-out. */} + icon, pinned by the row's `justify-between` so it aligns with + the title regardless of badge / glyph presence or a wrapped + title. The button self-gates on the Coach flag + per-user + opt-out. */} {coachLaunch ? ( - + ) : null}
{explainerMetric ? (