feat(planner): bring the plan tab and every trip dialog into the new look

The Plan tab was the last trip tab still in the old design. It now reads
like Bookings, Costs, Lists, Files and Collab, without losing a function:

- Day plan: each day is a card with a head band (day tile with weather,
  stay and rental pills, a "+" menu for place, stay, transport, transit
  and note), rows with "..." menus, white badges and a white route bar.
- Places column: add, search and filters in three rows, a show dropdown,
  category and rating filters, and a selection bar at the foot.
- Place inspector, day details and the stay editor on the shared dialog
  frame; the place form in the editor look with the name in the head band.
- Clicking a booking or transport anywhere on the plan opens the booking
  detail popup first; Edit leads to the editor. The popup is one host
  shared with the Bookings and Transports tabs.
- Files and Collab dialogs, notes, polls, links and chat moved to the same
  frame; shared DialogShell and dialogParts hold the building blocks.
- The map hover card shows the place photo and follows the theme.

Every new and reworded string is translated into all locales, and a few
older English leftovers (help center, cost split, import hints) with them.
Phone screens keep their own look.
This commit is contained in:
Maurice
2026-09-27 21:00:19 +02:00
parent acd0d6511e
commit 0dd07befa7
314 changed files with 17106 additions and 10400 deletions
@@ -1,4 +1,4 @@
// FE-PLANNER-FILEIMP-001 to FE-PLANNER-FILEIMP-018
// FE-PLANNER-FILEIMP-001 to FE-PLANNER-FILEIMP-021
import { render, screen, fireEvent, waitFor } from '../../../tests/helpers/render';
import { http, HttpResponse } from 'msw';
import { server } from '../../../tests/helpers/msw/server';
@@ -237,10 +237,38 @@ describe('FileImportModal', () => {
fireEvent.click(screen.getByRole('button', { name: 'Cancel' }));
expect(onClose).toHaveBeenCalledTimes(1);
fireEvent.click(document.querySelector('[style*="z-index: 99999"]') as HTMLElement);
// The backdrop is the dialog's parent; a press that starts and ends on it closes.
const backdrop = screen.getByRole('dialog').parentElement as HTMLElement;
fireEvent.mouseDown(backdrop);
fireEvent.click(backdrop);
expect(onClose).toHaveBeenCalledTimes(2);
// A click inside the card is swallowed.
fireEvent.mouseDown(screen.getByText('Import file'));
fireEvent.click(screen.getByText('Import file'));
expect(onClose).toHaveBeenCalledTimes(2);
});
it('FE-PLANNER-FILEIMP-020: Escape and the head band X close it as well', () => {
const onClose = vi.fn();
render(<FileImportModal {...defaultProps} onClose={onClose} />);
expect(screen.getByRole('dialog', { name: 'Import file' })).toBeInTheDocument();
fireEvent.keyDown(document, { key: 'Escape' });
expect(onClose).toHaveBeenCalledTimes(1);
fireEvent.click(screen.getByRole('button', { name: 'Close' }));
expect(onClose).toHaveBeenCalledTimes(2);
});
it('FE-PLANNER-FILEIMP-021: re-ticking a type lifts the block again', () => {
render(<FileImportModal {...defaultProps} initialFile={kml()} />);
const points = screen.getByRole('checkbox', { name: 'Points (Placemarks)' });
const paths = screen.getByRole('checkbox', { name: 'Paths (LineStrings)' });
expect(points).toHaveAttribute('aria-checked', 'true');
fireEvent.click(points);
fireEvent.click(paths);
expect(points).toHaveAttribute('aria-checked', 'false');
expect(importBtn()).toBeDisabled();
fireEvent.click(paths);
expect(screen.queryByText('Select at least one type to import.')).not.toBeInTheDocument();
expect(importBtn()).toBeEnabled();
});
});