mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-14 06:40:50 +00:00
fix(coach): dock the conversations panel flush against the right edge
The Coach page cancelled the shell's container padding with negative margins, so <main> kept its reserved scrollbar gutter and painted a dead strip to the right of the panel on classic-scrollbar platforms. The shell now renders /coach full bleed: no centred container, no padding and no reserved gutter, and the page fills what <main> leaves below the top bar. A refusal card (shared record, module off) keeps the padded frame. The panel header takes one 12 px inset with a gap of 8 between title and icons, a text-lg title, and 28 px icon buttons beside a pointer (44 px on touch). Conversation rows take the control radius and a 36 px pointer floor.
This commit is contained in:
1 parent
854cd31e18
commit
c49a04bac6
6 files changed
+97
-30
No files matched your search
@@ -263,22 +263,12 @@ export default function CoachPageClient() {
|
||||
<div
|
||||
data-slot="coach-page"
|
||||
data-tour-id="coach-hero"
|
||||
// v1.18.10 (W4) — full-bleed conversation surface. Cancel the
|
||||
// AuthShell container's padding (`-mt-6` top, `-mb-20` bottom,
|
||||
// `-mx-4 md:-mx-6` sides) so the chat is edge-to-edge and claims the
|
||||
// full viewport height minus the top bar (`4rem`). No inner card:
|
||||
// `<CoachConversation>` paints directly onto the page so it reads as
|
||||
// one continuous conversation, not a window inside a window. The
|
||||
// separate bottom-right FAB/overlay drawer stays the compact surface.
|
||||
//
|
||||
// v1.18.10 (W10) — height is mobile-aware. The fixed `<BottomNav>`
|
||||
// (64px + iOS home-indicator inset) is mobile-only; the desktop
|
||||
// full-bleed layout has no bottom nav. On mobile the page must subtract
|
||||
// the TopBar (`4rem`) AND the BottomNav band (`4rem` +
|
||||
// `env(safe-area-inset-bottom)`) so the docked composer / Stop control
|
||||
// always clears the nav instead of sitting under it. On `md+` the nav
|
||||
// is hidden, so the page reclaims the full height below the TopBar.
|
||||
className="bg-background -mx-4 -mt-6 -mb-20 flex h-[calc(100dvh-8rem-env(safe-area-inset-top,0px)-env(safe-area-inset-bottom,0px))] min-h-[32rem] flex-col overflow-hidden md:-mx-6 md:h-[calc(100dvh-4rem)]"
|
||||
// Full-bleed conversation surface. The shell renders `/coach` without
|
||||
// its centred container, padding or reserved scrollbar gutter, and its
|
||||
// `<main>` already clears the top bar and, on phones, the bottom nav,
|
||||
// so the page simply fills what is left. No inner card: the
|
||||
// conversation paints directly onto the page.
|
||||
className="bg-background flex min-h-[32rem] flex-1 flex-col overflow-hidden"
|
||||
>
|
||||
{/* `useSearchParams` requires a Suspense boundary so the client-search
|
||||
bailout never opts the whole route out of static optimisation. */}
|
||||
|
||||
Reference in new issue
Block a user