Skip to content

Commit 75fbb5b

Browse files
Merge branch 'dev' into otp-ui-upgrade
# Conflicts: # package.json # yarn.lock
2 parents bfe7a75 + 7a0ef45 commit 75fbb5b

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed

Diff for: example-config.yml

+2
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,8 @@ itinerary:
308308
disableMetroSeperatorDot: false
309309
# Shows the duration of a leg below the leg in the metro itinerary summary
310310
showLegDurations: false
311+
# Allows calorie counts to be hidden
312+
displayCalories: true
311313

312314
# The transitOperators key is a list of transit operators that can be used to
313315
# order transit agencies when sorting by route. Also, this can optionally

Diff for: lib/components/narrative/connected-trip-details.js

+4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ const mapStateToProps = (state) => {
1616
const { itinerary } = state.otp.config
1717
return {
1818
defaultFareKey: itinerary?.defaultFareKey || undefined,
19+
displayCalories:
20+
typeof itinerary?.displayCalories === 'boolean'
21+
? itinerary?.displayCalories
22+
: undefined,
1923
fareDetailsLayout: itinerary?.fareDetailsLayout || undefined,
2024
fareKeyNameMap: itinerary?.fareKeyNameMap || {}
2125
}

Diff for: lib/components/narrative/utils.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export function localizeGradationMap(
1919
gradationMap?: Record<string, any>
2020
): Record<string, any> {
2121
if (!gradationMap) return {}
22-
const newGradationMap: Record<string, any> = {}
22+
const newGradationMap: Record<string, any> = { ...gradationMap }
2323

2424
Object.keys(newGradationMap).forEach((key) => {
2525
// As these localization keys are in the config, rather than

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"@opentripplanner/stops-overlay": "^5.0.2",
5555
"@opentripplanner/transit-vehicle-overlay": "^3.0.2",
5656
"@opentripplanner/transitive-overlay": "^3.0.3",
57-
"@opentripplanner/trip-details": "^2.2.2",
57+
"@opentripplanner/trip-details": "^2.2.3",
5858
"@opentripplanner/trip-form": "^2.0.3",
5959
"@opentripplanner/trip-viewer-overlay": "^2.0.2",
6060
"@opentripplanner/vehicle-rental-overlay": "^2.0.2",

Diff for: yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -2686,10 +2686,10 @@
26862686
"@turf/bbox" "^6.5.0"
26872687
lodash.isequal "^4.5.0"
26882688

2689-
"@opentripplanner/trip-details@^2.2.2":
2690-
version "2.2.2"
2691-
resolved "https://registry.yarnpkg.com/@opentripplanner/trip-details/-/trip-details-2.2.2.tgz#dae64b4177c135166886d4f8f2ab0715a165c413"
2692-
integrity sha512-lYkrrWU5ytYhbZlvcoo7UdeZwWqFsf3mqTvtKKJBe7IrCEoG7hLlcUaVDHAUieGkkQiMLGv91BdZ2ANhe2s45Q==
2689+
"@opentripplanner/trip-details@^2.2.3":
2690+
version "2.2.3"
2691+
resolved "https://registry.yarnpkg.com/@opentripplanner/trip-details/-/trip-details-2.2.3.tgz#9af2e8466c8d7ee59749e81353ed1caa22284c24"
2692+
integrity sha512-Ky0SYND1Z2GofxHYCavgxLNQcbslc4S81f7chTdvpww/TPt4TTr2j0WGcBVnoW3uNo2QCSSCXk7J65kPoDLQsQ==
26932693
dependencies:
26942694
"@opentripplanner/core-utils" "^7.0.3"
26952695
"@styled-icons/fa-solid" "^10.34.0"

0 commit comments

Comments
 (0)