diff --git a/client/src/mobile/screens/trip/sheets/MPlaceSheet.test.tsx b/client/src/mobile/screens/trip/sheets/MPlaceSheet.test.tsx index c758ad2f9..892d2e293 100644 --- a/client/src/mobile/screens/trip/sheets/MPlaceSheet.test.tsx +++ b/client/src/mobile/screens/trip/sheets/MPlaceSheet.test.tsx @@ -122,3 +122,15 @@ describe('MPlaceSheet ask the assistant', () => { expect(chatOf(useAssistantStore.getState(), 5).focus).toEqual({ placeIds: [42] }) }) }) + +describe('MPlaceSheet header (#3140)', () => { + it('lets a long place name wrap instead of cutting it to one line', () => { + const longName = 'Broad Street Christmas Lights & Market' + render() + + const title = screen.getByText(longName) + expect(title).not.toHaveClass('truncate') + expect(title).toHaveClass('break-words') + expect(screen.getByText('Broad Street, RG1 2AF, Reading').closest('div')).not.toHaveClass('truncate') + }) +}) diff --git a/client/src/mobile/screens/trip/sheets/MPlaceSheet.tsx b/client/src/mobile/screens/trip/sheets/MPlaceSheet.tsx index 4f7036a84..0b4e5eafc 100644 --- a/client/src/mobile/screens/trip/sheets/MPlaceSheet.tsx +++ b/client/src/mobile/screens/trip/sheets/MPlaceSheet.tsx @@ -208,12 +208,14 @@ export default function MPlaceSheet({ planner, shell }: MTripSheetsProps) {
-
- {place.name} +
+ {/* The sheet is where a place is read in full, so its name wraps + onto as many lines as it needs, as on the desktop (#3140). */} + {place.name} {/* Accepted out of the traveller's own recordings — the same mark the desktop inspector carries. */} {place.source === 'dawarich' && ( - + )}