diff --git a/client/scripts/theme-baseline.json b/client/scripts/theme-baseline.json index 680d82697..ceb3ecc84 100644 --- a/client/scripts/theme-baseline.json +++ b/client/scripts/theme-baseline.json @@ -19,7 +19,6 @@ "components/Collab/CollabNotesFilePreviewPortal.tsx": 2, "components/Collab/CollabPolls.tsx": 3, "components/Collections/CollectionHero.tsx": 1, - "components/Collections/MSaveToCollectionSheet.tsx": 12, "components/Collections/StatusBadge.tsx": 4, "components/Files/FileManagerAvatarChip.tsx": 1, "components/Files/FileManagerImageLightbox.tsx": 8, diff --git a/client/src/components/Collections/MSaveToCollectionSheet.tsx b/client/src/components/Collections/MSaveToCollectionSheet.tsx index bbf891d7e..32b532ece 100644 --- a/client/src/components/Collections/MSaveToCollectionSheet.tsx +++ b/client/src/components/Collections/MSaveToCollectionSheet.tsx @@ -1,6 +1,6 @@ -import { Bookmark, BookmarkCheck, Check, CheckCircle2, Loader2, Plus, X } from 'lucide-react' +import { Bookmark, BookmarkCheck, Check, CheckCircle2, Loader2, Plus } from 'lucide-react' import MSheet from '../../mobile/components/MSheet' -import MIconBtn from '../../mobile/components/MIconBtn' +import { FormSheetBody, FormSheetHeader, FormSheetSection } from '../../mobile/screens/trip/sheets/PlSheetChrome' import { useTranslation } from '../../i18n' import { STATUS_META, nextStatus } from '../../pages/collections/collectionsModel' import { VISITED_EVERYWHERE_BUSY, useSaveToCollection } from './useSaveToCollection' @@ -14,46 +14,35 @@ import { VISITED_EVERYWHERE_BUSY, useSaveToCollection } from './useSaveToCollect export default function MSaveToCollectionSheet() { const { target, close, lists, loading, busyId, savedByCollection, unvisited, handleStatus, handleVisitedEverywhere, handleToggle, openCollections } = useSaveToCollection() const { t } = useTranslation() + const title = t('collections.pickList') return ( - - {/* Header — mirrors the place detail sheet: icon + title + target name + close */} -
-
- - - -
-
{t('collections.pickList')}
- {target?.name && ( -
{target.name}
- )} -
- - - -
-
+ + {target?.name}} + onClose={close} + closeLabel={t('common.close')} + /> -
+ {loading ? (
) : lists.length === 0 ? ( -
- - - -

{t('collections.noListsYet')}

+ +

{t('collections.noListsYet')}

-
+ ) : ( lists.map(list => { const entry = savedByCollection.get(list.id) @@ -67,20 +56,21 @@ export default function MSaveToCollectionSheet() { type="button" onClick={() => handleToggle(list)} disabled={busyId != null} - className={`mt-2 flex w-full items-center gap-[11px] rounded-[14px] border px-3 py-[10px] text-start disabled:opacity-60 ${ + aria-pressed={saved} + className={`flex min-h-12 w-full items-center gap-2.5 rounded-[14px] border px-3 py-2 text-start disabled:opacity-60 ${ saved - ? 'border-[color:var(--m-act)] bg-[color:var(--m-inner)]' - : 'border-[color:var(--m-rowbr)] bg-[color:var(--m-ic)]' + ? 'border-m-rowbr bg-m-sheetop' + : 'border-transparent bg-m-ic' }`} > - + - {list.name} + {list.name} {/* Saved lists show their own status here instead of the place count — that number matters when picking a list, the status matters once the place is in it (#1469). */} @@ -91,26 +81,26 @@ export default function MSaveToCollectionSheet() { aria-label={t(statusMeta.labelKey)} onClick={entry.can_edit ? e => { e.preventDefault(); e.stopPropagation(); void handleStatus(entry, nextStatus(entry.status)) } : undefined} onKeyDown={entry.can_edit ? e => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); e.stopPropagation(); void handleStatus(entry, nextStatus(entry.status)) } } : undefined} - className="mt-[3px] inline-flex items-center gap-1 rounded-full bg-[color:var(--m-inner)] px-2 py-[3px] font-geist text-[0.65625rem] font-semibold" + className="mt-0.5 inline-flex items-center gap-1 rounded-lg bg-m-ic px-2 py-0.5 text-caption font-medium" style={{ color: statusMeta.color }} > {t(statusMeta.labelKey)} ) : ( - + {t('collections.placeCount', { count: list.place_count ?? 0 })} )} {list.is_owner === false && ( - + {t('collections.shared')} )} {busy ? : saved ? : } @@ -119,15 +109,15 @@ export default function MSaveToCollectionSheet() { ) }) )} -
+ {unvisited.length > 0 && ( -
+
diff --git a/client/src/mobile/components/MBottomNav.tsx b/client/src/mobile/components/MBottomNav.tsx index e00495a50..ba2e4ea4e 100644 --- a/client/src/mobile/components/MBottomNav.tsx +++ b/client/src/mobile/components/MBottomNav.tsx @@ -13,7 +13,7 @@ import MMenuRow from './MMenuRow' import MSheet from './MSheet' /** - * Labelled destination dock with a persistent slot for the screen's primary action. + * Floating icon dock with a persistent slot for the screen's primary action. */ export default function MBottomNav() { const { t } = useTranslation() @@ -81,10 +81,10 @@ export default function MBottomNav() { onClick={() => open(item)} aria-label={label} aria-current={active ? 'page' : undefined} + title={shortLabel} className="m-dock-item" > - - {shortLabel} + ) } @@ -109,7 +109,7 @@ export default function MBottomNav() { )} {!overMap && } -
diff --git a/client/src/mobile/mobile.css b/client/src/mobile/mobile.css index 2117ed2ee..0361de107 100644 --- a/client/src/mobile/mobile.css +++ b/client/src/mobile/mobile.css @@ -457,14 +457,12 @@ html[dir='rtl']:has(.m-shell[data-size='wide'], .m-shell[data-size='split']) .m- .m-dock-item { display: grid; - justify-items: center; - align-content: center; - gap: 2px; - flex: 1; - min-width: 44px; - min-height: 54px; + place-items: center; + flex: none; + width: 42px; + height: 42px; color: var(--m-muted); - border-radius: 14px; + border-radius: 50%; } .m-root .m-dock-item:focus-visible { @@ -477,13 +475,6 @@ html[dir='rtl']:has(.m-shell[data-size='wide'], .m-shell[data-size='split']) .m- background: var(--m-ic); } -.m-dock-symbol { - display: grid; - place-items: center; - width: 36px; - height: 26px; -} - .m-dock-item[aria-current='page'] { background: var(--m-act); color: var(--m-actfg); @@ -493,15 +484,14 @@ html[dir='rtl']:has(.m-shell[data-size='wide'], .m-shell[data-size='split']) .m- outline-color: var(--m-actfg); } -.m-dock-label { - min-width: 0; - max-width: 100%; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - font-size: calc(10px * var(--fs-scale-caption, 1)); - font-weight: 600; - line-height: 1.2; +.m-dock-more[aria-current='page'] { + background: var(--m-ic); + color: var(--m-ink); + box-shadow: inset 0 0 0 1.5px var(--m-act); +} + +.m-root .m-dock-more[aria-current='page']:focus-visible { + outline-color: var(--m-act); } .m-dock-vt { diff --git a/client/src/mobile/screens/collections/MPlaceSheetShell.tsx b/client/src/mobile/screens/collections/MPlaceSheetShell.tsx index 83e9eba26..8872ffa6e 100644 --- a/client/src/mobile/screens/collections/MPlaceSheetShell.tsx +++ b/client/src/mobile/screens/collections/MPlaceSheetShell.tsx @@ -19,8 +19,8 @@ export const SHEET_ACTION = /** * The frame of the one place view on the phone, the same from All places and from - * a list: photo, name and location in the header, then the scrolling body - * with its category and the footer actions. + * a list: category icon, name and location in the header, followed by the + * scrolling body and the footer actions. */ export default function MPlaceSheetShell({ open, @@ -97,13 +97,21 @@ export default function MPlaceSheetShell({ name && (address?.trim() || (lat != null && lng != null ? coordsText(lat, lng) : t('places.noCoordinates'))); const coverLabel = t('collections.coverImage'); const placeName = name && ( - { - titleRef.current = node; - }} - > - {name} - + <> + {category && + createElement(meta.icon, { + className: 'me-1.5 inline-block size-4 align-[-0.1em]', + role: 'img', + 'aria-label': category.name, + })} + { + titleRef.current = node; + }} + > + {name} + + ); const closeLabel = t('common.close'); const renderPlaceHeader = () => ( @@ -141,7 +149,7 @@ export default function MPlaceSheetShell({ ) : ( {renderPlaceHeader()} - - {category && ( - - {createElement(meta.icon, { size: 13, className: 'flex-none', 'aria-hidden': true })} - {category.name} - - )} - {children} - + {children} {footer && (
{footer}
)} diff --git a/client/src/mobile/screens/collections/MPlaceSheetTabs.tsx b/client/src/mobile/screens/collections/MPlaceSheetTabs.tsx index 58ffb655c..87936209f 100644 --- a/client/src/mobile/screens/collections/MPlaceSheetTabs.tsx +++ b/client/src/mobile/screens/collections/MPlaceSheetTabs.tsx @@ -55,7 +55,11 @@ export default function MPlaceSheetTabs({ } > {t(PLACE_TAB_LABEL[key])} - {sheet.counts[key] > 0 && {sheet.counts[key]}} + {sheet.counts[key] > 0 && ( + + {sheet.counts[key]} + + )} ); })} diff --git a/client/src/mobile/screens/collections/MPlacesLibrary.tsx b/client/src/mobile/screens/collections/MPlacesLibrary.tsx index f56bd67bf..1d9a74bdc 100644 --- a/client/src/mobile/screens/collections/MPlacesLibrary.tsx +++ b/client/src/mobile/screens/collections/MPlacesLibrary.tsx @@ -144,11 +144,11 @@ function Row({ entry, onOpen, t }: { entry: PlacesLibraryEntry; onOpen: () => vo )} {first && ( - + {first.kind === 'trip' ? ( - + ) : ( - + )} {originName(first)} diff --git a/client/src/mobile/screens/trip/MTripShell.tsx b/client/src/mobile/screens/trip/MTripShell.tsx index 1294a4e81..f3da92d89 100644 --- a/client/src/mobile/screens/trip/MTripShell.tsx +++ b/client/src/mobile/screens/trip/MTripShell.tsx @@ -882,7 +882,7 @@ export default function MTripShell({ {/* ── Bottom dock (replaces the global bottom nav on this screen) ── */} {/* A tab's list fades out under the dock rather than showing in the gap below it; a map runs to the edge. */} {!wide && !MAP_TABS.has(trTab) && } - {!wide &&