From b73aabab901c62da77d57a1f349692db18f2d784 Mon Sep 17 00:00:00 2001 From: Daniel Heppner Date: Mon, 9 Sep 2024 13:50:30 -0700 Subject: [PATCH 01/36] feat(trip-form): add callback for disabling all submodes --- .../AdvancedModeSettingsButton/index.tsx | 3 ++ .../AdvancedModeSubsettingsContainer.tsx | 3 ++ .../src/MetroModeSelector/SubSettingsPane.tsx | 39 ++++++++++++++++--- 3 files changed, 39 insertions(+), 6 deletions(-) diff --git a/packages/trip-form/src/MetroModeSelector/AdvancedModeSettingsButton/index.tsx b/packages/trip-form/src/MetroModeSelector/AdvancedModeSettingsButton/index.tsx index 335034f9e..e8731aec3 100644 --- a/packages/trip-form/src/MetroModeSelector/AdvancedModeSettingsButton/index.tsx +++ b/packages/trip-form/src/MetroModeSelector/AdvancedModeSettingsButton/index.tsx @@ -91,6 +91,7 @@ interface Props { fillModeIcons: boolean; id: string; modeButton: ModeButtonDefinition; + onAllSubmodesDisabled?: (modeButton: ModeButtonDefinition) => void; onSettingsUpdate: (event: QueryParamChangeEvent) => void; onToggle: () => void; } @@ -101,6 +102,7 @@ const AdvancedModeSettingsButton = ({ id, modeButton, onSettingsUpdate, + onAllSubmodesDisabled, onToggle }: Props): JSX.Element => { const intl = useIntl(); @@ -134,6 +136,7 @@ const AdvancedModeSettingsButton = ({ diff --git a/packages/trip-form/src/MetroModeSelector/AdvancedModeSubsettingsContainer.tsx b/packages/trip-form/src/MetroModeSelector/AdvancedModeSubsettingsContainer.tsx index e8c092b42..515bf2813 100644 --- a/packages/trip-form/src/MetroModeSelector/AdvancedModeSubsettingsContainer.tsx +++ b/packages/trip-form/src/MetroModeSelector/AdvancedModeSubsettingsContainer.tsx @@ -40,6 +40,7 @@ interface Props { fillModeIcons: boolean | undefined; label: string; modeButtons: ModeButtonDefinition[]; + onAllSubmodesDisabled?: (modeButton: ModeButtonDefinition) => void; onSettingsUpdate: (event: QueryParamChangeEvent) => void; onToggleModeButton: (key: string, newState: boolean) => void; } @@ -49,6 +50,7 @@ const AdvancedModeSubsettingsContainer = ({ fillModeIcons, modeButtons, label, + onAllSubmodesDisabled, onSettingsUpdate, onToggleModeButton }: Props): JSX.Element => { @@ -63,6 +65,7 @@ const AdvancedModeSubsettingsContainer = ({ key={button.label} modeButton={button} onSettingsUpdate={onSettingsUpdate} + onAllSubmodesDisabled={onAllSubmodesDisabled} onToggle={useCallback(() => { onToggleModeButton(button.key, !button.enabled); }, [button, onToggleModeButton])} diff --git a/packages/trip-form/src/MetroModeSelector/SubSettingsPane.tsx b/packages/trip-form/src/MetroModeSelector/SubSettingsPane.tsx index 759ae63c8..b4d9228cd 100644 --- a/packages/trip-form/src/MetroModeSelector/SubSettingsPane.tsx +++ b/packages/trip-form/src/MetroModeSelector/SubSettingsPane.tsx @@ -1,6 +1,11 @@ import { flatten } from "flat"; -import { ModeButtonDefinition, ModeSetting } from "@opentripplanner/types"; -import React, { ReactElement } from "react"; +import { + ModeButtonDefinition, + ModeSetting, + ModeSettingBase, + TransitSubmodeCheckboxOption +} from "@opentripplanner/types"; +import React, { ReactElement, useCallback } from "react"; import { useIntl } from "react-intl"; import styled from "styled-components"; @@ -10,6 +15,7 @@ import SliderSelector from "../SliderSelector"; import generateModeButtonLabel, { generateModeSettingLabels } from "./i18n"; import defaultEnglishMessages from "../../i18n/en-US.yml"; +import { QueryParamChangeEvent } from "../types"; // HACK: We should flatten the messages loaded above because // the YAML loaders behave differently between webpack and our version of jest: // - the yaml loader for webpack returns a nested object, @@ -153,10 +159,12 @@ export const ModeSettingRenderer = ({ interface Props { modeButton: ModeButtonDefinition; onSettingUpdate: (QueryParamChangeEvent) => void; + onAllSubmodesDisabled?: (modeButton: ModeButtonDefinition) => void; } export default function SubSettingsPane({ modeButton, - onSettingUpdate + onSettingUpdate, + onAllSubmodesDisabled }: Props): ReactElement { const intl = useIntl(); const label = generateModeButtonLabel(modeButton.key, intl, modeButton.label); @@ -166,7 +174,10 @@ export default function SubSettingsPane({ const { settingsNoSubmodes, settingsOnlySubmodes - } = modeButton.modeSettings.reduce( + } = modeButton.modeSettings.reduce<{ + settingsNoSubmodes: ModeSetting[]; + settingsOnlySubmodes: (TransitSubmodeCheckboxOption & ModeSettingBase)[]; + }>( (accumulator, cur) => { if (cur.type === "SUBMODE") { accumulator.settingsOnlySubmodes.push(cur); @@ -178,6 +189,22 @@ export default function SubSettingsPane({ { settingsNoSubmodes: [], settingsOnlySubmodes: [] } ); + const handleSettingChange = useCallback( + (setting: ModeSetting) => (evt: QueryParamChangeEvent) => { + if (setting.type === "SUBMODE") { + if ( + settingsOnlySubmodes.every( + s => Object.keys(evt).includes(s.key) || s.value === false + ) + ) { + onAllSubmodesDisabled && onAllSubmodesDisabled(modeButton); + } + } + onSettingUpdate(evt); + }, + [onSettingUpdate] + ); + return ( @@ -189,7 +216,7 @@ export default function SubSettingsPane({ {settingsOnlySubmodes.map(setting => ( ))} @@ -197,7 +224,7 @@ export default function SubSettingsPane({ {settingsNoSubmodes.map(setting => ( ))} From b800d707435966c73fe71aedf2d761bc830dd695 Mon Sep 17 00:00:00 2001 From: josh-willis-arcadis <168561922+josh-willis-arcadis@users.noreply.github.com> Date: Mon, 9 Sep 2024 22:06:13 -0500 Subject: [PATCH 02/36] fix(subsetting-pane): check if subsetting adds a transport mode --- packages/trip-form/src/MetroModeSelector/SubSettingsPane.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/trip-form/src/MetroModeSelector/SubSettingsPane.tsx b/packages/trip-form/src/MetroModeSelector/SubSettingsPane.tsx index b4d9228cd..becc09ce6 100644 --- a/packages/trip-form/src/MetroModeSelector/SubSettingsPane.tsx +++ b/packages/trip-form/src/MetroModeSelector/SubSettingsPane.tsx @@ -191,7 +191,10 @@ export default function SubSettingsPane({ const handleSettingChange = useCallback( (setting: ModeSetting) => (evt: QueryParamChangeEvent) => { - if (setting.type === "SUBMODE") { + if ( + (setting.type === "CHECKBOX" || setting.type === "SUBMODE") && + setting.addTransportMode + ) { if ( settingsOnlySubmodes.every( s => Object.keys(evt).includes(s.key) || s.value === false From 7f4c816c0edb2dcca8718f5fab9d1e1a6451e325 Mon Sep 17 00:00:00 2001 From: josh-willis-arcadis <168561922+josh-willis-arcadis@users.noreply.github.com> Date: Tue, 10 Sep 2024 15:49:27 -0500 Subject: [PATCH 03/36] fix(subsettings-pane): handle change when all settings that add a transport mode are false --- .../src/MetroModeSelector/SubSettingsPane.tsx | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/packages/trip-form/src/MetroModeSelector/SubSettingsPane.tsx b/packages/trip-form/src/MetroModeSelector/SubSettingsPane.tsx index becc09ce6..a71e39fe9 100644 --- a/packages/trip-form/src/MetroModeSelector/SubSettingsPane.tsx +++ b/packages/trip-form/src/MetroModeSelector/SubSettingsPane.tsx @@ -191,18 +191,26 @@ export default function SubSettingsPane({ const handleSettingChange = useCallback( (setting: ModeSetting) => (evt: QueryParamChangeEvent) => { - if ( - (setting.type === "CHECKBOX" || setting.type === "SUBMODE") && - setting.addTransportMode - ) { + // rental mode settings do not have type "SUBMODE" + const settingsWithTransportMode = modeButton.modeSettings.filter( + (s: ModeSetting) => + (s.type === "CHECKBOX" || s.type === "SUBMODE") && s.addTransportMode + ); + // check if setting is a transport mode setting + if (settingsWithTransportMode.find(s => s.key === setting.key)) { + // check if all submodes are disabled if ( - settingsOnlySubmodes.every( + settingsWithTransportMode.every( s => Object.keys(evt).includes(s.key) || s.value === false ) ) { + settingsWithTransportMode.forEach(s => { + evt[s.key] = Object.keys(evt).includes(s.key) || !s.value; + }); onAllSubmodesDisabled && onAllSubmodesDisabled(modeButton); } } + onSettingUpdate(evt); }, [onSettingUpdate] From 9c047fb71c63187f2cb5c71486a8b353cc99ce87 Mon Sep 17 00:00:00 2001 From: amy-corson-ibigroup <115499534+amy-corson-ibigroup@users.noreply.github.com> Date: Thu, 12 Sep 2024 17:35:50 -0500 Subject: [PATCH 04/36] feat(map-popup): Pass operator images to header --- packages/map-popup/src/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/map-popup/src/index.tsx b/packages/map-popup/src/index.tsx index 6f699803e..af3f0da34 100644 --- a/packages/map-popup/src/index.tsx +++ b/packages/map-popup/src/index.tsx @@ -90,6 +90,7 @@ type Props = { configCompanies?: ConfiguredCompany[]; entity: Entity getEntityName?: (entity: Entity, configCompanies: Company[],) => string; + getEntityPrefix?: (entity: Entity) => JSX.Element setLocation?: ({ location, locationType }: { location: Location, locationType: string }) => void; setViewedStop?: StopEventHandler; }; @@ -101,7 +102,7 @@ function entityIsStation(entity: Entity): entity is Station { /** * Renders a map popup for a stop, scooter, or shared bike */ -export function MapPopup({ closePopup = null, configCompanies, entity, getEntityName, setLocation, setViewedStop }: Props): JSX.Element { +export function MapPopup({ closePopup = null, configCompanies, entity, getEntityName, getEntityPrefix, setLocation, setViewedStop }: Props): JSX.Element { const intl = useIntl() if (!entity) return <> @@ -121,6 +122,7 @@ export function MapPopup({ closePopup = null, configCompanies, entity, getEntity + {getEntityPrefix && getEntityPrefix(entity)} Date: Thu, 12 Sep 2024 17:37:45 -0500 Subject: [PATCH 05/36] feat(otp2-tile-overlay): pass operator logos through to map popup --- packages/otp2-tile-overlay/src/index.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/otp2-tile-overlay/src/index.tsx b/packages/otp2-tile-overlay/src/index.tsx index 468c0e5cf..8e3da7f17 100644 --- a/packages/otp2-tile-overlay/src/index.tsx +++ b/packages/otp2-tile-overlay/src/index.tsx @@ -2,6 +2,7 @@ import EntityPopup from "@opentripplanner/map-popup" import { ConfiguredCompany, MapLocationActionArg, + Station, Stop, StopEventHandler, } from "@opentripplanner/types" @@ -19,6 +20,7 @@ const AREA_TYPES = ["areaStops"] const OTP2TileLayerWithPopup = ({ color, configCompanies, + getEntityPrefix, id, network, onMapClick, @@ -33,6 +35,7 @@ const OTP2TileLayerWithPopup = ({ */ color?: string; configCompanies?: ConfiguredCompany[] + getEntityPrefix?: (entity: Stop | Station) => JSX.Element id: string name?: string /** @@ -183,6 +186,7 @@ const OTP2TileLayerWithPopup = ({ { setClickedEntity(null); setLocation(location) } : null} setViewedStop={setViewedStop ? (stop) => { setClickedEntity(null);setViewedStop(stop) } : null} /> @@ -210,7 +214,8 @@ const generateOTP2TileLayers = ( endpoint: string, setLocation?: (location: MapLocationActionArg) => void, setViewedStop?: (stop: Stop) => void, - configCompanies?: ConfiguredCompany[] + configCompanies?: ConfiguredCompany[], + getEntityPrefix?: (entity: Stop | Station) => JSX.Element ): JSX.Element[] => { return [ Date: Fri, 13 Sep 2024 12:29:54 -0500 Subject: [PATCH 06/36] Add prefixEntity story in map-popup --- packages/map-popup/src/MapPopup.story.tsx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/packages/map-popup/src/MapPopup.story.tsx b/packages/map-popup/src/MapPopup.story.tsx index 708885586..1c06b1cbf 100644 --- a/packages/map-popup/src/MapPopup.story.tsx +++ b/packages/map-popup/src/MapPopup.story.tsx @@ -1,5 +1,7 @@ import React from "react"; import { action } from "@storybook/addon-actions"; +import styled from "styled-components"; +import { Station, Stop } from "@opentripplanner/types"; import MapPopupContents from "./index"; export default { @@ -8,6 +10,7 @@ export default { const STOP = { flex: false, + gtfsId: "9526", id: "9526", lat: 45.523009, lon: -122.672529, @@ -64,6 +67,18 @@ const FLOATING_CAR = { y: 52.52 }; +const getEntityPrefixExample = (entity: Stop | Station) => { + const DemoIcon = styled.span` + background-color: blue; + border-radius: 50px; + color: white; + margin-right: 0.5ch; + padding: 2px; + `; + + return {entity.name?.charAt(0)}; +}; + export const StopEntity = (): JSX.Element => ( ( setViewedStop={action("setViewedStop")} /> ); +export const StopEntitywithEntityPrefix = (): JSX.Element => ( + getEntityPrefixExample(STOP)} + setLocation={action("setLocation")} + setViewedStop={action("setViewedStop")} + /> +); export const StopEntityNoHandlers = (): JSX.Element => ( From acd40eca9ad29943ce8fd6ce515e05002ad32f48 Mon Sep 17 00:00:00 2001 From: josh-willis-arcadis <168561922+josh-willis-arcadis@users.noreply.github.com> Date: Fri, 13 Sep 2024 12:36:07 -0500 Subject: [PATCH 07/36] fix(subsettings-pane): only reset submodes if onAllSubmodesDisabled prop is present --- packages/trip-form/src/MetroModeSelector/SubSettingsPane.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/trip-form/src/MetroModeSelector/SubSettingsPane.tsx b/packages/trip-form/src/MetroModeSelector/SubSettingsPane.tsx index a71e39fe9..fbc0ad4c0 100644 --- a/packages/trip-form/src/MetroModeSelector/SubSettingsPane.tsx +++ b/packages/trip-form/src/MetroModeSelector/SubSettingsPane.tsx @@ -202,12 +202,13 @@ export default function SubSettingsPane({ if ( settingsWithTransportMode.every( s => Object.keys(evt).includes(s.key) || s.value === false - ) + ) && + onAllSubmodesDisabled ) { settingsWithTransportMode.forEach(s => { evt[s.key] = Object.keys(evt).includes(s.key) || !s.value; }); - onAllSubmodesDisabled && onAllSubmodesDisabled(modeButton); + onAllSubmodesDisabled(modeButton); } } From 89e8c48302b36dfd7f473e85c0fd3ca9bf25d059 Mon Sep 17 00:00:00 2001 From: josh-willis-arcadis <168561922+josh-willis-arcadis@users.noreply.github.com> Date: Fri, 13 Sep 2024 13:11:01 -0500 Subject: [PATCH 08/36] fix(i18n): remove unused string --- packages/trip-form/i18n/en-US.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/trip-form/i18n/en-US.yml b/packages/trip-form/i18n/en-US.yml index 524577bff..fc542ad3d 100644 --- a/packages/trip-form/i18n/en-US.yml +++ b/packages/trip-form/i18n/en-US.yml @@ -30,7 +30,6 @@ otpUi: walkTolerance-labelHigh: More Walking walkTolerance-labelLow: Less Walking wheelchair-label: Accessible Routing - settingsLabel: "{mode} settings" SettingsSelectorPanel: bikeOnly: Bike Only escooterOnly: E-scooter Only From 10ac8a69d7cd0805e923294dc20fc7cadb52500b Mon Sep 17 00:00:00 2001 From: josh-willis-arcadis <168561922+josh-willis-arcadis@users.noreply.github.com> Date: Fri, 13 Sep 2024 13:30:10 -0500 Subject: [PATCH 09/36] chore: update yarn.lock --- yarn.lock | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/yarn.lock b/yarn.lock index fa9be1f13..e38831978 100644 --- a/yarn.lock +++ b/yarn.lock @@ -19106,7 +19106,7 @@ react-test-renderer@^16.14.0: react-shallow-renderer "^16.15.0" scheduler "^0.23.0" -react@^18.2.0: +react@18.2.0, react@^18.2.0: version "18.2.0" resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5" integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ== @@ -20717,8 +20717,7 @@ string-similarity@^4.0.4: resolved "https://registry.yarnpkg.com/string-similarity/-/string-similarity-4.0.4.tgz#42d01ab0b34660ea8a018da8f56a3309bb8b2a5b" integrity sha512-/q/8Q4Bl4ZKAPjj8WerIBJWALKkaPRfrvhfF8k/B23i4nzrlRj2/go1m90In7nG/3XDSbOo0+pu6RvCTM9RGMQ== -"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: - name string-width-cjs +"string-width-cjs@npm:string-width@^4.2.0": version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -20736,6 +20735,15 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" +"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" @@ -20816,8 +20824,7 @@ stringify-package@^1.0.1: resolved "https://registry.yarnpkg.com/stringify-package/-/stringify-package-1.0.1.tgz#e5aa3643e7f74d0f28628b72f3dad5cecfc3ba85" integrity sha512-sa4DUQsYciMP1xhKWGuFM04fB0LG/9DlluZoSVywUMRNvzid6XucHK0/90xGxRoHrAaROrcHK1aPKaijCtSrhg== -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: - name strip-ansi-cjs +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -20845,6 +20852,13 @@ strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-ansi@^7.0.1: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -22620,8 +22634,7 @@ worker-farm@^1.7.0: dependencies: errno "~0.1.7" -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: - name wrap-ansi-cjs +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -22656,6 +22669,15 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" From e4dd82800b086c53de68b1a3ccfd0b2009852cdd Mon Sep 17 00:00:00 2001 From: josh-willis-arcadis <168561922+josh-willis-arcadis@users.noreply.github.com> Date: Mon, 16 Sep 2024 16:54:32 -0500 Subject: [PATCH 10/36] chore(storybook): remove unneeded story file --- .../MetroModeSelector/AdvancedModeSettingsButton.story.tsx | 2 +- .../src/MetroModeSelector/MetroModeSelector.story.tsx | 2 +- .../{mockButtons.story.tsx => mockButtons.tsx} | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) rename packages/trip-form/src/MetroModeSelector/{mockButtons.story.tsx => mockButtons.tsx} (90%) diff --git a/packages/trip-form/src/MetroModeSelector/AdvancedModeSettingsButton.story.tsx b/packages/trip-form/src/MetroModeSelector/AdvancedModeSettingsButton.story.tsx index bd3a8b4c0..e47fb210e 100644 --- a/packages/trip-form/src/MetroModeSelector/AdvancedModeSettingsButton.story.tsx +++ b/packages/trip-form/src/MetroModeSelector/AdvancedModeSettingsButton.story.tsx @@ -12,7 +12,7 @@ import { defaultModeButtonDefinitions, getIcon, modeSettingDefinitionsWithDropdown -} from "./mockButtons.story"; +} from "./mockButtons"; const initialState = { enabledModeButtons: ["transit"], diff --git a/packages/trip-form/src/MetroModeSelector/MetroModeSelector.story.tsx b/packages/trip-form/src/MetroModeSelector/MetroModeSelector.story.tsx index d4003bd10..45a7f9802 100644 --- a/packages/trip-form/src/MetroModeSelector/MetroModeSelector.story.tsx +++ b/packages/trip-form/src/MetroModeSelector/MetroModeSelector.story.tsx @@ -12,7 +12,7 @@ import { modeSettingDefinitionsWithDropdown, getIcon, defaultModeButtonDefinitions -} from "./mockButtons.story"; +} from "./mockButtons"; const initialState = { enabledModeButtons: ["transit"], diff --git a/packages/trip-form/src/MetroModeSelector/mockButtons.story.tsx b/packages/trip-form/src/MetroModeSelector/mockButtons.tsx similarity index 90% rename from packages/trip-form/src/MetroModeSelector/mockButtons.story.tsx rename to packages/trip-form/src/MetroModeSelector/mockButtons.tsx index 2e146b6b3..67b7d6a83 100644 --- a/packages/trip-form/src/MetroModeSelector/mockButtons.story.tsx +++ b/packages/trip-form/src/MetroModeSelector/mockButtons.tsx @@ -7,10 +7,12 @@ import { TrainTram } from "@styled-icons/fa-solid"; +import { ModeButtonDefinition, ModeSetting } from "@opentripplanner/types"; + import { ClassicBike } from "@opentripplanner/icons/src/classic"; import React from "react"; -export const defaultModeButtonDefinitions = [ +export const defaultModeButtonDefinitions: ModeButtonDefinition[] = [ { Icon: Bus, iconName: "bus", @@ -41,9 +43,8 @@ export const defaultModeButtonDefinitions = [ modes: [{ mode: "CAR" }] } ]; - // TODO: add more test settings? -export const modeSettingDefinitionsWithDropdown = [ +export const modeSettingDefinitionsWithDropdown: ModeSetting[] = [ { applicableMode: "TRANSIT", default: "blue", From 1b1e94d9abda546db273a8b191158453795be56e Mon Sep 17 00:00:00 2001 From: Daniel Heppner Date: Mon, 16 Sep 2024 15:28:41 -0700 Subject: [PATCH 11/36] update snapshots --- .../AdvancedModeSettingsButton.story.tsx.snap | 267 ++++++++++++++++++ .../MetroModeSelector.story.tsx.snap | 99 ------- 2 files changed, 267 insertions(+), 99 deletions(-) create mode 100644 packages/trip-form/src/MetroModeSelector/__snapshots__/AdvancedModeSettingsButton.story.tsx.snap diff --git a/packages/trip-form/src/MetroModeSelector/__snapshots__/AdvancedModeSettingsButton.story.tsx.snap b/packages/trip-form/src/MetroModeSelector/__snapshots__/AdvancedModeSettingsButton.story.tsx.snap new file mode 100644 index 000000000..186d7cb14 --- /dev/null +++ b/packages/trip-form/src/MetroModeSelector/__snapshots__/AdvancedModeSettingsButton.story.tsx.snap @@ -0,0 +1,267 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Trip Form Components/Advanced Mode Settings Buttons AdvancedModeSettingsButtons smoke-test 1`] = ` +
+
+ + Select a transit mode + +
+
+ + +
+
+
+
+
+ + + Transit + + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+`; diff --git a/packages/trip-form/src/MetroModeSelector/__snapshots__/MetroModeSelector.story.tsx.snap b/packages/trip-form/src/MetroModeSelector/__snapshots__/MetroModeSelector.story.tsx.snap index bbc305de0..2038f2a0a 100644 --- a/packages/trip-form/src/MetroModeSelector/__snapshots__/MetroModeSelector.story.tsx.snap +++ b/packages/trip-form/src/MetroModeSelector/__snapshots__/MetroModeSelector.story.tsx.snap @@ -32,30 +32,6 @@ exports[`Trip Form Components/Metro Mode Selector MetroModeSelector smoke-test 1 Transit - - - - `; From cfc32cbaf362fd3b015734123b2300ec05ec1b30 Mon Sep 17 00:00:00 2001 From: miles-grant-ibigroup Date: Mon, 23 Sep 2024 10:18:59 -0400 Subject: [PATCH 12/36] fix: add transfer leg support --- packages/itinerary-body/i18n/en-US.yml | 1 + .../src/AccessLegBody/index.tsx | 112 +-- .../itineraries/otp2-transfer-leg.json | 864 ++++++++++++++++++ .../src/defaults/access-leg-description.tsx | 19 + .../src/stories/OtpRrItineraryBody.story.tsx | 5 + .../src/stories/OtpUiItineraryBody.story.tsx | 5 + 6 files changed, 952 insertions(+), 54 deletions(-) create mode 100644 packages/itinerary-body/src/__mocks__/itineraries/otp2-transfer-leg.json diff --git a/packages/itinerary-body/i18n/en-US.yml b/packages/itinerary-body/i18n/en-US.yml index 0fbfb8d95..f4a796733 100644 --- a/packages/itinerary-body/i18n/en-US.yml +++ b/packages/itinerary-body/i18n/en-US.yml @@ -58,6 +58,7 @@ otpUi: carHail: Ride escooter: Ride walk: Walk + transfer: Transfer{duration, select, undefined {} other {, wait {duration}}} unnamedPath: Unnamed Path unnamedRoad: Unnamed Road vehicleTitle: "{company} {vehicleType}" diff --git a/packages/itinerary-body/src/AccessLegBody/index.tsx b/packages/itinerary-body/src/AccessLegBody/index.tsx index 989702a7b..ed257cc51 100644 --- a/packages/itinerary-body/src/AccessLegBody/index.tsx +++ b/packages/itinerary-body/src/AccessLegBody/index.tsx @@ -125,63 +125,67 @@ class AccessLegBody extends Component { onSummaryClick={this.onSummaryClick} showLegIcon={showLegIcon} /> - - {hideDrivingDirections ? ( - - - - - {mapillary} - - ) : ( - <> + {leg.distance !== 0 && ( + + {hideDrivingDirections ? ( - - - {leg.steps && leg.steps.length > 0 && ( - - )} - - - - - + + + {mapillary} - - - - - )} - - + ) : ( + <> + + + + {leg.steps && leg.steps.length > 0 && ( + + )} + + + + + + {mapillary} + + + + + + )} + + + )} ); diff --git a/packages/itinerary-body/src/__mocks__/itineraries/otp2-transfer-leg.json b/packages/itinerary-body/src/__mocks__/itineraries/otp2-transfer-leg.json new file mode 100644 index 000000000..3bdc40ffd --- /dev/null +++ b/packages/itinerary-body/src/__mocks__/itineraries/otp2-transfer-leg.json @@ -0,0 +1,864 @@ +{ + "accessibilityScore": null, + "duration": 3504, + "endTime": 1721497077000, + "legs": [ + { + "accessibilityScore": null, + "agency": null, + "alerts": [], + "arrivalDelay": 0, + "departureDelay": 0, + "distance": 711.73, + "dropOffBookingInfo": { + "latestBookingTime": null + }, + "dropoffType": "SCHEDULED", + "duration": 650, + "endTime": 1721494223000, + "fareProducts": [], + "from": { + "lat": 39.8761111, + "lon": -75.2452778, + "name": "Airport Terminal A (SEPTA)", + "rentalVehicle": null, + "stop": null, + "vertexType": "NORMAL" + }, + "headsign": null, + "interlineWithPreviousLeg": false, + "intermediateStops": null, + "legGeometry": { + "length": 46, + "points": "ghkrFzigjMPpAPEEYk@}EAQG]AECYQqAIe@?EQgAG]Ic@QgADAZKKk@WJy@^C@EBQHcAd@a@T@B@HBDGBIWMHMJYTGSGMEKKQVWHIBCDEBE?A{AqBIL" + }, + "mode": "WALK", + "pickupBookingInfo": { + "latestBookingTime": { + "daysPrior": 0 + } + }, + "pickupType": "SCHEDULED", + "realTime": false, + "realtimeState": null, + "rentedBike": false, + "rideHailingEstimate": null, + "startTime": 1721493573000, + "steps": [ + { + "absoluteDirection": "WEST", + "alerts": [], + "area": false, + "distance": 36.5, + "elevationProfile": [], + "lat": 39.8760426, + "lon": -75.245254, + "relativeDirection": "DEPART", + "stayOn": false, + "streetName": "Departures Road" + }, + { + "absoluteDirection": "SOUTH", + "alerts": [], + "area": false, + "distance": 11.2, + "elevationProfile": [], + "lat": 39.875958, + "lon": -75.2456672, + "relativeDirection": "LEFT", + "stayOn": false, + "streetName": "service road" + }, + { + "absoluteDirection": "EAST", + "alerts": [], + "area": false, + "distance": 314.88, + "elevationProfile": [], + "lat": 39.8758609, + "lon": -75.2456323, + "relativeDirection": "LEFT", + "stayOn": true, + "streetName": "path" + }, + { + "absoluteDirection": "EAST", + "alerts": [], + "area": false, + "distance": 19.73, + "elevationProfile": [], + "lat": 39.8764326, + "lon": -75.2422434, + "relativeDirection": "LEFT", + "stayOn": true, + "streetName": "steps" + }, + { + "absoluteDirection": "NORTH", + "alerts": [], + "area": false, + "distance": 138.27, + "elevationProfile": [], + "lat": 39.8764956, + "lon": -75.2420272, + "relativeDirection": "LEFT", + "stayOn": true, + "streetName": "footbridge" + }, + { + "absoluteDirection": "NORTHWEST", + "alerts": [], + "area": false, + "distance": 52.41, + "elevationProfile": [], + "lat": 39.8775186, + "lon": -75.2427263, + "relativeDirection": "RIGHT", + "stayOn": true, + "streetName": "service road" + }, + { + "absoluteDirection": "NORTHEAST", + "alerts": [], + "area": false, + "distance": 33.71, + "elevationProfile": [], + "lat": 39.8778732, + "lon": -75.2428468, + "relativeDirection": "RIGHT", + "stayOn": true, + "streetName": "parking aisle" + }, + { + "absoluteDirection": "SOUTHEAST", + "alerts": [], + "area": false, + "distance": 34.63, + "elevationProfile": [], + "lat": 39.8780467, + "lon": -75.2425239, + "relativeDirection": "RIGHT", + "stayOn": true, + "streetName": "service road" + }, + { + "absoluteDirection": "NORTHEAST", + "alerts": [], + "area": false, + "distance": 70.4, + "elevationProfile": [], + "lat": 39.877806, + "lon": -75.2422682, + "relativeDirection": "LEFT", + "stayOn": true, + "streetName": "parking aisle" + } + ], + "to": { + "lat": 39.878315, + "lon": -75.241768, + "name": "Philadelphia Airport Terminal D", + "rentalVehicle": null, + "stop": { + "alerts": [], + "code": "17105", + "gtfsId": "SEPTA:17105", + "id": "U3RvcDpTRVBUQToxNzEwNQ", + "lat": 39.878315, + "lon": -75.241768 + }, + "vertexType": "TRANSIT", + "stopCode": "17105", + "stopId": "SEPTA:17105" + }, + "transitLeg": false, + "trip": null, + "alightRule": "scheduled", + "boardRule": "scheduled", + "routeColor": "333333" + }, + { + "accessibilityScore": null, + "agency": { + "alerts": [], + "gtfsId": "SEPTA:1", + "id": "SEPTA:1", + "name": "SEPTA", + "timezone": "America/New_York", + "url": "https://www5.septa.org/" + }, + "alerts": [], + "arrivalDelay": 0, + "departureDelay": 0, + "distance": 5341.45, + "dropOffBookingInfo": { + "latestBookingTime": null + }, + "dropoffType": "SCHEDULED", + "duration": 517, + "endTime": 1721494740000, + "fareProducts": [], + "from": { + "lat": 39.878315, + "lon": -75.241768, + "name": "Philadelphia Airport Terminal D", + "rentalVehicle": null, + "stop": { + "alerts": [], + "code": "17105", + "gtfsId": "SEPTA:17105", + "id": "U3RvcDpTRVBUQToxNzEwNQ", + "lat": 39.878315, + "lon": -75.241768 + }, + "vertexType": "TRANSIT", + "stopCode": "17105", + "stopId": "SEPTA:17105" + }, + "headsign": "69th Street Transportation Center", + "interlineWithPreviousLeg": false, + "intermediateStops": [ + { + "lat": 39.879037, + "locationType": "STOP", + "lon": -75.241377, + "name": "Philadelphia Airport Terminals E & F", + "stopCode": "633", + "stopId": "U3RvcDpTRVBUQTo2MzM" + }, + { + "lat": 39.88503, + "locationType": "STOP", + "lon": -75.25015, + "name": "Bartram Av & 90th St", + "stopCode": "19549", + "stopId": "U3RvcDpTRVBUQToxOTU0OQ" + }, + { + "lat": 39.886027, + "locationType": "STOP", + "lon": -75.24885, + "name": "89th St & Bartram Av - FS", + "stopCode": "19550", + "stopId": "U3RvcDpTRVBUQToxOTU1MA" + } + ], + "legGeometry": { + "length": 213, + "points": "uvkrFntfjMGGKK[So@Wa@QGC??_A]eAa@s@QMCq@OKCMCQCSA_@GgBK_BGgAAO@kAFODy@Pe@Ng@PWH]N[JUJQHSFYL]FM@SBQ@U?QAA?Y?GAQAq@Gw@Ii@EYAS?k@AWCK@GBGDEHEJCJAD?J?JBPDP@DB@BBJF^LXLhAf@j@VrAh@rAf@|Ah@vAd@rE~A`DfANFJDv@^RLl@\\r@d@n@f@n@h@n@l@l@p@l@r@^h@l@|@^n@h@|@Xd@Zl@z@dB`AzBVl@f@pAjAbDXx@z@rCXbAXjAr@zCZ|ABNBNH\\Jl@V~ABNDRp@rEFXH~@BTFl@DXD\\h@`H?L@V@T@^@NDjABfA@pA?t@AjBC~B?VExAAFCFEFCHABCDEFEBKFGBa@GSEUIOE[W[UMKIMKKGIGMEKK[Sy@WaAc@}AWcAQm@Uy@g@wA_@cA]{@w@eB[q@Uc@Wg@_@q@s@iA[e@]e@[c@Ya@W[_@c@a@e@q@u@s@s@u@q@u@o@y@u@{@s@w@s@kA_Aw@s@qCcCOO_Ay@eA}@qAiA}BqB??WSoAiAkC}BBIRMN_@??jAqCHQDCDADGBE@I?IAKGM`AuBaFiE??" + }, + "mode": "BUS", + "pickupBookingInfo": null, + "pickupType": "SCHEDULED", + "realTime": false, + "realtimeState": null, + "rentedBike": null, + "rideHailingEstimate": null, + "route": "108", + "startTime": 1721494223000, + "steps": [], + "to": { + "lat": 39.886344, + "lon": -75.246006, + "name": "PNC Center", + "rentalVehicle": null, + "stop": { + "alerts": [], + "code": "617", + "gtfsId": "SEPTA:617", + "id": "U3RvcDpTRVBUQTo2MTc", + "lat": 39.886344, + "lon": -75.246006 + }, + "vertexType": "TRANSIT", + "stopCode": "617", + "stopId": "SEPTA:617" + }, + "transitLeg": true, + "trip": { + "arrivalStoptime": { + "stop": { + "gtfsId": "SEPTA:1148", + "id": "U3RvcDpTRVBUQToxMTQ4" + }, + "stopPosition": 78 + }, + "departureStoptime": { + "stop": { + "gtfsId": "SEPTA:1160", + "id": "U3RvcDpTRVBUQToxMTYw" + }, + "stopPosition": 1 + }, + "gtfsId": "SEPTA:833551", + "id": "VHJpcDpTRVBUQTo4MzM1NTE" + }, + "origColor": "000000", + "agencyBrandingUrl": "https://www5.septa.org/", + "agencyId": "SEPTA:1", + "agencyName": "SEPTA", + "agencyUrl": "https://www5.septa.org/", + "alightRule": "scheduled", + "boardRule": "scheduled", + "routeColor": "000000", + "routeId": "SEPTA:108", + "routeLongName": "UPS or Airport to 69th St TC", + "routeShortName": "108", + "routeTextColor": "FFFFFF", + "tripId": "SEPTA:833551" + }, + { + "accessibilityScore": null, + "agency": null, + "alerts": [], + "arrivalDelay": 0, + "departureDelay": 0, + "distance": 0, + "dropOffBookingInfo": { + "latestBookingTime": null + }, + "dropoffType": "SCHEDULED", + "duration": 300, + "endTime": 1721495040000, + "fareProducts": [], + "from": { + "lat": 39.886344, + "lon": -75.246006, + "name": "PNC Center", + "rentalVehicle": null, + "stop": { + "alerts": [], + "code": "617", + "gtfsId": "SEPTA:617", + "id": "U3RvcDpTRVBUQTo2MTc", + "lat": 39.886344, + "lon": -75.246006 + }, + "vertexType": "TRANSIT", + "stopCode": "617", + "stopId": "SEPTA:617" + }, + "headsign": null, + "interlineWithPreviousLeg": false, + "intermediateStops": null, + "legGeometry": { + "length": 2, + "points": "shmrFpngjM??" + }, + "mode": "WALK", + "pickupBookingInfo": null, + "pickupType": "SCHEDULED", + "realTime": false, + "realtimeState": null, + "rentedBike": null, + "rideHailingEstimate": null, + "startTime": 1721494740000, + "steps": [], + "to": { + "lat": 39.886344, + "lon": -75.246006, + "name": "PNC Center", + "rentalVehicle": null, + "stop": { + "alerts": [], + "code": "617", + "gtfsId": "SEPTA:617", + "id": "U3RvcDpTRVBUQTo2MTc", + "lat": 39.886344, + "lon": -75.246006 + }, + "vertexType": "TRANSIT", + "stopCode": "617", + "stopId": "SEPTA:617" + }, + "transitLeg": false, + "trip": null, + "alightRule": "scheduled", + "boardRule": "scheduled", + "routeColor": "333333" + }, + { + "accessibilityScore": null, + "agency": { + "alerts": [], + "gtfsId": "SEPTA:1", + "id": "SEPTA:1", + "name": "SEPTA", + "timezone": "America/New_York", + "url": "https://www5.septa.org/" + }, + "alerts": [], + "arrivalDelay": 0, + "departureDelay": 0, + "distance": 10683.57, + "dropOffBookingInfo": { + "latestBookingTime": null + }, + "dropoffType": "SCHEDULED", + "duration": 1200, + "endTime": 1721496240000, + "fareProducts": [], + "from": { + "lat": 39.886344, + "lon": -75.246006, + "name": "PNC Center", + "rentalVehicle": null, + "stop": { + "alerts": [], + "code": "617", + "gtfsId": "SEPTA:617", + "id": "U3RvcDpTRVBUQTo2MTc", + "lat": 39.886344, + "lon": -75.246006 + }, + "vertexType": "TRANSIT", + "stopCode": "617", + "stopId": "SEPTA:617" + }, + "headsign": "Broad-Oregon", + "interlineWithPreviousLeg": false, + "intermediateStops": [ + { + "lat": 39.886996, + "locationType": "STOP", + "lon": -75.246417, + "name": "Tinicum Blvd & 88th St - FS", + "stopCode": "32119", + "stopId": "U3RvcDpTRVBUQTozMjExOQ" + }, + { + "lat": 39.888717, + "locationType": "STOP", + "lon": -75.244879, + "name": "Tinicum Blvd & 86th St - MBFS", + "stopCode": "32120", + "stopId": "U3RvcDpTRVBUQTozMjEyMA" + }, + { + "lat": 39.890732, + "locationType": "STOP", + "lon": -75.244012, + "name": "Bartram Av & 84th St - MBNS", + "stopCode": "30159", + "stopId": "U3RvcDpTRVBUQTozMDE1OQ" + }, + { + "lat": 39.893154, + "locationType": "STOP", + "lon": -75.239806, + "name": "Bartram Av & 84th St - MBFS", + "stopCode": "29438", + "stopId": "U3RvcDpTRVBUQToyOTQzOA" + }, + { + "lat": 39.8912, + "locationType": "STOP", + "lon": -75.23482, + "name": "Island Av & Penrose Av - MBNS", + "stopCode": "24612", + "stopId": "U3RvcDpTRVBUQToyNDYxMg" + }, + { + "lat": 39.888467, + "locationType": "STOP", + "lon": -75.233187, + "name": "Island Av & Penrose Av - MBFS", + "stopCode": "29439", + "stopId": "U3RvcDpTRVBUQToyOTQzOQ" + }, + { + "lat": 39.886466, + "locationType": "STOP", + "lon": -75.232084, + "name": "Island Av & Escort Av - MBNS", + "stopCode": "30190", + "stopId": "U3RvcDpTRVBUQTozMDE5MA" + }, + { + "lat": 39.883965, + "locationType": "STOP", + "lon": -75.230864, + "name": "Island Av & Escort Av", + "stopCode": "31475", + "stopId": "U3RvcDpTRVBUQTozMTQ3NQ" + }, + { + "lat": 39.882518, + "locationType": "STOP", + "lon": -75.230172, + "name": "Island Av & Escort Av - MBFS", + "stopCode": "29440", + "stopId": "U3RvcDpTRVBUQToyOTQ0MA" + }, + { + "lat": 39.882165, + "locationType": "STOP", + "lon": -75.226633, + "name": "Enterprise Av & Executive Av", + "stopCode": "29441", + "stopId": "U3RvcDpTRVBUQToyOTQ0MQ" + }, + { + "lat": 39.882771, + "locationType": "STOP", + "lon": -75.226183, + "name": "Executive Av & Enterprise Av - FS", + "stopCode": "995", + "stopId": "U3RvcDpTRVBUQTo5OTU" + }, + { + "lat": 39.884703, + "locationType": "STOP", + "lon": -75.228939, + "name": "Executive Av & Escort Av", + "stopCode": "24608", + "stopId": "U3RvcDpTRVBUQToyNDYwOA" + }, + { + "lat": 39.884036, + "locationType": "STOP", + "lon": -75.230427, + "name": "Escort Av & Island Av", + "stopCode": "24610", + "stopId": "U3RvcDpTRVBUQToyNDYxMA" + }, + { + "lat": 39.887939, + "locationType": "STOP", + "lon": -75.23254, + "name": "Island Av & Penrose Av - MBNS", + "stopCode": "30284", + "stopId": "U3RvcDpTRVBUQTozMDI4NA" + }, + { + "lat": 39.888832, + "locationType": "STOP", + "lon": -75.233009, + "name": "Island Av & Penrose Av - MBNS", + "stopCode": "31322", + "stopId": "U3RvcDpTRVBUQTozMTMyMg" + }, + { + "lat": 39.904859, + "locationType": "STOP", + "lon": -75.195461, + "name": "Penrose Av & 26th St - MBNS", + "stopCode": "32641", + "stopId": "U3RvcDpTRVBUQTozMjY0MQ" + }, + { + "lat": 39.906815, + "locationType": "STOP", + "lon": -75.191371, + "name": "Penrose & Pattison Av - MBNS", + "stopCode": "29444", + "stopId": "U3RvcDpTRVBUQToyOTQ0NA" + }, + { + "lat": 39.907722, + "locationType": "STOP", + "lon": -75.189751, + "name": "Penrose & Pattison Av - FS", + "stopCode": "31452", + "stopId": "U3RvcDpTRVBUQTozMTQ1Mg" + }, + { + "lat": 39.912554, + "locationType": "STOP", + "lon": -75.182725, + "name": "Penrose Av & 20th St", + "stopCode": "31323", + "stopId": "U3RvcDpTRVBUQTozMTMyMw" + }, + { + "lat": 39.913035, + "locationType": "STOP", + "lon": -75.181802, + "name": "Penrose Av & 20th St - FS", + "stopCode": "998", + "stopId": "U3RvcDpTRVBUQTo5OTg" + }, + { + "lat": 39.913905, + "locationType": "STOP", + "lon": -75.179533, + "name": "Moyamensing Av & Pollock St", + "stopCode": "24614", + "stopId": "U3RvcDpTRVBUQToyNDYxNA" + }, + { + "lat": 39.914739, + "locationType": "STOP", + "lon": -75.177418, + "name": "Moyamensing Av & 18th St", + "stopCode": "10851", + "stopId": "U3RvcDpTRVBUQToxMDg1MQ" + }, + { + "lat": 39.915299, + "locationType": "STOP", + "lon": -75.176058, + "name": "Moyamensing Av & 17th St", + "stopCode": "10849", + "stopId": "U3RvcDpTRVBUQToxMDg0OQ" + }, + { + "lat": 39.915832, + "locationType": "STOP", + "lon": -75.174699, + "name": "Moyamensing Av & 16th St", + "stopCode": "24615", + "stopId": "U3RvcDpTRVBUQToyNDYxNQ" + }, + { + "lat": 39.916382, + "locationType": "STOP", + "lon": -75.173281, + "name": "Moyamensing Av & 15th St", + "stopCode": "24616", + "stopId": "U3RvcDpTRVBUQToyNDYxNg" + } + ], + "legGeometry": { + "length": 417, + "points": "yhmrF|ngjM]YiAfC[Y??wIsH??{@u@SE[UKEKEKAO?O@OBMDKFMHOLgAz@]}@o@oBEM??s@yBM_@M]K]CIO[AEKUYm@EGKQs@qAIMGKUc@}@_BWg@}@_Bk@cA[k@?A??a@w@ISKUYk@Yu@Uq@Ws@M_@K_@Qm@WgASu@Sw@IYp@]r@_@~Ay@h@Yl@[`@QZORKFC^QVMPIJGTMJGVM|Ay@j@[DC??h@YPIDCBCr@_@TKVK~@g@XOFCVMLIZQr@_@p@]jAk@FCDCTK??d@U^QbCgA~DeBFC??lHsCdE_B??RIhFsB`@Q??f@SLENKXOd@[t@q@b@e@`@g@Ze@HOFKBK@IAMCKEKGIEEGEGCGCW[OQi@q@GIEKKSKUMY{@cC??w@{Bq@f@??i@`@eCjBe@^WVSTMPS\\_@v@]zAW`BCZ??E`@TTTTLNNPLVHVNd@Hb@Np@?D??H`@uEhByMpFIBcBr@??u@\\}Ar@[N??w@\\]HG@G@EAIAGCECEECECEEGEIAKEO@MFm@HqA@M@O?G@O@k@?a@A]?WASCOE_@E[I]ESISIWUg@Ui@Ym@Q[Wg@OYGMIQEIAEM[I[Ia@CWCKAKAWCe@Am@ASAKA]Ec@AAGe@ESMo@Ke@Oe@Uq@Uo@CGWu@[}@GOGSg@sA_@eAK]Qc@Sg@Um@Sk@Oa@Wq@M_@eAuCe@oA_@gAm@eBUm@_@eAk@}Aq@iB]_Ay@}Bc@mAk@_Bw@yBu@oB_@gAk@_BkA}Ca@eACGuB{FwAeEcBeFWw@{FeQkKa\\{CoJCGCGAEy@eCs@{Bm@kBcDsJ[y@cAgDOc@e@uA????m@eBw@uBGOIWIQKWEKMWe@sAQg@KYkA{CSg@}@yBCI??Ui@KYi@sASe@WMM[CGCEEKc@_A??IOIUIMGOGMIMS_@m@mAQ]Ua@qA}BeBmC}@qASYKOKOMOKOEGKOMSIIEGEEIIGIMOiAkBMQOUo@y@aCqDU]QYe@{@Q[A[Sc@????IU[u@Ui@IQKUM]????[w@Ok@Oi@EUGUEOCK}@aD[mA??IYqAqE_@oAk@iB??Og@GSWw@a@oA[mA??I[Su@W}@IWa@mAIY??I_@m@wBW{@Us@EQ??Qi@k@yAEMOOKa@FaAHqA" + }, + "mode": "BUS", + "pickupBookingInfo": null, + "pickupType": "SCHEDULED", + "realTime": false, + "realtimeState": null, + "rentedBike": null, + "rideHailingEstimate": null, + "route": "68", + "startTime": 1721495040000, + "steps": [], + "to": { + "lat": 39.916762, + "lon": -75.171603, + "name": "Oregon Av & Broad St", + "rentalVehicle": null, + "stop": { + "alerts": [], + "code": "31308", + "gtfsId": "SEPTA:31308", + "id": "U3RvcDpTRVBUQTozMTMwOA", + "lat": 39.916762, + "lon": -75.171603 + }, + "vertexType": "TRANSIT", + "stopCode": "31308", + "stopId": "SEPTA:31308" + }, + "transitLeg": true, + "trip": { + "arrivalStoptime": { + "stop": { + "gtfsId": "SEPTA:31308", + "id": "U3RvcDpTRVBUQTozMTMwOA" + }, + "stopPosition": 27 + }, + "departureStoptime": { + "stop": { + "gtfsId": "SEPTA:617", + "id": "U3RvcDpTRVBUQTo2MTc" + }, + "stopPosition": 1 + }, + "gtfsId": "SEPTA:878354", + "id": "VHJpcDpTRVBUQTo4NzgzNTQ" + }, + "origColor": "FFFFFF", + "agencyBrandingUrl": "https://www5.septa.org/", + "agencyId": "SEPTA:1", + "agencyName": "SEPTA", + "agencyUrl": "https://www5.septa.org/", + "alightRule": "scheduled", + "boardRule": "scheduled", + "routeColor": "000000", + "routeId": "SEPTA:68", + "routeLongName": "Broad-Oregon to UPS & 69th St TC", + "routeShortName": "68", + "routeTextColor": "000000", + "tripId": "SEPTA:878354" + }, + { + "accessibilityScore": null, + "agency": null, + "alerts": [], + "arrivalDelay": 0, + "departureDelay": 0, + "distance": 1004.27, + "dropOffBookingInfo": { + "latestBookingTime": null + }, + "dropoffType": "SCHEDULED", + "duration": 837, + "endTime": 1721497077000, + "fareProducts": [], + "from": { + "lat": 39.916762, + "lon": -75.171603, + "name": "Oregon Av & Broad St", + "rentalVehicle": null, + "stop": { + "alerts": [], + "code": "31308", + "gtfsId": "SEPTA:31308", + "id": "U3RvcDpTRVBUQTozMTMwOA", + "lat": 39.916762, + "lon": -75.171603 + }, + "vertexType": "TRANSIT", + "stopCode": "31308", + "stopId": "SEPTA:31308" + }, + "headsign": null, + "interlineWithPreviousLeg": false, + "intermediateStops": null, + "legGeometry": { + "length": 57, + "points": "wfsrFp}xiMGC@MNBBU@U?SFg@??t@J\\WPQFG@IBMDGLELBT?R@PHPHTHX?XCPBRDLDFALGLGHMNUHSN]L[HOTYDGHAJ_@DSJ@@IDc@@UJ@b@}GdAqO@G@G?CBWB@H@rEl@hAN" + }, + "mode": "WALK", + "pickupBookingInfo": null, + "pickupType": "SCHEDULED", + "realTime": false, + "realtimeState": null, + "rentedBike": false, + "rideHailingEstimate": null, + "startTime": 1721496240000, + "steps": [ + { + "absoluteDirection": "EAST", + "alerts": [], + "area": false, + "distance": 6.23, + "elevationProfile": [], + "lat": 39.9168089, + "lon": -75.1715886, + "relativeDirection": "DEPART", + "stayOn": false, + "streetName": "Oregon Avenue" + }, + { + "absoluteDirection": "SOUTH", + "alerts": [], + "area": false, + "distance": 9.1, + "elevationProfile": [], + "lat": 39.9167961, + "lon": -75.1715175, + "relativeDirection": "RIGHT", + "stayOn": false, + "streetName": "path" + }, + { + "absoluteDirection": "EAST", + "alerts": [], + "area": false, + "distance": 45.02, + "elevationProfile": [], + "lat": 39.9167149, + "lon": -75.1715312, + "relativeDirection": "LEFT", + "stayOn": true, + "streetName": "path" + }, + { + "absoluteDirection": "SOUTH", + "alerts": [], + "area": false, + "distance": 334.44, + "elevationProfile": [], + "lat": 39.9166447, + "lon": -75.1710129, + "relativeDirection": "RIGHT", + "stayOn": true, + "streetName": "path" + }, + { + "absoluteDirection": "SOUTHEAST", + "alerts": [], + "area": false, + "distance": 31.73, + "elevationProfile": [], + "lat": 39.9141295, + "lon": -75.169956, + "relativeDirection": "LEFT", + "stayOn": true, + "streetName": "path" + }, + { + "absoluteDirection": "EAST", + "alerts": [], + "area": false, + "distance": 29.74, + "elevationProfile": [], + "lat": 39.9139717, + "lon": -75.1697059, + "relativeDirection": "LEFT", + "stayOn": false, + "streetName": "Bigler Street" + }, + { + "absoluteDirection": "SOUTH", + "alerts": [], + "area": false, + "distance": 6.25, + "elevationProfile": [], + "lat": 39.9139228, + "lon": -75.1693631, + "relativeDirection": "RIGHT", + "stayOn": false, + "streetName": "alley" + }, + { + "absoluteDirection": "EAST", + "alerts": [], + "area": false, + "distance": 372.17, + "elevationProfile": [], + "lat": 39.9138676, + "lon": -75.1693769, + "relativeDirection": "LEFT", + "stayOn": true, + "streetName": "sidewalk" + }, + { + "absoluteDirection": "SOUTH", + "alerts": [], + "area": false, + "distance": 169.59, + "elevationProfile": [], + "lat": 39.9132964, + "lon": -75.165079, + "relativeDirection": "RIGHT", + "stayOn": false, + "streetName": "South 10th Street" + } + ], + "to": { + "lat": 39.9117945, + "lon": -75.1654253, + "name": "39.91179, -75.16543", + "rentalVehicle": null, + "stop": null, + "vertexType": "NORMAL" + }, + "transitLeg": false, + "trip": null, + "alightRule": "scheduled", + "boardRule": "scheduled", + "routeColor": "333333" + } + ], + "startTime": 1721493573000, + "transfers": 1, + "waitingTime": 0, + "walkTime": 1787, + "index": 0, + "rank": 876.9, + "totalFare": 1.7976931348623157e308 +} diff --git a/packages/itinerary-body/src/defaults/access-leg-description.tsx b/packages/itinerary-body/src/defaults/access-leg-description.tsx index adf4975a5..639727c38 100644 --- a/packages/itinerary-body/src/defaults/access-leg-description.tsx +++ b/packages/itinerary-body/src/defaults/access-leg-description.tsx @@ -2,6 +2,7 @@ import { humanizeDistanceString } from "@opentripplanner/humanize-distance"; import { Config, Leg } from "@opentripplanner/types"; import React, { HTMLAttributes, ReactElement } from "react"; import { FormattedMessage, IntlShape, useIntl } from "react-intl"; +import coreUtils from "@opentripplanner/core-utils"; import * as S from "../styled"; import { defaultMessages, getPlaceName } from "../util"; @@ -88,6 +89,7 @@ export default function AccessLegDescription({ ); + const isTransferLeg = leg.to.stopId === leg.from.stopId; return ( // Return an HTML element which is passed a className (and style props) // for styled-components support. @@ -111,6 +113,23 @@ export default function AccessLegDescription({ place: placeContent }} /> + ) : isTransferLeg ? ( + ) : ( ( showApproximateAccessLegTravelTimes /> ); + +export const TransferLegItinerary = (): ReactElement => ( + +); diff --git a/packages/itinerary-body/src/stories/OtpUiItineraryBody.story.tsx b/packages/itinerary-body/src/stories/OtpUiItineraryBody.story.tsx index 07b79d6f9..5dc9d5e70 100644 --- a/packages/itinerary-body/src/stories/OtpUiItineraryBody.story.tsx +++ b/packages/itinerary-body/src/stories/OtpUiItineraryBody.story.tsx @@ -30,6 +30,7 @@ const fareProductsItinerary = require("../__mocks__/itineraries/leg-fare-product const walkTransitWalkTransitWalkA11yItinerary = require("../__mocks__/itineraries/walk-transit-walk-transit-walk-with-accessibility-scores.json"); const otp2ScooterItinerary = require("../__mocks__/itineraries/otp2-scooter.json"); const flexItinerary = require("../__mocks__/itineraries/flex-itinerary.json"); +const transferLegItinerary = require("../__mocks__/itineraries/otp2-transfer-leg.json"); const a11yOverrideParameters = { a11y: { config: { rules: [{ id: "color-contrast", reviewOnFail: true }] } } @@ -238,3 +239,7 @@ export const ApproximatePrefixItinerary = (): ReactElement => ( showApproximateAccessLegTravelTimes /> ); + +export const TransferLegItinerary = (): ReactElement => ( + +); From 57c2d161024fe48eb21e419280c3b11c18cfc845 Mon Sep 17 00:00:00 2001 From: miles-grant-ibigroup Date: Mon, 23 Sep 2024 10:26:59 -0400 Subject: [PATCH 13/36] test: update snapshots --- packages/itinerary-body/i18n/fr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/itinerary-body/i18n/fr.yml b/packages/itinerary-body/i18n/fr.yml index 82568da0e..a065d0b91 100644 --- a/packages/itinerary-body/i18n/fr.yml +++ b/packages/itinerary-body/i18n/fr.yml @@ -62,6 +62,7 @@ otpUi: carHail: Course en voiture escooter: Trottinette walk: Marche + transfer: Transfer{duration, select, undefined {} other {, wait {duration}}} unnamedPath: Chemin sans nom unnamedRoad: Route sans nom vehicleTitle: "{vehicleType} {company}" From 2eb968f4edb0aef43c470abee471a94fccbf5af5 Mon Sep 17 00:00:00 2001 From: amy-corson-ibigroup <115499534+amy-corson-ibigroup@users.noreply.github.com> Date: Mon, 23 Sep 2024 11:33:57 -0500 Subject: [PATCH 14/36] refactor storybook getEntityPrefix --- packages/map-popup/src/MapPopup.story.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/map-popup/src/MapPopup.story.tsx b/packages/map-popup/src/MapPopup.story.tsx index 1c06b1cbf..d3de3fd1b 100644 --- a/packages/map-popup/src/MapPopup.story.tsx +++ b/packages/map-popup/src/MapPopup.story.tsx @@ -89,7 +89,7 @@ export const StopEntity = (): JSX.Element => ( export const StopEntitywithEntityPrefix = (): JSX.Element => ( getEntityPrefixExample(STOP)} + getEntityPrefix={getEntityPrefixExample} setLocation={action("setLocation")} setViewedStop={action("setViewedStop")} /> From 46ee93f16767e19b57159f59d05458ce2f033f50 Mon Sep 17 00:00:00 2001 From: josh-willis-arcadis <168561922+josh-willis-arcadis@users.noreply.github.com> Date: Mon, 23 Sep 2024 15:43:20 -0500 Subject: [PATCH 15/36] fix(subsettings-pane): sort props --- .../trip-form/src/MetroModeSelector/SubSettingsPane.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/trip-form/src/MetroModeSelector/SubSettingsPane.tsx b/packages/trip-form/src/MetroModeSelector/SubSettingsPane.tsx index fbc0ad4c0..fb8d17d9f 100644 --- a/packages/trip-form/src/MetroModeSelector/SubSettingsPane.tsx +++ b/packages/trip-form/src/MetroModeSelector/SubSettingsPane.tsx @@ -158,13 +158,13 @@ export const ModeSettingRenderer = ({ interface Props { modeButton: ModeButtonDefinition; - onSettingUpdate: (QueryParamChangeEvent) => void; onAllSubmodesDisabled?: (modeButton: ModeButtonDefinition) => void; + onSettingUpdate: (QueryParamChangeEvent) => void; } export default function SubSettingsPane({ modeButton, - onSettingUpdate, - onAllSubmodesDisabled + onAllSubmodesDisabled, + onSettingUpdate }: Props): ReactElement { const intl = useIntl(); const label = generateModeButtonLabel(modeButton.key, intl, modeButton.label); From 1165285b4e410c6b0d2b6dda4b198e1f38c67702 Mon Sep 17 00:00:00 2001 From: miles-grant-ibigroup Date: Tue, 24 Sep 2024 10:32:47 -0400 Subject: [PATCH 16/36] fix: add missing `minzoom` to area border --- packages/otp2-tile-overlay/src/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/otp2-tile-overlay/src/index.tsx b/packages/otp2-tile-overlay/src/index.tsx index 09199b297..43bd52510 100644 --- a/packages/otp2-tile-overlay/src/index.tsx +++ b/packages/otp2-tile-overlay/src/index.tsx @@ -164,6 +164,7 @@ const OTP2TileLayerWithPopup = ({ filter={filter} id={`${id}-outline`} layout={{ "line-join": "round", "line-cap": "round" }} + minzoom={stopsWhitelist ? 2 : 14} paint={{ "line-color": ROUTE_COLOR_EXPRESSION, "line-opacity": 0.8, From 208c2aaadccfd440d74c2ea295537304b75c98db Mon Sep 17 00:00:00 2001 From: amy-corson-ibigroup <115499534+amy-corson-ibigroup@users.noreply.github.com> Date: Tue, 24 Sep 2024 10:17:00 -0500 Subject: [PATCH 17/36] Fix missing comma --- packages/otp2-tile-overlay/src/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/otp2-tile-overlay/src/index.tsx b/packages/otp2-tile-overlay/src/index.tsx index d7cf6ee98..02f669a75 100644 --- a/packages/otp2-tile-overlay/src/index.tsx +++ b/packages/otp2-tile-overlay/src/index.tsx @@ -228,7 +228,7 @@ const generateOTP2TileLayers = ( setLocation?: (location: MapLocationActionArg) => void, setViewedStop?: (stop: Stop) => void, stopsWhitelist?: string[], - configCompanies?: ConfiguredCompany[] + configCompanies?: ConfiguredCompany[], getEntityPrefix?: (entity: Stop | Station) => JSX.Element ): JSX.Element[] => { return [ From 5ba1bb3a69a5c4c3806d5cfa1571d78ba1935e63 Mon Sep 17 00:00:00 2001 From: josh-willis-arcadis <168561922+josh-willis-arcadis@users.noreply.github.com> Date: Tue, 24 Sep 2024 11:46:03 -0500 Subject: [PATCH 18/36] fix(subsettings-pane): move const outside of callback --- .../src/MetroModeSelector/SubSettingsPane.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/trip-form/src/MetroModeSelector/SubSettingsPane.tsx b/packages/trip-form/src/MetroModeSelector/SubSettingsPane.tsx index fb8d17d9f..43c79e904 100644 --- a/packages/trip-form/src/MetroModeSelector/SubSettingsPane.tsx +++ b/packages/trip-form/src/MetroModeSelector/SubSettingsPane.tsx @@ -189,13 +189,14 @@ export default function SubSettingsPane({ { settingsNoSubmodes: [], settingsOnlySubmodes: [] } ); + // rental mode settings do not have type "SUBMODE" + const settingsWithTransportMode = modeButton.modeSettings.filter( + (s: ModeSetting) => + (s.type === "CHECKBOX" || s.type === "SUBMODE") && s.addTransportMode + ); + const handleSettingChange = useCallback( (setting: ModeSetting) => (evt: QueryParamChangeEvent) => { - // rental mode settings do not have type "SUBMODE" - const settingsWithTransportMode = modeButton.modeSettings.filter( - (s: ModeSetting) => - (s.type === "CHECKBOX" || s.type === "SUBMODE") && s.addTransportMode - ); // check if setting is a transport mode setting if (settingsWithTransportMode.find(s => s.key === setting.key)) { // check if all submodes are disabled From d5680c6643802e91879283589b757e3acd9295af Mon Sep 17 00:00:00 2001 From: josh-willis-arcadis <168561922+josh-willis-arcadis@users.noreply.github.com> Date: Tue, 24 Sep 2024 12:28:57 -0500 Subject: [PATCH 19/36] fix(AMSB-story): add support for onAllSubmodesDisabled prop --- .../AdvancedModeSettingsButton.story.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/trip-form/src/MetroModeSelector/AdvancedModeSettingsButton.story.tsx b/packages/trip-form/src/MetroModeSelector/AdvancedModeSettingsButton.story.tsx index e47fb210e..b830904b8 100644 --- a/packages/trip-form/src/MetroModeSelector/AdvancedModeSettingsButton.story.tsx +++ b/packages/trip-form/src/MetroModeSelector/AdvancedModeSettingsButton.story.tsx @@ -26,11 +26,13 @@ function pipe(...fns: Array<(arg: T) => T>) { const MetroModeSubsettingsComponent = ({ fillModeIcons, modeButtonDefinitions, + onAllSubmodesDisabled, onSetModeSettingValue, onToggleModeButton }: { fillModeIcons?: boolean; modeButtonDefinitions: Array; + onAllSubmodesDisabled?: (modeButton: ModeButtonDefinition) => void; onSetModeSettingValue: (event: QueryParamChangeEvent) => void; onToggleModeButton: (key: string, newState: boolean) => void; }): ReactElement => { @@ -74,6 +76,12 @@ const MetroModeSubsettingsComponent = ({ onToggleModeButton(key, newState); }; + const onAllSubmodesDisabledAction = (modeButton: ModeButtonDefinition) => { + toggleModeButtonAction(modeButton.key, false); + // Storybook Action: + onAllSubmodesDisabled?.(modeButton); + }; + const setModeSettingValueAction = (event: QueryParamChangeEvent) => { setModeSettingValues({ ...modeSettingValues, ...event }); // Storybook Action: @@ -86,6 +94,7 @@ const MetroModeSubsettingsComponent = ({ fillModeIcons={fillModeIcons} label="Select a transit mode" modeButtons={processedModeButtons} + onAllSubmodesDisabled={onAllSubmodesDisabledAction} onSettingsUpdate={setModeSettingValueAction} onToggleModeButton={toggleModeButtonAction} /> @@ -111,7 +120,8 @@ export default { argTypes: { fillModeIcons: { control: "boolean" }, onSetModeSettingValue: { action: "set mode setting value" }, - onToggleModeButton: { action: "toggle button" } + onToggleModeButton: { action: "toggle button" }, + onAllSubmodesDisabled: { action: "all submodes disabled" } }, component: MetroModeSubsettingsComponent, title: "Trip Form Components/Advanced Mode Settings Buttons" From 5888a387997cbc347b325ec92924fa58968f036d Mon Sep 17 00:00:00 2001 From: amy-corson-ibigroup <115499534+amy-corson-ibigroup@users.noreply.github.com> Date: Tue, 24 Sep 2024 12:36:29 -0500 Subject: [PATCH 20/36] test: update snapshots --- .../src/__snapshots__/MapPopup.story.tsx.snap | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/packages/map-popup/src/__snapshots__/MapPopup.story.tsx.snap b/packages/map-popup/src/__snapshots__/MapPopup.story.tsx.snap index 9ba1045f3..92a57f0ca 100644 --- a/packages/map-popup/src/__snapshots__/MapPopup.story.tsx.snap +++ b/packages/map-popup/src/__snapshots__/MapPopup.story.tsx.snap @@ -255,3 +255,71 @@ exports[`Map Popup StopEntityNoHandlers smoke-test 1`] = ` `; + +exports[`Map Popup StopEntitywithEntityPrefix smoke-test 1`] = ` +
+ +
+`; From f35cdb2584742f2281d9c593c0f85d3c8210ce20 Mon Sep 17 00:00:00 2001 From: josh-willis-arcadis <168561922+josh-willis-arcadis@users.noreply.github.com> Date: Tue, 24 Sep 2024 14:04:13 -0500 Subject: [PATCH 21/36] chore: rename mock mode button file and move to mocks folder --- .../src/MetroModeSelector/AdvancedModeSettingsButton.story.tsx | 2 +- .../mockButtons.tsx => __mocks__/mode-selector-buttons.tsx} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename packages/trip-form/src/{MetroModeSelector/mockButtons.tsx => __mocks__/mode-selector-buttons.tsx} (100%) diff --git a/packages/trip-form/src/MetroModeSelector/AdvancedModeSettingsButton.story.tsx b/packages/trip-form/src/MetroModeSelector/AdvancedModeSettingsButton.story.tsx index b830904b8..90c240d2d 100644 --- a/packages/trip-form/src/MetroModeSelector/AdvancedModeSettingsButton.story.tsx +++ b/packages/trip-form/src/MetroModeSelector/AdvancedModeSettingsButton.story.tsx @@ -12,7 +12,7 @@ import { defaultModeButtonDefinitions, getIcon, modeSettingDefinitionsWithDropdown -} from "./mockButtons"; +} from "../__mocks__/mode-selector-buttons"; const initialState = { enabledModeButtons: ["transit"], diff --git a/packages/trip-form/src/MetroModeSelector/mockButtons.tsx b/packages/trip-form/src/__mocks__/mode-selector-buttons.tsx similarity index 100% rename from packages/trip-form/src/MetroModeSelector/mockButtons.tsx rename to packages/trip-form/src/__mocks__/mode-selector-buttons.tsx From f147b684d7d7dd7db247c02e9e3d1b4272ec3983 Mon Sep 17 00:00:00 2001 From: josh-willis-arcadis <168561922+josh-willis-arcadis@users.noreply.github.com> Date: Tue, 24 Sep 2024 14:09:48 -0500 Subject: [PATCH 22/36] use correct import --- .../trip-form/src/MetroModeSelector/MetroModeSelector.story.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/trip-form/src/MetroModeSelector/MetroModeSelector.story.tsx b/packages/trip-form/src/MetroModeSelector/MetroModeSelector.story.tsx index 45a7f9802..ea29c898e 100644 --- a/packages/trip-form/src/MetroModeSelector/MetroModeSelector.story.tsx +++ b/packages/trip-form/src/MetroModeSelector/MetroModeSelector.story.tsx @@ -12,7 +12,7 @@ import { modeSettingDefinitionsWithDropdown, getIcon, defaultModeButtonDefinitions -} from "./mockButtons"; +} from "../__mocks__/mode-selector-buttons"; const initialState = { enabledModeButtons: ["transit"], From 7111c8389e8c2f5816ba235db06ab00c580c725d Mon Sep 17 00:00:00 2001 From: miles-grant-ibigroup Date: Wed, 25 Sep 2024 12:03:29 -0400 Subject: [PATCH 23/36] refactor: address pr feedback --- packages/itinerary-body/i18n/fr.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/itinerary-body/i18n/fr.yml b/packages/itinerary-body/i18n/fr.yml index a065d0b91..42aec1ed8 100644 --- a/packages/itinerary-body/i18n/fr.yml +++ b/packages/itinerary-body/i18n/fr.yml @@ -62,7 +62,9 @@ otpUi: carHail: Course en voiture escooter: Trottinette walk: Marche - transfer: Transfer{duration, select, undefined {} other {, wait {duration}}} + transfer: >- + Correspondance{duration, select, undefined {} other {, attente + {duration}}} unnamedPath: Chemin sans nom unnamedRoad: Route sans nom vehicleTitle: "{vehicleType} {company}" From 4791982e76490deee9d210a88d21c381b33777bc Mon Sep 17 00:00:00 2001 From: josh-willis-arcadis <168561922+josh-willis-arcadis@users.noreply.github.com> Date: Wed, 25 Sep 2024 15:45:15 -0500 Subject: [PATCH 24/36] chore: update yarn.lock --- yarn.lock | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/yarn.lock b/yarn.lock index e38831978..fb286e827 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4608,6 +4608,96 @@ resolved "https://registry.yarnpkg.com/@open-draft/until/-/until-2.1.0.tgz#0acf32f470af2ceaf47f095cdecd40d68666efda" integrity sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg== +"@opentripplanner/base-map@^3.2.2": + version "3.2.2" + resolved "https://registry.yarnpkg.com/@opentripplanner/base-map/-/base-map-3.2.2.tgz#6dc15f3af0bfe483ffea220dcd2220272fa31040" + integrity sha512-Neg+rvAr9lWx+8V8/4ZlPE+l91wxM0fbbsM5vp45L1zCRE4WszD7XtmLocnNMyuYzo3xEijoKF+ICiENsOM9bg== + dependencies: + "@opentripplanner/building-blocks" "^1.2.2" + mapbox-gl "npm:empty-npm-package@1.0.0" + maplibre-gl "^2.1.9" + react-map-gl "^7.0.15" + +"@opentripplanner/building-blocks@^1.0.3", "@opentripplanner/building-blocks@^1.2.2": + version "1.2.3" + resolved "https://registry.yarnpkg.com/@opentripplanner/building-blocks/-/building-blocks-1.2.3.tgz#404e8f9038867d66d55f51adf8855b1326c51ed5" + integrity sha512-I0AxiZrTZu+e7+av4u0tHW2ijqpxH0AkLHrhf75BHf1Ep2FOGxaul/v+8UT18mNYiM5eHNstOX3XiXaDjtCUaw== + +"@opentripplanner/core-utils@^11.4.4": + version "11.5.0" + resolved "https://registry.yarnpkg.com/@opentripplanner/core-utils/-/core-utils-11.5.0.tgz#b0aaa7724bb44fadc71c7027fe9eacac09e4e042" + integrity sha512-kRn50DSnET6t8Zdwx5hoGz6ZwOegvq70Ovxs6shgJJRKuEj5tEhkPyuqY+LndTG8NWuZj9Ql9Vb4Va7kZbHAvA== + dependencies: + "@conveyal/lonlat" "^1.4.1" + "@mapbox/polyline" "^1.1.0" + "@opentripplanner/geocoder" "^3.0.2" + "@styled-icons/foundation" "^10.34.0" + "@turf/along" "^6.0.1" + chroma-js "^2.4.2" + date-fns "^2.28.0" + date-fns-tz "^1.2.2" + graphql "^16.6.0" + lodash.clonedeep "^4.5.0" + lodash.isequal "^4.5.0" + qs "^6.9.1" + +"@opentripplanner/endpoints-overlay@^2.1.3": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@opentripplanner/endpoints-overlay/-/endpoints-overlay-2.1.4.tgz#f81088bce83236344dfa4a51b2efe00092a5c87a" + integrity sha512-VLRZArhoRQ38aafc/w986Uv1lnq/WLJOgBqnpvuUbLhLR/qHU9h5X3wg3jgwf2GA0BIn03Z99VJbCkGfkyd0LA== + dependencies: + "@opentripplanner/base-map" "^3.2.2" + "@opentripplanner/building-blocks" "^1.2.2" + "@opentripplanner/core-utils" "^11.4.4" + "@opentripplanner/location-icon" "^1.4.1" + "@styled-icons/fa-solid" "^10.34.0" + flat "^5.0.2" + +"@opentripplanner/from-to-location-picker@^2.1.14": + version "2.1.14" + resolved "https://registry.yarnpkg.com/@opentripplanner/from-to-location-picker/-/from-to-location-picker-2.1.14.tgz#7386fe93cd486a67a119a81fb46a5a442f9aa7ec" + integrity sha512-V0slZKBxGj6J4QxrIc3hpcHmZzAW6F1qZGBFJG/0Lpx3MiT5BVnaYyapedJOJW7zdzcIt16FBg774RjvwBu3fQ== + dependencies: + "@opentripplanner/location-icon" "^1.4.1" + flat "^5.0.2" + +"@opentripplanner/icons@^2.0.12": + version "2.0.13" + resolved "https://registry.yarnpkg.com/@opentripplanner/icons/-/icons-2.0.13.tgz#45c4c16d8f208cff73811941f2def0fa23f87780" + integrity sha512-1oEPCmFuyS88bJZ2U9eFlEw2kQ0ZZW+wOI1dggr0omJDD6L+nVNQJ6TUtosNHYL1S35Jpx4aSQEG3iwwlXOHMg== + dependencies: + "@opentripplanner/core-utils" "^11.4.4" + prop-types "^15.7.2" + +"@opentripplanner/itinerary-body@^5.3.6": + version "5.3.7" + resolved "https://registry.yarnpkg.com/@opentripplanner/itinerary-body/-/itinerary-body-5.3.7.tgz#e32437f804defc19aef23685e45c0a363ac8bc31" + integrity sha512-ZnbxI78WsY6/Ynl3QY026JqimGG+gqXcN8ZEXY/BPMrNhSul27HgFFT2Flo37Fnc5gN2+jE8LsR1yxq05H3kvQ== + dependencies: + "@opentripplanner/core-utils" "^11.4.4" + "@opentripplanner/humanize-distance" "^1.2.0" + "@opentripplanner/icons" "^2.0.12" + "@opentripplanner/location-icon" "^1.4.1" + "@styled-icons/fa-solid" "^10.34.0" + "@styled-icons/foundation" "^10.34.0" + date-fns "^2.28.0" + date-fns-tz "^1.2.2" + flat "^5.0.2" + react-animate-height "^3.0.4" + react-resize-detector "^4.2.1" + string-similarity "^4.0.4" + +"@opentripplanner/map-popup@^4.0.0": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@opentripplanner/map-popup/-/map-popup-4.0.2.tgz#367ab7ce69d16d319988bb48d8f6d2db762623c7" + integrity sha512-RlHv9GE3Bk3++PwBcaPcALr6rZ+2AxY6Uj6W71AnLqz+wbeQO5rM3eEP99r0Sg1K3pAY0hXljBkVwKiUWhwxbQ== + dependencies: + "@opentripplanner/base-map" "^3.2.2" + "@opentripplanner/building-blocks" "^1.2.2" + "@opentripplanner/core-utils" "^11.4.4" + "@opentripplanner/from-to-location-picker" "^2.1.14" + flat "^5.0.2" + "@peculiar/asn1-schema@^2.1.6", "@peculiar/asn1-schema@^2.3.0": version "2.3.3" resolved "https://registry.yarnpkg.com/@peculiar/asn1-schema/-/asn1-schema-2.3.3.tgz#21418e1f3819e0b353ceff0c2dad8ccb61acd777" From 9d80e05008567bcd5cee9107290084a1c846a74e Mon Sep 17 00:00:00 2001 From: miles-grant-ibigroup <86619099+miles-grant-ibigroup@users.noreply.github.com> Date: Fri, 27 Sep 2024 15:42:29 -0400 Subject: [PATCH 25/36] refactor: address pr feedback Co-authored-by: Daniel Heppner <92878779+daniel-heppner-ibigroup@users.noreply.github.com> --- packages/itinerary-body/src/defaults/access-leg-description.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/itinerary-body/src/defaults/access-leg-description.tsx b/packages/itinerary-body/src/defaults/access-leg-description.tsx index 639727c38..2d02a6df0 100644 --- a/packages/itinerary-body/src/defaults/access-leg-description.tsx +++ b/packages/itinerary-body/src/defaults/access-leg-description.tsx @@ -116,7 +116,7 @@ export default function AccessLegDescription({ ) : isTransferLeg ? ( Date: Fri, 27 Sep 2024 16:27:12 -0700 Subject: [PATCH 26/36] fix build issues by using alpha version --- packages/base-map/package.json | 2 +- packages/building-blocks/package.json | 2 +- packages/endpoints-overlay/package.json | 6 +-- packages/icons/package.json | 2 +- packages/itinerary-body/package.json | 4 +- packages/location-field/package.json | 2 +- packages/map-popup/package.json | 8 +-- packages/otp2-tile-overlay/package.json | 4 +- packages/park-and-ride-overlay/package.json | 4 +- packages/printable-itinerary/package.json | 6 +-- packages/route-viewer-overlay/package.json | 4 +- packages/stop-viewer-overlay/package.json | 4 +- packages/stops-overlay/package.json | 6 +-- packages/transit-vehicle-overlay/package.json | 6 +-- packages/transitive-overlay/package.json | 8 +-- packages/trip-details/package.json | 2 +- packages/trip-form/package.json | 4 +- packages/trip-viewer-overlay/package.json | 4 +- packages/vehicle-rental-overlay/package.json | 8 +-- packages/zoom-based-markers/package.json | 4 +- yarn.lock | 52 +++++++++++++++++++ 21 files changed, 97 insertions(+), 45 deletions(-) diff --git a/packages/base-map/package.json b/packages/base-map/package.json index b9c481d77..05c04dc1e 100644 --- a/packages/base-map/package.json +++ b/packages/base-map/package.json @@ -12,7 +12,7 @@ "mapbox-gl": "npm:empty-npm-package@1.0.0", "maplibre-gl": "^2.1.9", "react-map-gl": "^7.0.15", - "@opentripplanner/building-blocks": "^1.2.2" + "@opentripplanner/building-blocks": "^2.0.0" }, "peerDependencies": { "react": "^18.2.0", diff --git a/packages/building-blocks/package.json b/packages/building-blocks/package.json index 270450d38..e4e0bd48e 100644 --- a/packages/building-blocks/package.json +++ b/packages/building-blocks/package.json @@ -10,7 +10,7 @@ "private": false, "devDependencies": { "@opentripplanner/types": "^6.5.2", - "@opentripplanner/core-utils": "^11.4.4" + "@opentripplanner/core-utils": "^12.0.0" }, "peerDependencies": { "react": "^18.2.0", diff --git a/packages/endpoints-overlay/package.json b/packages/endpoints-overlay/package.json index 5d5fb7821..eb81876ca 100644 --- a/packages/endpoints-overlay/package.json +++ b/packages/endpoints-overlay/package.json @@ -19,12 +19,12 @@ "url": "https://github.com/opentripplanner/otp-ui/issues" }, "dependencies": { - "@opentripplanner/base-map": "^3.2.2", + "@opentripplanner/base-map": "^4.0.0", "@opentripplanner/location-icon": "^1.4.1", - "@opentripplanner/core-utils": "^11.4.4", + "@opentripplanner/core-utils": "^12.0.0", "flat": "^5.0.2", "@styled-icons/fa-solid": "^10.34.0", - "@opentripplanner/building-blocks": "^1.2.2" + "@opentripplanner/building-blocks": "^2.0.0" }, "devDependencies": { "@opentripplanner/types": "^6.5.2", diff --git a/packages/icons/package.json b/packages/icons/package.json index 04ca60b62..399b49357 100644 --- a/packages/icons/package.json +++ b/packages/icons/package.json @@ -10,7 +10,7 @@ "license": "MIT", "private": false, "dependencies": { - "@opentripplanner/core-utils": "^11.4.4", + "@opentripplanner/core-utils": "^12.0.0", "prop-types": "^15.7.2" }, "peerDependencies": { diff --git a/packages/itinerary-body/package.json b/packages/itinerary-body/package.json index dc50d84b5..30c16119d 100644 --- a/packages/itinerary-body/package.json +++ b/packages/itinerary-body/package.json @@ -10,9 +10,9 @@ "license": "MIT", "private": false, "dependencies": { - "@opentripplanner/core-utils": "^11.4.4", + "@opentripplanner/core-utils": "^12.0.0", "@opentripplanner/humanize-distance": "^1.2.0", - "@opentripplanner/icons": "^2.0.12", + "@opentripplanner/icons": "^3.0.0", "@opentripplanner/location-icon": "^1.4.1", "@styled-icons/fa-solid": "^10.34.0", "@styled-icons/foundation": "^10.34.0", diff --git a/packages/location-field/package.json b/packages/location-field/package.json index 1240cf331..012b8562a 100644 --- a/packages/location-field/package.json +++ b/packages/location-field/package.json @@ -10,7 +10,7 @@ "private": false, "dependencies": { "@conveyal/geocoder-arcgis-geojson": "^0.0.3", - "@opentripplanner/core-utils": "^11.4.4", + "@opentripplanner/core-utils": "^12.0.0", "@opentripplanner/geocoder": "^3.0.2", "@opentripplanner/humanize-distance": "^1.2.0", "@opentripplanner/location-icon": "^1.4.1", diff --git a/packages/map-popup/package.json b/packages/map-popup/package.json index e4a8edc90..ff94c3b06 100644 --- a/packages/map-popup/package.json +++ b/packages/map-popup/package.json @@ -11,10 +11,10 @@ "license": "MIT", "private": false, "dependencies": { - "@opentripplanner/base-map": "^3.2.2", - "@opentripplanner/building-blocks": "^1.2.2", - "@opentripplanner/core-utils": "^11.4.4", - "@opentripplanner/from-to-location-picker": "^2.1.14", + "@opentripplanner/base-map": "^4.0.0", + "@opentripplanner/building-blocks": "^2.0.0", + "@opentripplanner/core-utils": "^12.0.0", + "@opentripplanner/from-to-location-picker": "^3.0.0", "flat": "^5.0.2" }, "devDependencies": { diff --git a/packages/otp2-tile-overlay/package.json b/packages/otp2-tile-overlay/package.json index af4aa8f53..cbc1d2f17 100644 --- a/packages/otp2-tile-overlay/package.json +++ b/packages/otp2-tile-overlay/package.json @@ -16,10 +16,10 @@ "react-map-gl": "^7.0.15" }, "dependencies": { - "@opentripplanner/map-popup": "^4.0.0" + "@opentripplanner/map-popup": "^v3.2.0-alpha.1" }, "devDependencies": { - "@opentripplanner/base-map": "^3.2.2", + "@opentripplanner/base-map": "^4.0.0", "@opentripplanner/types": "^6.5.2" } } diff --git a/packages/park-and-ride-overlay/package.json b/packages/park-and-ride-overlay/package.json index 42223c068..b3f9598b4 100644 --- a/packages/park-and-ride-overlay/package.json +++ b/packages/park-and-ride-overlay/package.json @@ -19,8 +19,8 @@ "url": "https://github.com/opentripplanner/otp-ui/issues" }, "dependencies": { - "@opentripplanner/base-map": "^3.2.2", - "@opentripplanner/from-to-location-picker": "^2.1.14" + "@opentripplanner/base-map": "^4.0.0", + "@opentripplanner/from-to-location-picker": "^3.0.0" }, "peerDependencies": { "react": "^18.2.0", diff --git a/packages/printable-itinerary/package.json b/packages/printable-itinerary/package.json index 2a0275026..5a147cc40 100644 --- a/packages/printable-itinerary/package.json +++ b/packages/printable-itinerary/package.json @@ -10,11 +10,11 @@ "license": "MIT", "private": false, "dependencies": { - "@opentripplanner/core-utils": "^11.4.4", - "@opentripplanner/itinerary-body": "^5.3.6" + "@opentripplanner/core-utils": "^12.0.0", + "@opentripplanner/itinerary-body": "^6.0.0" }, "devDependencies": { - "@opentripplanner/icons": "^2.0.12" + "@opentripplanner/icons": "^3.0.0" }, "peerDependencies": { "react": "^18.2.0", diff --git a/packages/route-viewer-overlay/package.json b/packages/route-viewer-overlay/package.json index 4ca138ade..d25e6cf51 100644 --- a/packages/route-viewer-overlay/package.json +++ b/packages/route-viewer-overlay/package.json @@ -20,8 +20,8 @@ }, "dependencies": { "@mapbox/polyline": "^1.1.0", - "@opentripplanner/base-map": "^3.2.2", - "@opentripplanner/core-utils": "^11.4.4", + "@opentripplanner/base-map": "^4.0.0", + "@opentripplanner/core-utils": "^12.0.0", "point-in-polygon": "^1.1.0" }, "devDependencies": { diff --git a/packages/stop-viewer-overlay/package.json b/packages/stop-viewer-overlay/package.json index 5c1aa9585..8d6a0b2ca 100644 --- a/packages/stop-viewer-overlay/package.json +++ b/packages/stop-viewer-overlay/package.json @@ -19,8 +19,8 @@ "url": "https://github.com/opentripplanner/otp-ui/issues" }, "dependencies": { - "@opentripplanner/base-map": "^3.2.2", - "@opentripplanner/core-utils": "^11.4.4" + "@opentripplanner/base-map": "^4.0.0", + "@opentripplanner/core-utils": "^12.0.0" }, "devDependencies": { "@opentripplanner/types": "^6.5.2" diff --git a/packages/stops-overlay/package.json b/packages/stops-overlay/package.json index 3b3ce8a69..1d2cb9199 100644 --- a/packages/stops-overlay/package.json +++ b/packages/stops-overlay/package.json @@ -19,9 +19,9 @@ "url": "https://github.com/opentripplanner/otp-ui/issues" }, "dependencies": { - "@opentripplanner/base-map": "^3.2.2", - "@opentripplanner/from-to-location-picker": "^2.1.14", - "@opentripplanner/map-popup": "^4.0.0", + "@opentripplanner/base-map": "^4.0.0", + "@opentripplanner/from-to-location-picker": "^3.0.0", + "@opentripplanner/map-popup": "^5.0.0", "flat": "^5.0.2" }, "devDependencies": { diff --git a/packages/transit-vehicle-overlay/package.json b/packages/transit-vehicle-overlay/package.json index f4fcb34b5..b9034dab2 100644 --- a/packages/transit-vehicle-overlay/package.json +++ b/packages/transit-vehicle-overlay/package.json @@ -9,9 +9,9 @@ "module": "esm/index.js", "private": false, "dependencies": { - "@opentripplanner/base-map": "^3.2.2", - "@opentripplanner/core-utils": "^11.4.4", - "@opentripplanner/icons": "^2.0.12", + "@opentripplanner/base-map": "^4.0.0", + "@opentripplanner/core-utils": "^12.0.0", + "@opentripplanner/icons": "^3.0.0", "flat": "^5.0.2" }, "devDependencies": { diff --git a/packages/transitive-overlay/package.json b/packages/transitive-overlay/package.json index db1d0e8d8..540e6895a 100644 --- a/packages/transitive-overlay/package.json +++ b/packages/transitive-overlay/package.json @@ -20,9 +20,9 @@ }, "dependencies": { "@mapbox/polyline": "^1.1.1", - "@opentripplanner/base-map": "^3.2.2", - "@opentripplanner/core-utils": "^11.4.4", - "@opentripplanner/itinerary-body": "^5.3.6", + "@opentripplanner/base-map": "^4.0.0", + "@opentripplanner/core-utils": "^12.0.0", + "@opentripplanner/itinerary-body": "^6.0.0", "@turf/bbox": "^6.5.0", "@turf/bearing": "^6.5.0", "@turf/destination": "^6.5.0", @@ -32,7 +32,7 @@ "lodash.isequal": "^4.5.0" }, "devDependencies": { - "@opentripplanner/endpoints-overlay": "^2.1.3", + "@opentripplanner/endpoints-overlay": "^3.0.0", "@opentripplanner/types": "^6.5.2" }, "peerDependencies": { diff --git a/packages/trip-details/package.json b/packages/trip-details/package.json index 713845457..71f276492 100644 --- a/packages/trip-details/package.json +++ b/packages/trip-details/package.json @@ -11,7 +11,7 @@ "license": "MIT", "private": false, "dependencies": { - "@opentripplanner/core-utils": "^11.4.4", + "@opentripplanner/core-utils": "^12.0.0", "@styled-icons/fa-solid": "^10.34.0", "flat": "^5.0.2", "react-animate-height": "^3.0.4" diff --git a/packages/trip-form/package.json b/packages/trip-form/package.json index 454f7b09a..94d7b01d3 100644 --- a/packages/trip-form/package.json +++ b/packages/trip-form/package.json @@ -10,8 +10,8 @@ "types": "lib/index.d.ts", "private": false, "dependencies": { - "@opentripplanner/core-utils": "^11.4.4", - "@opentripplanner/building-blocks": "^1.0.3", + "@opentripplanner/core-utils": "^12.0.0", + "@opentripplanner/building-blocks": "^2.0.0", "@floating-ui/react": "^0.19.2", "@styled-icons/bootstrap": "^10.34.0", "@styled-icons/boxicons-regular": "^10.38.0", diff --git a/packages/trip-viewer-overlay/package.json b/packages/trip-viewer-overlay/package.json index fcdc203ae..c2babcc97 100644 --- a/packages/trip-viewer-overlay/package.json +++ b/packages/trip-viewer-overlay/package.json @@ -20,8 +20,8 @@ }, "dependencies": { "@mapbox/polyline": "^1.1.0", - "@opentripplanner/base-map": "^3.2.2", - "@opentripplanner/core-utils": "^11.4.4" + "@opentripplanner/base-map": "^4.0.0", + "@opentripplanner/core-utils": "^12.0.0" }, "peerDependencies": { "react": "^18.2.0", diff --git a/packages/vehicle-rental-overlay/package.json b/packages/vehicle-rental-overlay/package.json index c04cd9d8c..ef293b840 100644 --- a/packages/vehicle-rental-overlay/package.json +++ b/packages/vehicle-rental-overlay/package.json @@ -19,10 +19,10 @@ "url": "git+https://github.com/opentripplanner/otp-ui.git" }, "dependencies": { - "@opentripplanner/base-map": "^3.2.2", - "@opentripplanner/core-utils": "^11.4.4", - "@opentripplanner/from-to-location-picker": "^2.1.14", - "@opentripplanner/map-popup": "^4.0.0", + "@opentripplanner/base-map": "^4.0.0", + "@opentripplanner/core-utils": "^12.0.0", + "@opentripplanner/from-to-location-picker": "^3.0.0", + "@opentripplanner/map-popup": "^5.0.0", "@styled-icons/fa-solid": "^10.34.0", "flat": "^5.0.2", "lodash.memoize": "^4.1.2" diff --git a/packages/zoom-based-markers/package.json b/packages/zoom-based-markers/package.json index 8d3feefc4..b9514ca2d 100644 --- a/packages/zoom-based-markers/package.json +++ b/packages/zoom-based-markers/package.json @@ -19,8 +19,8 @@ "url": "https://github.com/opentripplanner/otp-ui/issues" }, "dependencies": { - "@opentripplanner/core-utils": "^11.4.4", - "@opentripplanner/base-map": "^3.2.2" + "@opentripplanner/core-utils": "^12.0.0", + "@opentripplanner/base-map": "^4.0.0" }, "devDependencies": { "@opentripplanner/types": "^6.5.2" diff --git a/yarn.lock b/yarn.lock index ecfecbd61..a3bb50507 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4608,6 +4608,58 @@ resolved "https://registry.yarnpkg.com/@open-draft/until/-/until-2.1.0.tgz#0acf32f470af2ceaf47f095cdecd40d68666efda" integrity sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg== +"@opentripplanner/base-map@^3.2.2": + version "3.2.2" + resolved "https://registry.yarnpkg.com/@opentripplanner/base-map/-/base-map-3.2.2.tgz#6dc15f3af0bfe483ffea220dcd2220272fa31040" + integrity sha512-Neg+rvAr9lWx+8V8/4ZlPE+l91wxM0fbbsM5vp45L1zCRE4WszD7XtmLocnNMyuYzo3xEijoKF+ICiENsOM9bg== + dependencies: + "@opentripplanner/building-blocks" "^1.2.2" + mapbox-gl "npm:empty-npm-package@1.0.0" + maplibre-gl "^2.1.9" + react-map-gl "^7.0.15" + +"@opentripplanner/building-blocks@^1.2.2": + version "1.2.3" + resolved "https://registry.yarnpkg.com/@opentripplanner/building-blocks/-/building-blocks-1.2.3.tgz#404e8f9038867d66d55f51adf8855b1326c51ed5" + integrity sha512-I0AxiZrTZu+e7+av4u0tHW2ijqpxH0AkLHrhf75BHf1Ep2FOGxaul/v+8UT18mNYiM5eHNstOX3XiXaDjtCUaw== + +"@opentripplanner/core-utils@^11.4.4": + version "11.5.0" + resolved "https://registry.yarnpkg.com/@opentripplanner/core-utils/-/core-utils-11.5.0.tgz#b0aaa7724bb44fadc71c7027fe9eacac09e4e042" + integrity sha512-kRn50DSnET6t8Zdwx5hoGz6ZwOegvq70Ovxs6shgJJRKuEj5tEhkPyuqY+LndTG8NWuZj9Ql9Vb4Va7kZbHAvA== + dependencies: + "@conveyal/lonlat" "^1.4.1" + "@mapbox/polyline" "^1.1.0" + "@opentripplanner/geocoder" "^3.0.2" + "@styled-icons/foundation" "^10.34.0" + "@turf/along" "^6.0.1" + chroma-js "^2.4.2" + date-fns "^2.28.0" + date-fns-tz "^1.2.2" + graphql "^16.6.0" + lodash.clonedeep "^4.5.0" + lodash.isequal "^4.5.0" + qs "^6.9.1" + +"@opentripplanner/from-to-location-picker@^2.1.14": + version "2.1.14" + resolved "https://registry.yarnpkg.com/@opentripplanner/from-to-location-picker/-/from-to-location-picker-2.1.14.tgz#7386fe93cd486a67a119a81fb46a5a442f9aa7ec" + integrity sha512-V0slZKBxGj6J4QxrIc3hpcHmZzAW6F1qZGBFJG/0Lpx3MiT5BVnaYyapedJOJW7zdzcIt16FBg774RjvwBu3fQ== + dependencies: + "@opentripplanner/location-icon" "^1.4.1" + flat "^5.0.2" + +"@opentripplanner/map-popup@^v3.2.0-alpha.1": + version "3.2.0-alpha.1" + resolved "https://registry.yarnpkg.com/@opentripplanner/map-popup/-/map-popup-3.2.0-alpha.1.tgz#dcad38c103500f7c5ad3c632398204849ed5885e" + integrity sha512-Z0RsyC7wkYU/aOLYQFsJI5tBhzooEE/sQZROX2WODkDWAv4Qfj95ppS8pvNkpoZ0N4fioFcj5aM2VGXVMSy0EA== + dependencies: + "@opentripplanner/base-map" "^3.2.2" + "@opentripplanner/building-blocks" "^1.2.2" + "@opentripplanner/core-utils" "^11.4.4" + "@opentripplanner/from-to-location-picker" "^2.1.14" + flat "^5.0.2" + "@peculiar/asn1-schema@^2.1.6", "@peculiar/asn1-schema@^2.3.0": version "2.3.3" resolved "https://registry.yarnpkg.com/@peculiar/asn1-schema/-/asn1-schema-2.3.3.tgz#21418e1f3819e0b353ceff0c2dad8ccb61acd777" From ecb86aebadaf7e16a022f1f1f64a310dc8ae44ca Mon Sep 17 00:00:00 2001 From: Daniel Heppner Date: Mon, 30 Sep 2024 14:33:54 -0700 Subject: [PATCH 27/36] find stories explicitly in src directory --- .storybook/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.storybook/main.js b/.storybook/main.js index f3aaf0068..ca5f71d0a 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -27,7 +27,7 @@ module.exports = { stories: [ "../packages/**/*.story.mdx", - "../packages/**/*.story.@(js|jsx|ts|tsx)" + "../packages/*/src/**/*.story.@(js|jsx|ts|tsx)" ], staticDirs: ['../public'], From bbfd895ea89fcef0f01e4d78b6d24e7c3108dd42 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 1 Oct 2024 18:54:38 +0000 Subject: [PATCH 28/36] chore(release): 5.1.0 [skip ci] # [@opentripplanner/map-popup-v5.1.0](https://github.com/opentripplanner/otp-ui/compare/@opentripplanner/map-popup-v5.0.0...@opentripplanner/map-popup-v5.1.0) (2024-10-01) ### Features * **map-popup:** Pass operator images to header ([9c047fb](https://github.com/opentripplanner/otp-ui/commit/9c047fb71c63187f2cb5c71486a8b353cc99ce87)) --- packages/map-popup/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/map-popup/package.json b/packages/map-popup/package.json index ff94c3b06..bf7802569 100644 --- a/packages/map-popup/package.json +++ b/packages/map-popup/package.json @@ -1,6 +1,6 @@ { "name": "@opentripplanner/map-popup", - "version": "5.0.0", + "version": "5.1.0", "description": "A component for displaying map popup contents", "main": "lib/index.js", "module": "esm/index.js", From bb30125e836d07654c0bed5efa12856fd4375815 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 1 Oct 2024 18:54:45 +0000 Subject: [PATCH 29/36] chore(release): 2.1.0 [skip ci] # [@opentripplanner/otp2-tile-overlay-v2.1.0](https://github.com/opentripplanner/otp-ui/compare/@opentripplanner/otp2-tile-overlay-v2.0.0...@opentripplanner/otp2-tile-overlay-v2.1.0) (2024-10-01) ### Bug Fixes * add missing `minzoom` to area border ([1165285](https://github.com/opentripplanner/otp-ui/commit/1165285b4e410c6b0d2b6dda4b198e1f38c67702)) ### Features * **otp2-tile-overlay:** pass operator logos through to map popup ([8d80279](https://github.com/opentripplanner/otp-ui/commit/8d80279b210534ae73f1e000fc28bc12ac59c2a6)) --- packages/otp2-tile-overlay/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/otp2-tile-overlay/package.json b/packages/otp2-tile-overlay/package.json index cbc1d2f17..659059d77 100644 --- a/packages/otp2-tile-overlay/package.json +++ b/packages/otp2-tile-overlay/package.json @@ -1,6 +1,6 @@ { "name": "@opentripplanner/otp2-tile-overlay", - "version": "2.0.0", + "version": "2.1.0", "description": "Render data from OTP2's vector tile server", "main": "lib/index.js", "module": "esm/index.js", From 3925783e1e856fba21047a80a42225beec6988b1 Mon Sep 17 00:00:00 2001 From: Daniel Heppner Date: Wed, 2 Oct 2024 14:14:43 -0700 Subject: [PATCH 30/36] update snapshots --- .../OtpRrItineraryBody.story.tsx.snap | 2235 +++++++++++++---- .../OtpUiItineraryBody.story.tsx.snap | 2146 +++++++++++++--- 2 files changed, 3534 insertions(+), 847 deletions(-) diff --git a/packages/itinerary-body/src/stories/__snapshots__/OtpRrItineraryBody.story.tsx.snap b/packages/itinerary-body/src/stories/__snapshots__/OtpRrItineraryBody.story.tsx.snap index 6ff692b22..1fff28b3b 100644 --- a/packages/itinerary-body/src/stories/__snapshots__/OtpRrItineraryBody.story.tsx.snap +++ b/packages/itinerary-body/src/stories/__snapshots__/OtpRrItineraryBody.story.tsx.snap @@ -5933,10 +5933,7 @@ exports[`ItineraryBody/otp-react-redux CustomTimeColumn smoke-test 1`] = ` - - Walk to - - W Burnside & SW 6th - + Transfer, wait 1 min - - - - - - - - - @@ -6296,10 +6253,7 @@ exports[`ItineraryBody/otp-react-redux CustomTimeColumn smoke-test 1`] = ` - - Walk to - - East Burnside Street - + Transfer, wait 1 min - - - - - - - - - @@ -7891,97 +7805,6 @@ exports[`ItineraryBody/otp-react-redux EScooterRentalTransitItinerary smoke-test - - - - - - - - - @@ -21345,46 +21168,6 @@ exports[`ItineraryBody/otp-react-redux TncTransitItinerary smoke-test 1`] = ` - - - - - - - - - @@ -21681,46 +21464,6 @@ exports[`ItineraryBody/otp-react-redux TncTransitItinerary smoke-test 1`] = ` - - - - - - - - - @@ -21796,30 +21539,1796 @@ exports[`ItineraryBody/otp-react-redux TncTransitItinerary smoke-test 1`] = ` -
- + + Book Ride + +
+
+
+
+
+ Wait until 11:08 AM to book +
+
+
+
+
+ Estimated travel time: 1 min (does not account for traffic) +
+
+ Estimated cost: $17.00 - $18.00 +
+ + + + +
  • +
    + + + + +
    +
    + +
    +
    + 11:10 AM +
    + + Arrive at 407 NE 12th Ave, Portland + +
    +
    +
  • + +`; + +exports[`ItineraryBody/otp-react-redux TransferLegItinerary smoke-test 1`] = ` +
      +
    1. +
      +
      +
      + + + + +
      +
      + +
      +
      + 9:39 AM +
      + + from Airport Terminal A (SEPTA) + +
      +
      +
      + + + + + + + + + + + + + - + + + Walk 0.4 miles to + + Philadelphia Airport Terminal D + + + + +
      + + + + + + + + +
      + +
      +
      +
      +
      +
    2. +
    3. +
      +
      +
      + + + + +
      +
      + +
      +
      + 9:50 AM +
      + + from Philadelphia Airport Terminal D + +
      +
      + Stop ID 17105 + +
      +
      +
      + + + + - Ride + + + + + + + + + + + + + + + + + + + 108 + + + + + 69th Street Transportation Center + + + + + - Disembark at PNC Center + + + + +
      +
      +
      + Service operated by + + SEPTA + + +
      +
      +
      +
        +
      +
      +
      +
      +
      + + +
      + +
      +
      +
      +
      +
    4. +
    5. +
      +
      +
      + + + + +
      +
      + +
      +
      + 9:59 AM +
      + + from PNC Center + +
      +
      + Stop ID 617 + +
      +
      +
      + + + + + + + + + + + + + - + + + Transfer, wait 5 min + + + +
      +
      +
      +
    6. +
    7. +
      +
      +
      + + + + +
      +
      + +
      +
      + 10:04 AM +
      + + from PNC Center + +
      +
      + Stop ID 617 + +
      +
      +
      + + + + - Ride + + + + + + + + + + + + + + + + + + + 68 + + + + + Broad-Oregon + + + + + - Disembark at Oregon Av & Broad St + + + + +
      +
      +
      + Service operated by + + SEPTA + + +
      +
      +
      +
        +
      +
      +
      +
      +
      + + +
      + +
      +
      +
      +
      +
    8. +
    9. +
      +
      +
      + + + + +
      +
      + +
      +
      + 10:24 AM +
      + + from Oregon Av & Broad St + +
      +
      + Stop ID 31308 + +
      +
      +
      + + + + + + + + + + + + + - + + + Walk 0.6 miles to + + 39.91179, -75.16543 + + + + +
      + + + + + + + + +
      +
      -
      +
    10. @@ -21861,14 +23370,14 @@ exports[`ItineraryBody/otp-react-redux TncTransitItinerary smoke-test 1`] = `
      - 11:10 AM + 10:37 AM
      - Arrive at 407 NE 12th Ave, Portland + Arrive at 39.91179, -75.16543
      @@ -27267,46 +28776,6 @@ exports[`ItineraryBody/otp-react-redux WalkInterlinedTransitItinerary smoke-test - - - - - - - - - @@ -32935,46 +34404,6 @@ exports[`ItineraryBody/otp-react-redux ZeroAlertsAlwaysCollapsing smoke-test 1`] - - - - - - - - - @@ -34758,46 +36187,6 @@ exports[`ItineraryBody/otp-react-redux ZeroAlertsNotAlwaysCollapsing smoke-test - - - - - - - - - @@ -36581,46 +37970,6 @@ exports[`ItineraryBody/otp-react-redux ZeroAlertsWithoutCollapsingProp smoke-tes - - - - - - - - - diff --git a/packages/itinerary-body/src/stories/__snapshots__/OtpUiItineraryBody.story.tsx.snap b/packages/itinerary-body/src/stories/__snapshots__/OtpUiItineraryBody.story.tsx.snap index 6d210f737..994ea08ea 100644 --- a/packages/itinerary-body/src/stories/__snapshots__/OtpUiItineraryBody.story.tsx.snap +++ b/packages/itinerary-body/src/stories/__snapshots__/OtpUiItineraryBody.story.tsx.snap @@ -8624,97 +8624,6 @@ exports[`ItineraryBody/otp-ui EScooterRentalTransitItinerary smoke-test 1`] = ` - - - - - - - - -
      @@ -20565,10 +20474,7 @@ exports[`ItineraryBody/otp-ui TncTransitItinerary smoke-test 1`] = ` - - Walk to - - W Burnside & SW 6th - + Transfer, wait 1 min
      - - - - - - - - -
      @@ -20840,10 +20706,7 @@ exports[`ItineraryBody/otp-ui TncTransitItinerary smoke-test 1`] = ` - - Walk to - - East Burnside Street - + Transfer, wait 1 min
      - - - - - - - - -
      @@ -20942,72 +20765,1747 @@ exports[`ItineraryBody/otp-ui TncTransitItinerary smoke-test 1`] = `
      - - - -
      - -
      -
      - 11:09 AM -
      - - from East Burnside Street - -
      -
      -
      - Wait for pickup -
      -
      -
      - - - - - - - - - Ride 0.2 miles to - - 407 NE 12th Ave, Portland +
      +
      +
      +
      + +
      +
      + 11:09 AM +
      + + from East Burnside Street + +
      +
      +
      + Wait for pickup +
      +
      +
      + + + + + - + + + Ride 0.2 miles to + + 407 NE 12th Ave, Portland + + + + +
      +
      + + Book Ride + +
      +
      +
      +
      +
      + Wait until 11:08 AM to book +
      +
      +
      +
      +
      + Estimated travel time: 1 min (does not account for traffic) +
      +
      + Estimated cost: $17.00 - $18.00 +
      +
      +
      +
      +
      + +
      + +
    11. +
      +
      +
      +
      + +
      +
      +
      +
      +
      + +
      +
      + 11:10 AM +
      + + Arrive at 407 NE 12th Ave, Portland + +
      +
      +
      + +
      +
    12. +
    +`; + +exports[`ItineraryBody/otp-ui TransferLegItinerary smoke-test 1`] = ` +
      +
    1. +
      +
      +
      +
      +
      +
      + + + Travel by walking + + + + +
      +
      +
      +
      +
      + +
      +
      + 9:39 AM +
      + + from Airport Terminal A (SEPTA) + +
      +
      +
      + + + + + - + + + Walk 0.4 miles to + + Philadelphia Airport Terminal D + + + + +
      + + + + + + + + +
      + +
      +
      +
      +
      +
      + +
      +
    2. +
    3. +
      +
      +
      +
      +
      +
      + + + UPS or Airport to 69th St TC + +
      +
      +
      +
      +
      + +
      +
      + 9:50 AM +
      + + from Philadelphia Airport Terminal D + + ID 17105 + + +
      +
      +
      + + + + - Ride + + +
      + + 108 + +
      + + + 69th Street Transportation Center + + +
      + + - Disembark at PNC Center + + ID 617 + + +
      + +
      +
      +
      +
      +
      +
        +
      +
      +
      +
      +
      + +
      + +
      +
      +
      +
      +
      + +
      +
    4. +
    5. +
      +
      +
      +
      +
      +
      + + + Travel by walking + + + + +
      +
      +
      +
      +
      + +
      +
      + 9:59 AM +
      + + from PNC Center + + ID 617 + + +
      +
      +
      + + + + + - + + + Transfer, wait 5 min + + + +
      +
      +
      +
      + +
      +
    6. +
    7. +
      +
      +
      +
      +
      +
      + + + Broad-Oregon to UPS & 69th St TC + +
      +
      +
      +
      +
      + +
      +
      + 10:04 AM +
      + + from PNC Center + + ID 617 + + +
      +
      +
      + + + + - Ride + + +
      + + 68 + +
      + + + Broad-Oregon + + +
      + + - Disembark at Oregon Av & Broad St + + ID 31308 + + +
      + +
      +
      +
      +
      +
      +
        +
      +
      +
      +
      +
      + +
      + +
      +
      +
      +
      +
      + +
      +
    8. +
    9. +
      +
      +
      +
      +
      +
      + + + Travel by walking + + + + +
      +
      +
      +
      +
      + +
      +
      + 10:24 AM +
      + + from Oregon Av & Broad St + + ID 31308 + + +
      +
      +
      + + + + + - + + + Walk 0.6 miles to + + 39.91179, -75.16543 + + + + +
      + + + + + + + + +
      + - -
      -
      - - Book Ride - -
      -
      -
      -
      -
      - Wait until 11:08 AM to book -
      -
      -
      -
      - Estimated travel time: 1 min (does not account for traffic) -
      -
      - Estimated cost: $17.00 - $18.00 + No elevation data available. +
      +
      +
      -
      +
      @@ -21057,14 +22555,14 @@ exports[`ItineraryBody/otp-ui TncTransitItinerary smoke-test 1`] = `
      - 11:10 AM + 10:37 AM
      - Arrive at 407 NE 12th Ave, Portland + Arrive at 39.91179, -75.16543
      @@ -26342,46 +27840,6 @@ exports[`ItineraryBody/otp-ui WalkInterlinedTransitItinerary smoke-test 1`] = ` - - - - - - - - -
      @@ -35319,46 +36777,6 @@ exports[`ItineraryBody/otp-ui ZeroAlertsAlwaysCollapsing smoke-test 1`] = `
      - - - - - - - - -
      @@ -37015,46 +38433,6 @@ exports[`ItineraryBody/otp-ui ZeroAlertsNotAlwaysCollapsing smoke-test 1`] = `
      - - - - - - - - -
      @@ -38711,46 +40089,6 @@ exports[`ItineraryBody/otp-ui ZeroAlertsWithoutCollapsingProp smoke-test 1`] = `
      - - - - - - - - -
      From e5d24f996bde329d3e2c5ba5c03c755aaae44606 Mon Sep 17 00:00:00 2001 From: Daniel Heppner Date: Wed, 2 Oct 2024 14:22:03 -0700 Subject: [PATCH 31/36] deps: update internal dependencies --- packages/otp2-tile-overlay/package.json | 2 +- packages/stops-overlay/package.json | 2 +- packages/vehicle-rental-overlay/package.json | 2 +- yarn.lock | 52 -------------------- 4 files changed, 3 insertions(+), 55 deletions(-) diff --git a/packages/otp2-tile-overlay/package.json b/packages/otp2-tile-overlay/package.json index 659059d77..9a2bc6e85 100644 --- a/packages/otp2-tile-overlay/package.json +++ b/packages/otp2-tile-overlay/package.json @@ -16,7 +16,7 @@ "react-map-gl": "^7.0.15" }, "dependencies": { - "@opentripplanner/map-popup": "^v3.2.0-alpha.1" + "@opentripplanner/map-popup": "^v5.1.0" }, "devDependencies": { "@opentripplanner/base-map": "^4.0.0", diff --git a/packages/stops-overlay/package.json b/packages/stops-overlay/package.json index 1d2cb9199..89df74571 100644 --- a/packages/stops-overlay/package.json +++ b/packages/stops-overlay/package.json @@ -21,7 +21,7 @@ "dependencies": { "@opentripplanner/base-map": "^4.0.0", "@opentripplanner/from-to-location-picker": "^3.0.0", - "@opentripplanner/map-popup": "^5.0.0", + "@opentripplanner/map-popup": "^5.1.0", "flat": "^5.0.2" }, "devDependencies": { diff --git a/packages/vehicle-rental-overlay/package.json b/packages/vehicle-rental-overlay/package.json index ef293b840..034280821 100644 --- a/packages/vehicle-rental-overlay/package.json +++ b/packages/vehicle-rental-overlay/package.json @@ -22,7 +22,7 @@ "@opentripplanner/base-map": "^4.0.0", "@opentripplanner/core-utils": "^12.0.0", "@opentripplanner/from-to-location-picker": "^3.0.0", - "@opentripplanner/map-popup": "^5.0.0", + "@opentripplanner/map-popup": "^5.1.0", "@styled-icons/fa-solid": "^10.34.0", "flat": "^5.0.2", "lodash.memoize": "^4.1.2" diff --git a/yarn.lock b/yarn.lock index a3bb50507..ecfecbd61 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4608,58 +4608,6 @@ resolved "https://registry.yarnpkg.com/@open-draft/until/-/until-2.1.0.tgz#0acf32f470af2ceaf47f095cdecd40d68666efda" integrity sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg== -"@opentripplanner/base-map@^3.2.2": - version "3.2.2" - resolved "https://registry.yarnpkg.com/@opentripplanner/base-map/-/base-map-3.2.2.tgz#6dc15f3af0bfe483ffea220dcd2220272fa31040" - integrity sha512-Neg+rvAr9lWx+8V8/4ZlPE+l91wxM0fbbsM5vp45L1zCRE4WszD7XtmLocnNMyuYzo3xEijoKF+ICiENsOM9bg== - dependencies: - "@opentripplanner/building-blocks" "^1.2.2" - mapbox-gl "npm:empty-npm-package@1.0.0" - maplibre-gl "^2.1.9" - react-map-gl "^7.0.15" - -"@opentripplanner/building-blocks@^1.2.2": - version "1.2.3" - resolved "https://registry.yarnpkg.com/@opentripplanner/building-blocks/-/building-blocks-1.2.3.tgz#404e8f9038867d66d55f51adf8855b1326c51ed5" - integrity sha512-I0AxiZrTZu+e7+av4u0tHW2ijqpxH0AkLHrhf75BHf1Ep2FOGxaul/v+8UT18mNYiM5eHNstOX3XiXaDjtCUaw== - -"@opentripplanner/core-utils@^11.4.4": - version "11.5.0" - resolved "https://registry.yarnpkg.com/@opentripplanner/core-utils/-/core-utils-11.5.0.tgz#b0aaa7724bb44fadc71c7027fe9eacac09e4e042" - integrity sha512-kRn50DSnET6t8Zdwx5hoGz6ZwOegvq70Ovxs6shgJJRKuEj5tEhkPyuqY+LndTG8NWuZj9Ql9Vb4Va7kZbHAvA== - dependencies: - "@conveyal/lonlat" "^1.4.1" - "@mapbox/polyline" "^1.1.0" - "@opentripplanner/geocoder" "^3.0.2" - "@styled-icons/foundation" "^10.34.0" - "@turf/along" "^6.0.1" - chroma-js "^2.4.2" - date-fns "^2.28.0" - date-fns-tz "^1.2.2" - graphql "^16.6.0" - lodash.clonedeep "^4.5.0" - lodash.isequal "^4.5.0" - qs "^6.9.1" - -"@opentripplanner/from-to-location-picker@^2.1.14": - version "2.1.14" - resolved "https://registry.yarnpkg.com/@opentripplanner/from-to-location-picker/-/from-to-location-picker-2.1.14.tgz#7386fe93cd486a67a119a81fb46a5a442f9aa7ec" - integrity sha512-V0slZKBxGj6J4QxrIc3hpcHmZzAW6F1qZGBFJG/0Lpx3MiT5BVnaYyapedJOJW7zdzcIt16FBg774RjvwBu3fQ== - dependencies: - "@opentripplanner/location-icon" "^1.4.1" - flat "^5.0.2" - -"@opentripplanner/map-popup@^v3.2.0-alpha.1": - version "3.2.0-alpha.1" - resolved "https://registry.yarnpkg.com/@opentripplanner/map-popup/-/map-popup-3.2.0-alpha.1.tgz#dcad38c103500f7c5ad3c632398204849ed5885e" - integrity sha512-Z0RsyC7wkYU/aOLYQFsJI5tBhzooEE/sQZROX2WODkDWAv4Qfj95ppS8pvNkpoZ0N4fioFcj5aM2VGXVMSy0EA== - dependencies: - "@opentripplanner/base-map" "^3.2.2" - "@opentripplanner/building-blocks" "^1.2.2" - "@opentripplanner/core-utils" "^11.4.4" - "@opentripplanner/from-to-location-picker" "^2.1.14" - flat "^5.0.2" - "@peculiar/asn1-schema@^2.1.6", "@peculiar/asn1-schema@^2.3.0": version "2.3.3" resolved "https://registry.yarnpkg.com/@peculiar/asn1-schema/-/asn1-schema-2.3.3.tgz#21418e1f3819e0b353ceff0c2dad8ccb61acd777" From 8fee63d4630362df5dac671dc9a1051b22ad0a55 Mon Sep 17 00:00:00 2001 From: Daniel Heppner Date: Wed, 2 Oct 2024 14:58:26 -0700 Subject: [PATCH 32/36] clean up console spam from react intl --- .storybook/react-intl.ts | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/.storybook/react-intl.ts b/.storybook/react-intl.ts index c0942295b..89a1e5d0b 100644 --- a/.storybook/react-intl.ts +++ b/.storybook/react-intl.ts @@ -27,22 +27,25 @@ const messages = {}; // Populate messages if not running snapshots. // (Message printouts would be unnecessary replicated in snapshots without that check.) -packages.forEach((pkg) => { - locales.forEach((locale) => { - // Chinese-simplified is assigned a special file name by Weblate. - const localeFile = locale === "zh" ? "zh_Hans" : locale; - try { - messages[locale] = { - ...messages[locale], - ...flatten(require(`../packages/${pkg}/i18n/${localeFile}.yml`).default) - }; - } catch (e) { - // There is no yml files for the "unknown" locale, - // so it should fail, and we won't display an error message in that case. - if (locale !== "unknown") console.error(e); - } +if (typeof window !== "undefined") { + + packages.forEach((pkg) => { + locales.forEach((locale) => { + // Chinese-simplified is assigned a special file name by Weblate. + const localeFile = locale === "zh" ? "zh_Hans" : locale; + try { + messages[locale] = { + ...messages[locale], + ...flatten(require(`../packages/${pkg}/i18n/${localeFile}.yml`).default) + }; + } catch (e) { + // There is no yml files for the "unknown" locale, + // so it should fail, and we won't display an error message in that case. + if (locale !== "unknown") console.error(e); + } + }); }); -}); +} // TODO: place any applicable (date, time, etc) format parameters here. const formats = {}; From f606ce8063a389508f6593a78dd4f4abdfe48337 Mon Sep 17 00:00:00 2001 From: miles-grant-ibigroup Date: Thu, 3 Oct 2024 07:38:34 -0400 Subject: [PATCH 33/36] chore: update snapshots --- .../__snapshots__/PrintableItinerary.story.tsx.snap | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/packages/printable-itinerary/src/__snapshots__/PrintableItinerary.story.tsx.snap b/packages/printable-itinerary/src/__snapshots__/PrintableItinerary.story.tsx.snap index 47179f0a6..540f7f276 100644 --- a/packages/printable-itinerary/src/__snapshots__/PrintableItinerary.story.tsx.snap +++ b/packages/printable-itinerary/src/__snapshots__/PrintableItinerary.story.tsx.snap @@ -3095,10 +3095,7 @@ exports[`PrintableItinerary TncTransitItinerary smoke-test 1`] = `
      - Walk to - - W Burnside & SW 6th - + Transfer, wait 1 min
      @@ -3161,10 +3158,7 @@ exports[`PrintableItinerary TncTransitItinerary smoke-test 1`] = `
      - Walk to - - East Burnside Street - + Transfer, wait 1 min
      From a8594cffb2a8f92a33f253456f2f17f1bf7a764f Mon Sep 17 00:00:00 2001 From: miles-grant-ibigroup Date: Thu, 3 Oct 2024 07:49:27 -0400 Subject: [PATCH 34/36] refactor: add potential pitfall TODO --- packages/itinerary-body/src/defaults/access-leg-description.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/itinerary-body/src/defaults/access-leg-description.tsx b/packages/itinerary-body/src/defaults/access-leg-description.tsx index 2d02a6df0..6ac1ba261 100644 --- a/packages/itinerary-body/src/defaults/access-leg-description.tsx +++ b/packages/itinerary-body/src/defaults/access-leg-description.tsx @@ -89,6 +89,8 @@ export default function AccessLegDescription({ ); + // TODO: is this causing issues with TNC legs? Do walk legs leading to a TNC + // trip really have the same `to.stopId` as `from.stopId`? const isTransferLeg = leg.to.stopId === leg.from.stopId; return ( // Return an HTML element which is passed a className (and style props) From a80bdd3fba8ddefe90a54de80213674460123670 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 3 Oct 2024 13:41:35 +0000 Subject: [PATCH 35/36] chore(release): 6.0.1 [skip ci] # [@opentripplanner/itinerary-body-v6.0.1](https://github.com/opentripplanner/otp-ui/compare/@opentripplanner/itinerary-body-v6.0.0...@opentripplanner/itinerary-body-v6.0.1) (2024-10-03) ### Bug Fixes * add transfer leg support ([cfc32cb](https://github.com/opentripplanner/otp-ui/commit/cfc32cbaf362fd3b015734123b2300ec05ec1b30)) --- packages/itinerary-body/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/itinerary-body/package.json b/packages/itinerary-body/package.json index 30c16119d..dd89f2184 100644 --- a/packages/itinerary-body/package.json +++ b/packages/itinerary-body/package.json @@ -1,6 +1,6 @@ { "name": "@opentripplanner/itinerary-body", - "version": "6.0.0", + "version": "6.0.1", "description": "A component for displaying an itinerary body of a trip planning result", "main": "lib/index.js", "module": "esm/index.js", From ce5a8f59c1300775c2a17585ebe27376ca2c047f Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 7 Oct 2024 16:34:49 +0000 Subject: [PATCH 36/36] chore(release): 4.1.0 [skip ci] # [@opentripplanner/trip-form-v4.1.0](https://github.com/opentripplanner/otp-ui/compare/@opentripplanner/trip-form-v4.0.0...@opentripplanner/trip-form-v4.1.0) (2024-10-07) ### Bug Fixes * **AMSB-story:** add support for onAllSubmodesDisabled prop ([d5680c6](https://github.com/opentripplanner/otp-ui/commit/d5680c6643802e91879283589b757e3acd9295af)) * **i18n:** remove unused string ([89e8c48](https://github.com/opentripplanner/otp-ui/commit/89e8c48302b36dfd7f473e85c0fd3ca9bf25d059)) * **subsetting-pane:** check if subsetting adds a transport mode ([b800d70](https://github.com/opentripplanner/otp-ui/commit/b800d707435966c73fe71aedf2d761bc830dd695)) * **subsettings-pane:** handle change when all settings that add a transport mode are false ([7f4c816](https://github.com/opentripplanner/otp-ui/commit/7f4c816c0edb2dcca8718f5fab9d1e1a6451e325)) * **subsettings-pane:** move const outside of callback ([5ba1bb3](https://github.com/opentripplanner/otp-ui/commit/5ba1bb3a69a5c4c3806d5cfa1571d78ba1935e63)) * **subsettings-pane:** only reset submodes if onAllSubmodesDisabled prop is present ([acd40ec](https://github.com/opentripplanner/otp-ui/commit/acd40eca9ad29943ce8fd6ce515e05002ad32f48)) * **subsettings-pane:** sort props ([46ee93f](https://github.com/opentripplanner/otp-ui/commit/46ee93f16767e19b57159f59d05458ce2f033f50)) ### Features * **trip-form:** add callback for disabling all submodes ([b73aaba](https://github.com/opentripplanner/otp-ui/commit/b73aabab901c62da77d57a1f349692db18f2d784)) --- packages/trip-form/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/trip-form/package.json b/packages/trip-form/package.json index 94d7b01d3..b03b085ce 100644 --- a/packages/trip-form/package.json +++ b/packages/trip-form/package.json @@ -1,6 +1,6 @@ { "name": "@opentripplanner/trip-form", - "version": "4.0.0", + "version": "4.1.0", "description": "Trip Settings Form and Related Components", "author": "@binh-dam-ibigroup", "homepage": "https://github.com/opentripplanner/otp-ui/#readme",