From ed178f3b5e83d39d7e3934c4556e978be365ed57 Mon Sep 17 00:00:00 2001 From: Maurice Date: Fri, 6 Nov 2026 20:52:07 +0100 Subject: [PATCH] fix(journey): the shared journey map reaches the screen edge, and desktop readers get the day picker - On a phone the shared journey's map stopped at the safe area, so Safari's toolbar sat over a bare strip; it now runs to the edge (#3002) - The shared journey on desktop gains the journal's day picker, every day and its entries one click away (#2998) --- .../components/Journey/MobileMapTimeline.tsx | 10 +++++---- client/src/pages/JourneyPublicPage.tsx | 21 +++++++++++++++++-- .../pages/journeyPublic/useJourneyPublic.ts | 4 +++- 3 files changed, 28 insertions(+), 7 deletions(-) diff --git a/client/src/components/Journey/MobileMapTimeline.tsx b/client/src/components/Journey/MobileMapTimeline.tsx index 6a0ca4c44..b675a2053 100644 --- a/client/src/components/Journey/MobileMapTimeline.tsx +++ b/client/src/components/Journey/MobileMapTimeline.tsx @@ -108,8 +108,8 @@ export default function MobileMapTimeline({ if (entries.length === 0) { return (
{/* Full-screen map */} +
{/* Day header */}
{/* Left: feed */} -
+
{view === 'timeline' && perms.share_timeline && renderTimeline()} {view === 'gallery' && perms.share_gallery && renderGallery()} + {/* Every day and its entries one click away, as in the journal itself (#2998). */} + {view === 'timeline' && perms.share_timeline && sortedDates.length > 1 && ( +
+
+ ({ + date, + color: DAY_COLORS[i % DAY_COLORS.length], + entries: (groupedEntries.get(date) ?? []).map(e => ({ id: e.id, title: e.title || e.location_name || t('journey.detail.newEntry') })), + }))} + /> +
+
+ )}
{/* Right: sticky map — matches auth page aside proportions */} diff --git a/client/src/pages/journeyPublic/useJourneyPublic.ts b/client/src/pages/journeyPublic/useJourneyPublic.ts index 24241a0d9..8bcfc799f 100644 --- a/client/src/pages/journeyPublic/useJourneyPublic.ts +++ b/client/src/pages/journeyPublic/useJourneyPublic.ts @@ -32,6 +32,8 @@ export function useJourneyPublic() { const [showLangPicker, setShowLangPicker] = useState(false) const locale = useSettingsStore(s => s.settings.language) || 'en' const mapRef = useRef(null) + // The desktop feed, for the day picker to scroll (#2998). + const feedRef = useRef(null) const [activeEntryId, setActiveEntryId] = useState(null) const [viewingEntry, setViewingEntry] = useState(null) @@ -170,7 +172,7 @@ export function useJourneyPublic() { return { token, data, loading, error, isMobile, locale, view, setView, lightbox, setLightbox, showLangPicker, setShowLangPicker, - mapRef, activeEntryId, setActiveEntryId, viewingEntry, setViewingEntry, handleMarkerClick, + mapRef, feedRef, activeEntryId, setActiveEntryId, viewingEntry, setViewingEntry, handleMarkerClick, perms, journey, stats, timelineEntries, groupedEntries, sortedDates, displayDates, sidebarMapItems, allPhotos, stopNumberById, mapPhotos, mapLayers, entryTitleOf,