The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.
TypeScript budget-trackercollaborativedockeritinerarymcp-serveroffline-firstopen-sourceopenstreetmappacking-listpwareal-timeself-hostedselfhostedtraveltravel-apptravel-journaltravel-plannertripitwanderlog
fix(mobile): keep the photo viewers clear of a side notch in right to left languages
Maurice5c5c468489bf
diff --git a/client/src/components/Journey/PhotoLightbox.test.tsx b/client/src/components/Journey/PhotoLightbox.test.tsxindex 1675afa97..a505c9eb9 100644--- a/client/src/components/Journey/PhotoLightbox.test.tsx+++ b/client/src/components/Journey/PhotoLightbox.test.tsx@@ -1,4 +1,4 @@-// FE-COMP-LIGHTBOX-001 to FE-COMP-LIGHTBOX-029+// FE-COMP-LIGHTBOX-001 to FE-COMP-LIGHTBOX-030// Plyr needs a real media pipeline, so the player is stubbed here.vi.mock('./VideoPlayer', () => ({@@ -305,6 +305,13 @@ describe('PhotoLightbox', () => {fireEvent.touchEnd(surface, { changedTouches: [{ clientX: 100, clientY: 210 }] });expect(screen.getByText('2 / 3')).toBeInTheDocument();});++ it('FE-COMP-LIGHTBOX-030: the left inset of the screen stays on the left, where the close button now sits', () => {+ render(<PhotoLightbox photos={samplePhotos} onClose={vi.fn()} />);+ const style = screen.getByRole('dialog').style;+ expect(style.paddingInlineEnd).toContain('safe-area-inset-left');+ expect(style.paddingInlineStart).toContain('safe-area-inset-right');+ });});it('FE-COMP-LIGHTBOX-027: a caption with a source page links to it in a new tab, one without stays text', () => {diff --git a/client/src/components/Journey/PhotoLightbox.tsx b/client/src/components/Journey/PhotoLightbox.tsxindex 3fc05269d..383c76990 100644--- a/client/src/components/Journey/PhotoLightbox.tsx+++ b/client/src/components/Journey/PhotoLightbox.tsx@@ -144,8 +144,9 @@ export default function PhotoLightbox({ photos, startIndex = 0, onClose, label }background: 'rgba(0,0,0,0.92)', backdropFilter: 'blur(20px)',display: 'flex', flexDirection: 'column',paddingBottom: SAFE('bottom'),- paddingInlineStart: SAFE('left'),- paddingInlineEnd: SAFE('right'),+ // The insets belong to the screen's sides, which right to left swaps.+ paddingInlineStart: SAFE(rtl ? 'right' : 'left'),+ paddingInlineEnd: SAFE(rtl ? 'left' : 'right'),}}onTouchStart={onTouchStart}onTouchMove={onTouchMove}diff --git a/client/src/mobile/screens/trip/tabs/MFileLightbox.tsx b/client/src/mobile/screens/trip/tabs/MFileLightbox.tsxindex c8b501017..a45ad7251 100644--- a/client/src/mobile/screens/trip/tabs/MFileLightbox.tsx+++ b/client/src/mobile/screens/trip/tabs/MFileLightbox.tsx@@ -52,10 +52,11 @@ export default function MFileLightbox({ files, index, onIndexChange, onClose, t>{/* Header */}{/* Below the status bar and a notch, and clear of a side inset in landscape,- so the close button is always there to tap. */}+ so the close button is always there to tap. The insets are the screen's+ sides, so right to left takes them the other way round. */}<divrole="presentation"- className="flex flex-none items-center justify-between gap-2 pb-[10px] pe-[calc(var(--m-safe-r)+12px)] ps-[calc(var(--m-safe-l)+16px)] pt-[calc(var(--m-safe-t)+10px)]"+ className="flex flex-none items-center justify-between gap-2 pb-[10px] pe-[calc(var(--m-safe-r)+12px)] ps-[calc(var(--m-safe-l)+16px)] pt-[calc(var(--m-safe-t)+10px)] rtl:pe-[calc(var(--m-safe-l)+12px)] rtl:ps-[calc(var(--m-safe-r)+16px)]"onClick={e => e.stopPropagation()}><span className="min-w-0 flex-1 truncate font-geist text-[0.75rem] text-white/70">diff --git a/client/tests/unit/mobile/trip/MFileLightbox.test.tsx b/client/tests/unit/mobile/trip/MFileLightbox.test.tsxindex 654c0ba50..9aa76fa2a 100644--- a/client/tests/unit/mobile/trip/MFileLightbox.test.tsx+++ b/client/tests/unit/mobile/trip/MFileLightbox.test.tsx@@ -5,7 +5,7 @@ import { downloadFile, openFile } from '../../../../src/utils/fileDownload'import type { TranslationFn, TripFile } from '../../../../src/types'import { fireEvent, render, screen, waitFor } from '../../../helpers/render'-// FE-MOB-FLBOX-001 to FE-MOB-FLBOX-017+// FE-MOB-FLBOX-001 to FE-MOB-FLBOX-018vi.mock('../../../../src/api/authUrl', () => ({getAuthUrl: vi.fn(async (url: string) => `${url}?token=t1`),@@ -230,4 +230,11 @@ describe('MFileLightbox', () => {expect(screen.getByAltText('castle.png')).toHaveAttribute('src', '/api/trips/1/files/2/download?token=t1'),)})++ it('FE-MOB-FLBOX-018: right to left, the header keeps each side inset on its own screen side', () => {+ renderBox(0)+ const header = screen.getByText('beach.jpg').closest('[role="presentation"]') as HTMLElement+ expect(header.className).toContain('rtl:ps-[calc(var(--m-safe-r)+16px)]')+ expect(header.className).toContain('rtl:pe-[calc(var(--m-safe-l)+12px)]')+ })})