Skip to content

PDF export: choose what the itinerary shows - #49

Merged
Torgh merged 1 commit into
mainfrom
print-options
Nov 1, 2026
Merged

Torgh merged 1 commit into
mainfrom
print-options

Conversation

@Torgh

@Torgh Torgh commented Nov 1, 2026

Copy link
Copy Markdown
Owner

What

The printable itinerary (Export → PDF) gets a bar, "What the PDF shows:", above the document. The bar itself is hidden when printing.

  • Two sets: 📄 Full (for me), which has everything, and 👥 To share, which has no prices, booking numbers or personal notes, e.g. for travel companions.
  • Ten switches: map, overview, bookings table, prices, booking numbers, travel between stops, warnings, notes, addresses, ideas.
    • Prices off hides the price column, the budget total and prices in the day-by-day cards.
    • Booking numbers off does the same for the reference column and "ref …" in the cards.
    • Ideas is a new section with the unscheduled cards.
  • The choice is remembered per browser. The default is everything but Ideas, i.e. the PDF looks as it did before.
  • The booking status ("Waiting for confirmation" / "To book") moves next to the booking's name, so it stays visible when booking numbers are hidden.

How

  • lib/printOptions.ts: the parts, defaults, presets and parsing of the saved choice (pure, tested).
  • lib/usePrintOptions.ts: usePrintOptions() / setPrintOptions() over localStorage, like the theme and language stores.
  • components/TripPrint.tsx: sections and details follow the options. The texts are translated into English, Polish and Spanish.

Tests

  • New lib/printOptions.test.ts: defaults, saved and broken values, the presets, recognising the active preset.
  • bun run check passes: typecheck, lint, 338 tests with coverage thresholds, web and mobile builds.
  • Checked in a browser on an isolated dev server: the print page in Polish with the "To share" set.

🤖 Generated with Claude Code

A bar above the printable itinerary (left out of the PDF) switches parts
on and off: map, overview, bookings table, prices, booking numbers,
travel between stops, warnings, notes, addresses and a new Ideas section.
Two sets in one click: "Full" (everything) and "To share" (no prices,
booking numbers or notes). The choice is remembered per browser; the
default prints what it printed before.

The booking status moves next to the booking's name, so it stays when
booking numbers are hidden.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Torgh
Torgh merged commit 555e76f into main Nov 1, 2026
7 checks passed
@Torgh
Torgh deleted the print-options branch November 1, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant