Skip to content

feat: add trip summary panel#745

Open
strandlie wants to merge 4 commits into
mainfrom
strandlie/trip-detail-summary
Open

feat: add trip summary panel#745
strandlie wants to merge 4 commits into
mainfrom
strandlie/trip-detail-summary

Conversation

@strandlie

@strandlie strandlie commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Next step of https://github.com/AtB-AS/kundevendt/issues/23752

Figma

Improvements to the trip-detail view, to make TPW ready for the new Trip Card

Screenshots

Accordion Trip details

Changes

  • New TripSummaryPanel: route map + a summary card with price, total travel time and total walk distance. The details body now uses it instead of the map + duration/walk-distance overlay, so the details page also shows the trip price.
  • Price gains a summary variant (renders a SummaryRow), plus the split label/value translations it needs.
  • Timeline: the transport-mode icon (with line number) now sits in the content column to the right of the decoration line, matching the app, and the line number is dropped from the destination text.
  • Departure times left-align with the trip's left edge via a new TripRow labelAlign option; the label column is tightened.

Introduce a shared TripSummaryPanel rendering the route map plus a summary card with price, total travel time and total walk distance. The details body now uses it in place of the map + duration/walk-distance overlay, so the details view also shows the trip price.

Add a 'summary' variant to the Price component (rendering a SummaryRow) and the split label/value translations it needs.
@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
planner-web Ready Ready Preview, Comment Jun 24, 2026 8:40am

Request Review

@strandlie strandlie marked this pull request as draft June 23, 2026 06:56
@strandlie strandlie changed the title feat: add trip summary panel and refine trip-detail timeline feat: add trip summary panel Jun 23, 2026
Match the design: the departure time is the only thing left of the decoration line. Every other label moves into the content column to its right — the transport icon (with line number) next to the destination, and the walk/wait icons plus the message boxes (situations, notices, rail-replacement, interchange, booking) rendered with their own icon. The left column now holds only the time, left-aligned with the trip's left edge.
The priceLabel translation line exceeded prettier's print width, failing the tsc/check-all CI job. Reflow it across multiple lines.
The trip summary panel now carries price, travel time and walk distance, so the duration and price rows in the details header are redundant. Remove them (keeping the title and date) and add a little spacing between the header and the body below it.
@strandlie strandlie marked this pull request as ready for review June 24, 2026 10:50
@strandlie strandlie requested a review from rosvik June 24, 2026 10:51

@rosvik rosvik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noticed a few things here:

  • There are a bunch of comments added here that I don't think adds much. Could you have a look through and remove the ones you don't think are necessary?
  • There is a lot of extra padding in the mobile layout:
Image

style.mapContainer,
mapHeight === 'page' && style.mapContainer__page,
)}
tabIndex={-1}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why -1 tab index here? I'm still able to tab to the map on firefox. (Which I also think I should be able to)

flex-direction: column;
gap: token('spacing.medium');
padding: token('spacing.large');
border: 1px solid token('color.background.neutral.1.background');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the trip details page, this border is the same color as the background - is that by design? I'm noticing that it appears in the transition between light and dark mode, which looks a bit strange.

Comment on lines +447 to 450
`pris (1 ${traveller})`,
`price (1 ${traveller})`,
`pris (1 ${traveller})`,
),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should 'price' be capitalized?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants