From 45361c276c2bc5265c82f52ff8493543c10aa6e9 Mon Sep 17 00:00:00 2001 From: Maurice Date: Fri, 6 Nov 2026 16:34:44 +0100 Subject: [PATCH] feat(mobile): journey create and entry sheets in the common sheet style Both get the icon tile header (the entry keeps its move buttons between title and close), glass, the soft scroll edge and the sheets' 42 px footer buttons; the journey name is a round field, delete in the entry's footer a round icon button. The collection share sheet's invite button is round like the trip settings' one. --- client/scripts/theme-baseline.json | 4 +-- .../screens/collections/MCollShareSheet.tsx | 2 +- .../screens/journey/MJourneyCreateSheet.tsx | 36 ++++++++----------- .../screens/journey/MJourneyEntrySheet.tsx | 27 ++++++++------ 4 files changed, 34 insertions(+), 35 deletions(-) diff --git a/client/scripts/theme-baseline.json b/client/scripts/theme-baseline.json index f9fd547b0..a832a9ea6 100644 --- a/client/scripts/theme-baseline.json +++ b/client/scripts/theme-baseline.json @@ -187,9 +187,9 @@ "mobile/screens/dashboard/MNewTripSheet.tsx": 12, "mobile/screens/dashboard/MUserMenu.tsx": 7, "mobile/screens/journey/MJourney.tsx": 10, - "mobile/screens/journey/MJourneyCreateSheet.tsx": 10, + "mobile/screens/journey/MJourneyCreateSheet.tsx": 7, "mobile/screens/journey/MJourneyDetail.tsx": 6, - "mobile/screens/journey/MJourneyEntrySheet.tsx": 52, + "mobile/screens/journey/MJourneyEntrySheet.tsx": 48, "mobile/screens/journey/MJourneySettingsSheet.tsx": 2, "mobile/screens/journey/mobileJourneyMeta.ts": 4, "mobile/screens/notifications/MNotificationRow.tsx": 4, diff --git a/client/src/mobile/screens/collections/MCollShareSheet.tsx b/client/src/mobile/screens/collections/MCollShareSheet.tsx index ed526112d..248210f5c 100644 --- a/client/src/mobile/screens/collections/MCollShareSheet.tsx +++ b/client/src/mobile/screens/collections/MCollShareSheet.tsx @@ -141,7 +141,7 @@ export default function MCollShareSheet({ onClick={handleInvite} disabled={selectedUserId == null || inviting} aria-label={t('collections.share.sendInvite')} - className="flex w-11 flex-none items-center justify-center rounded-[12px] bg-m-act text-m-actfg disabled:opacity-40" + className="flex h-[42px] w-[42px] flex-none items-center justify-center self-center rounded-full bg-m-act text-m-actfg disabled:opacity-40" > {inviting ? : } diff --git a/client/src/mobile/screens/journey/MJourneyCreateSheet.tsx b/client/src/mobile/screens/journey/MJourneyCreateSheet.tsx index f2204d113..2de42cff8 100644 --- a/client/src/mobile/screens/journey/MJourneyCreateSheet.tsx +++ b/client/src/mobile/screens/journey/MJourneyCreateSheet.tsx @@ -1,6 +1,6 @@ -import { Feather, Calendar, MapPin, Check, X } from 'lucide-react' +import { Feather, Calendar, MapPin, Check, NotebookPen } from 'lucide-react' import MSheet from '../../components/MSheet' -import MIconBtn from '../../components/MIconBtn' +import { SHEET_PRIMARY, SHEET_SECONDARY, TileHeader } from '../trip/sheets/MTripSheetUi' import { useTranslation } from '../../../i18n' import { pickGradient } from '../../../pages/journeyDetail/JourneyDetailPage.helpers' @@ -38,24 +38,27 @@ export default function MJourneyCreateSheet({ const { t } = useTranslation() return ( - -
-
{t('journey.frontpage.createJourney')}
- - - + +
+ } + title={t('journey.frontpage.createJourney')} + onClose={onClose} + closeLabel={t('common.cancel')} + />
-
+
{t('journey.frontpage.journeyName')}
-
+
onTitleChange(e.target.value)} placeholder={t('journey.frontpage.namePlaceholder')} + aria-label={t('journey.frontpage.journeyName')} className="min-w-0 flex-1 bg-transparent text-[0.875rem] font-semibold text-m-ink outline-none placeholder:text-m-faint" />
@@ -120,19 +123,10 @@ export default function MJourneyCreateSheet({
- -
diff --git a/client/src/mobile/screens/journey/MJourneyEntrySheet.tsx b/client/src/mobile/screens/journey/MJourneyEntrySheet.tsx index 8c9b9e84d..f0b3b43ce 100644 --- a/client/src/mobile/screens/journey/MJourneyEntrySheet.tsx +++ b/client/src/mobile/screens/journey/MJourneyEntrySheet.tsx @@ -1,8 +1,9 @@ import { useRef, useState, type CSSProperties } from 'react' -import { Briefcase, Camera, Plus, Image, Images, X, MapPin, Locate, Trash2, CheckCircle2, MinusCircle, ChevronUp, ChevronDown, EyeOff, Play } from 'lucide-react' +import { Briefcase, Camera, Plus, Image, Images, X, MapPin, Locate, Trash2, CheckCircle2, MinusCircle, ChevronUp, ChevronDown, EyeOff, Play, NotebookPen } from 'lucide-react' import MSheet from '../../components/MSheet' import MIconBtn from '../../components/MIconBtn' import MToggle from '../../components/MToggle' +import { SHEET_PRIMARY, SHEET_SECONDARY } from '../trip/sheets/MTripSheetUi' import { useTranslation } from '../../../i18n' import CustomTimePicker from '../../../components/shared/CustomTimePicker' import { CustomDatePicker } from '../../../components/shared/CustomDateTimePicker' @@ -124,11 +125,15 @@ export default function MJourneyEntrySheet({ open onClose={handleClose} variant="card" - material="opaque" + material="glass" ariaLabel={entry.id === 0 ? t('journey.detail.newEntry') : t('journey.detail.editEntry')} > -
- + {/* TileHeader's shape, with the move buttons between the title and the close. */} +
+ + + + {entry.id === 0 ? t('journey.detail.newEntry') : t('journey.detail.editEntry')} {(onMoveEarlier || onMoveLater) && ( @@ -146,7 +151,7 @@ export default function MJourneyEntrySheet({
-
+
{/* Quick capture had no title field at all: it asked for a note and nothing else, so every entry caught on the move arrived nameless and the day's list read as a column of identical placeholders (discussion #2299). The @@ -713,17 +718,17 @@ export default function MJourneyEntrySheet({ )} {!readOnly && captureOnly && ( @@ -731,7 +736,7 @@ export default function MJourneyEntrySheet({ @@ -740,7 +745,7 @@ export default function MJourneyEntrySheet({ type="button" onClick={handleSave} disabled={saving} - className="rounded-full bg-m-act px-[18px] py-[9px] text-[0.78125rem] font-semibold text-m-actfg disabled:opacity-50" + className={SHEET_PRIMARY} > {saving ? t('common.saving') : t('common.save')}