From cb41f081998c7c6fa3dc2447452b87edf9258eff Mon Sep 17 00:00:00 2001 From: Maurice Date: Sun, 8 Nov 2026 11:50:25 +0100 Subject: [PATCH] fix(mobile): the tour tab's rail heads are rounded bands like the cards under them --- .../Tours/planner/TourPlannerPanels.tsx | 22 ++++---- .../Tours/planner/railHead.test.tsx | 26 ++++++++++ .../src/components/Tours/planner/railHead.ts | 23 +++++++++ .../Tours/wanderer/WandererBrowserRail.tsx | 8 +-- .../screens/trip/tours/MTourWorkspace.tsx | 51 ++++++++++--------- 5 files changed, 92 insertions(+), 38 deletions(-) create mode 100644 client/src/components/Tours/planner/railHead.test.tsx create mode 100644 client/src/components/Tours/planner/railHead.ts diff --git a/client/src/components/Tours/planner/TourPlannerPanels.tsx b/client/src/components/Tours/planner/TourPlannerPanels.tsx index 7172785f5..cf03a7ce8 100644 --- a/client/src/components/Tours/planner/TourPlannerPanels.tsx +++ b/client/src/components/Tours/planner/TourPlannerPanels.tsx @@ -7,7 +7,8 @@ import { useSettingsStore } from '../../../store/settingsStore' import { useTourFerrataCrossingStore } from '../../../store/tourFerrataCrossingStore' import { formatDistance } from '../../../utils/units' import ConfirmDialog from '../../shared/ConfirmDialog' -import { NEUTRAL_TINT, fs } from '../../shared/DialogShell' +import { fs } from '../../shared/DialogShell' +import { useRailHeadProps } from './railHead' import EmptyState from '../../shared/EmptyState' import { useToast } from '../../shared/Toast' import { Tooltip } from '../../shared/Tooltip' @@ -74,9 +75,6 @@ import { SkiPlannerSummary } from '../ski/SkiRouteSummary' import { walkTimeFields } from '../walk/walkTimeFields' /** The tinted head band both rails open with, like every panel head in the planner. */ -export const RAIL_HEAD = 'flex flex-none items-start gap-2 border-b border-edge-faint px-3 py-2.5' -/** The head as a rounded band of its own, inset like the controls above it (the touch shell's tours tab). */ -const FLOATING_RAIL_HEAD = 'mx-4 mt-1 flex flex-none items-start gap-2 rounded-xl border border-edge-faint px-3 py-2' /** The title of a rail's head band, with an optional line under it. */ export function RailTitle({ title, sub, aside }: { title: string; sub?: ReactNode; aside?: ReactNode }) { @@ -138,10 +136,11 @@ function NeutralRail({ canEdit: boolean onOpenWanderer?: () => void }) { + const railHead = useRailHeadProps() const { t } = useTranslation() return (
-
+