Skip to content

Ab#816 refactor itinerary itinerarydetails - #6194

Open
Antiik91 wants to merge 111 commits into
v3from
AB#816-refactor-itinerary-itinerarydetails
Open

Antiik91 wants to merge 111 commits into
v3from
AB#816-refactor-itinerary-itinerarydetails

Conversation

@Antiik91

@Antiik91 Antiik91 commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Proposed Changes

  • Refactor ItineraryPage and ItineraryDetails, and split the leg rendering into smaller components
  • Merge BikeParkLeg and CarParkLeg into ParkLeg; add shared LegDetails, WalkLegDetails, AddressPlace and legUtils helpers; tidy Taxi, Walk, Bicycle and airport legs
  • Remove duplication, dead code and stale default messages
  • Fix rendering: no empty "Walk 0 m" row, end pin placement after transit and at a stop, return citybike box
  • Fix "walk bike to transit" note focusing the wrong place
  • Fix map popup origin/destination losing the other end after a page reload
  • Added and updated tests

Pull Request Check List

  • A reasonable set of unit tests is included
  • Console does not show new warnings/errors
  • Changes are documented or they are self explanatory
  • This pull request does not have any merge conflicts
  • All existing tests pass in CI build

Review

  • Read and verify the code changes
  • Test the functionality by running the UI locally with all popular browsers available in your platform
  • Check that the implementation matches the design, when such one is defined in an issue in Azure Boards
  • Merge the pull request

@vesameskanen
vesameskanen self-requested a review November 12, 2026 10:08
vesameskanen and others added 2 commits November 12, 2026 13:30
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

@hjvuor hjvuor Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't like the use of createElement here, I think it would be cleaner to use JSX to define components, also I think the function could only return data that would then be mapped into components using jsx, the function could also use a unit test
EDIT: we could have an ItineraryLegStrip.jsx and then itineraryLegStripUtil.js for example

vesameskanen and others added 23 commits November 20, 2026 12:19
…ry-itinerarydetails

# Conflicts:
#	src/client/component/itinerary/FareInfo.jsx
#	src/client/component/itinerary/Itinerary.jsx
#	src/client/component/itinerary/ItineraryDetails.jsx
#	src/client/component/itinerary/ItineraryDisclaimers.jsx
#	src/client/component/itinerary/ItineraryLegs.jsx
#	src/client/component/itinerary/ItineraryStreetLeg.jsx
#	src/client/component/itinerary/ItineraryTimeSummary.jsx
#	src/client/component/itinerary/VehicleRentalDurationInfo.jsx
#	src/client/component/itinerary/buildItineraryLegStrip.js
#	src/client/component/itinerary/itineraryDetailsUtils.js
#	src/client/component/itinerary/itineraryStreetLegUtils.js
#	src/client/component/itinerary/itinerarySummaryUtils.js
#	src/client/component/itinerary/itineraryTransitUtils.js
#	src/client/component/itinerary/useItineraryNavigation.js
#	src/client/component/itinerary/useItinerarySummaryUIState.js
#	src/client/utils/planParamUtil.js
#	test/unit/client/component/itinerary/ItineraryDetails.test.jsx
#	test/unit/client/component/itinerary/itineraryStreetLegUtils.test.js
#	test/unit/client/component/itinerary/itinerarySummaryUtils.test.js
#	test/unit/client/component/itinerary/itineraryTransitUtils.test.js
#	test/unit/client/component/itinerary/useItinerarySummaryUIState.test.jsx
#	test/unit/client/utils/fareUtils.test.js
…ow label and CO2 in it

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add pure getLegStripModel, render it with LegStrip, and move the rental
duration warning into its own component. Vehicle names are formatted at
the call site.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The row feedback wrappers and their animation state move into
AnimatedFeedback. The remaining overflow detection becomes its own hook.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Extract ShowDetailsButton, merge the two wrapper divs' styles into one
button and remove the unused open-state CSS.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The row is a listitem, not a live region, so aria-atomic had no effect.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
aria-label on the role=button area replaces its content, so the span was never read.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… label

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The summary was a separate unfocusable sr-only div, so the focus ring stayed on the previous
element while it was read. Reference it with aria-describedby instead of reading it separately.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The row button is named by the row label, the description no longer repeats the row number and
ends with a hint about what activating the row does (open, select or already selected on desktop).
The details arrow says it opens the details of the row. Texts added for en, fi and sv.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
vesameskanen and others added 30 commits November 26, 2026 14:13
Remove the unused useOriginAddress prop.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ransit

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…fy description check

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Drop unused noWalk and children props, the car-park-walk variant and
modifier classes without styles.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Drops modifier classes (car, bike, bicycle, scooter) that have no styles.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Park, car, taxi and via legs build the values of the screen reader
message and the visible distance and duration in one place.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The note focused the start of the bike leg instead of its end.
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.

3 participants