From 821f23aed479a425c63962ddb0bbf8a023b6c1e9 Mon Sep 17 00:00:00 2001 From: Maurice Date: Fri, 6 Nov 2026 15:44:07 +0100 Subject: [PATCH] fix(mobile): compact place details, softer sheet edges, icon buttons for copy and share Add place on the phone: the place details showed the mascot half a screen high while nothing was picked or nothing was found, and pushed the name field below the fold. Both states are now one quiet line, as in the desktop dialog, and the details sit in a card in the mobile tokens. Sheets with a header over a scroll box (trip settings, day, export, transport, files and more) cut their content off in a hard line right under the header icon. The scroll box now keeps a little room under the header and fades its content out at the edges. Copy and share next to a share or invite link are round icon buttons of the same size; the share button showed no icon because the copy button's padding left it no room. --- client/scripts/theme-baseline.json | 2 +- .../Planner/PlaceDetailsColumn.test.tsx | 5 +- .../components/Planner/PlaceDetailsColumn.tsx | 52 ++++++++----------- client/src/mobile/mobile.css | 7 +++ .../screens/journey/MJourneySettingsSheet.tsx | 11 ++-- .../screens/trip/roadtrip/MRtInfoSheet.tsx | 2 +- .../mobile/screens/trip/sheets/MDaySheet.tsx | 2 +- .../mobile/screens/trip/sheets/MDaysSheet.tsx | 2 +- .../screens/trip/sheets/MExportSheet.tsx | 2 +- .../screens/trip/sheets/MTransportSheet.tsx | 2 +- .../trip/sheets/MTripSettingsSheet.tsx | 14 ++--- .../screens/trip/tabs/MDocSyncSheet.tsx | 2 +- .../screens/trip/tabs/MFileLinkSheet.tsx | 2 +- .../screens/trip/tabs/MFileMenuSheet.tsx | 2 +- 14 files changed, 55 insertions(+), 52 deletions(-) diff --git a/client/scripts/theme-baseline.json b/client/scripts/theme-baseline.json index 198f830c4..3a2cbb297 100644 --- a/client/scripts/theme-baseline.json +++ b/client/scripts/theme-baseline.json @@ -190,7 +190,7 @@ "mobile/screens/journey/MJourneyCreateSheet.tsx": 10, "mobile/screens/journey/MJourneyDetail.tsx": 6, "mobile/screens/journey/MJourneyEntrySheet.tsx": 52, - "mobile/screens/journey/MJourneySettingsSheet.tsx": 32, + "mobile/screens/journey/MJourneySettingsSheet.tsx": 31, "mobile/screens/journey/mobileJourneyMeta.ts": 4, "mobile/screens/notifications/MNotificationRow.tsx": 4, "mobile/screens/notifications/MNotifications.tsx": 3, diff --git a/client/src/components/Planner/PlaceDetailsColumn.test.tsx b/client/src/components/Planner/PlaceDetailsColumn.test.tsx index 7e67d7ffb..7d17de1d4 100644 --- a/client/src/components/Planner/PlaceDetailsColumn.test.tsx +++ b/client/src/components/Planner/PlaceDetailsColumn.test.tsx @@ -475,9 +475,8 @@ describe('PlaceDetailsColumn — hours and rating', () => { * FE-PDC-027 — nothing came back for this place. * * It used to be a line of grey text plus, when no Google key was set, a panel - * telling the reader to go and ask an administrator for one. The mascot says the - * same thing in the shape every other empty state in TREK uses, and whose key is - * missing is not this panel's business. + * telling the reader to go and ask an administrator for one. One quiet line says + * that nothing came back, and whose key is missing is not this panel's business. */ describe('PlaceDetailsColumn — nothing found', () => { it('FE-PDC-027: shows the empty state once, and no advice about API keys', async () => { diff --git a/client/src/components/Planner/PlaceDetailsColumn.tsx b/client/src/components/Planner/PlaceDetailsColumn.tsx index a392afee4..12697d91b 100644 --- a/client/src/components/Planner/PlaceDetailsColumn.tsx +++ b/client/src/components/Planner/PlaceDetailsColumn.tsx @@ -26,7 +26,6 @@ import { mapsApi } from '../../api/client' import { resolveOpenNow, resolvePlaceTimeZone, placeWeekdayIndex } from './placeOpenState' import { convertHoursLine, isUnknownHoursLine, splitHoursLine } from './placeHoursFormat' import { safeHttpUrl } from '../../utils/safeUrl' -import EmptyState from '../shared/EmptyState' import { Tooltip } from '../shared/Tooltip' import { fs } from '../shared/DialogShell' import { LABEL } from '../shared/dialogParts' @@ -66,8 +65,8 @@ interface PlaceDetailsColumnProps { fluid?: boolean /** * 'dialog' is the desktop add place dialog: a grey panel of white cards under - * small eyebrows, and a quiet hint card where the sheet shows the mascot. The - * default is the phone sheet's look, which this prop leaves exactly as it was. + * small eyebrows. The default is the phone sheet's look: a card in the mobile + * tokens with the same one-line hints. */ variant?: 'sheet' | 'dialog' /** False on an instance with no Google key, which is most of them. */ @@ -76,6 +75,16 @@ interface PlaceDetailsColumnProps { type LoadState = 'idle' | 'loading' | 'ready' | 'error' +/** The phone sheet's quiet one-line state: an icon and a sentence, no mascot taking half the screen. */ +function SheetHint({ icon, children }: { icon: React.ReactNode; children: React.ReactNode }) { + return ( +

+ {icon} + {children} +

+ ) +} + /** * Overline label, the section heading Vacay and the dashboard widgets share. * Uppercase with wide tracking, muted, no rule underneath. @@ -225,17 +234,17 @@ export default function PlaceDetailsColumn({ // tiles, which is too small to tell a facade from a foyer. The column is // stretched to the form's height by the row it sits in, so the extra room // costs nothing that was being used. -