Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fare Table comaptibility with OTP2 FareProduct API #612

Conversation

daniel-heppner-ibigroup
Copy link
Contributor

No description provided.

BREAKING CHANGE: Removes old getTransitFare() function
Fare data is now stored on the legs themselves, so it’s not necessary to pass it around on its own
BREAKING CHANGE: removes support for REST data in FareTable
@miles-grant-ibigroup
Copy link
Collaborator

Because of some internal dependency complications, we had to undo this change. We instead will have to merge all this first and then create a follow up PR that removes depending on alpha versions

@binh-dam-ibigroup
Copy link
Collaborator

Please first create two separate PRs for these packages:

  • types
  • core-utils

The types PR should contain a breaking change commit.

@binh-dam-ibigroup
Copy link
Collaborator

Because of some internal dependency complications, we had to undo this change. We instead will have to merge all this first and then create a follow up PR that removes depending on alpha versions

Ok. Still needs a breaking change to the types package.

BREAKING CHANGE: Removes support for older OTP1/REST legs
@daniel-heppner-ibigroup
Copy link
Contributor Author

Because of some internal dependency complications, we had to undo this change. We instead will have to merge all this first and then create a follow up PR that removes depending on alpha versions

Ok. Still needs a breaking change to the types package.

Great point, I cherry picked my breaking change commit over to this PR now for types.

Copy link
Collaborator

@binh-dam-ibigroup binh-dam-ibigroup left a comment

Choose a reason for hiding this comment

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

See comment for types and core-utils packages (more comments to come)

packages/types/src/index.ts Show resolved Hide resolved
packages/types/src/index.ts Outdated Show resolved Hide resolved
packages/types/src/index.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@binh-dam-ibigroup binh-dam-ibigroup left a comment

Choose a reason for hiding this comment

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

Needs a few more breaking change commits and some cleanup. Also, fares are no longer shown for the regular transit legs and for http://localhost:5555/?path=/story/tripdetails--fare-components-itinerary&globals=locale:en-US and http://localhost:5555/?path=/story/itinerarybody-otp-react-redux--individual-leg-fare-components&globals=locale:en-US, so either the fares should be shown, or the story title/contents should be updated.

@@ -35,7 +35,6 @@ const ItineraryBody = ({
showElevationProfile,
showLegIcon,
showMapButtonColumn = true,
showRouteFares,
Copy link
Collaborator

Choose a reason for hiding this comment

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

There should be a breaking change commit to the itinerary-body package.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also remove this prop from packages/itinerary-body/src/types.ts.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed and breaking change added in 48bdcc4.

packages/itinerary-body/src/TransitLegBody/index.tsx Outdated Show resolved Hide resolved
packages/itinerary-body/src/TransitLegBody/index.tsx Outdated Show resolved Hide resolved
@@ -150,7 +140,8 @@ class TransitLegBody extends Component<Props, State> {
timeZone,
TransitLegSubheader,
TransitLegSummary,
transitOperator
transitOperator,
defaultFareSelector
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sort props.

</S.TransitLegExpandedBody>
</AnimateHeight>

{legCost && (
Copy link
Collaborator

Choose a reason for hiding this comment

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

Was there a request for moving the fare out of the expanding section?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, that was a mistake.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did some work to fix the fares displaying in the itinerary body. Lots of prop drilling, we should return to clean this up.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also includes breaking change for itinerary-body.

packages/trip-details/src/index.tsx Outdated Show resolved Hide resolved
packages/trip-details/src/types.ts Outdated Show resolved Hide resolved
export interface TransitFareProps {
fareKey: string;
headerKey: string;
fareMediumId: string
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sort props. There should be a breaking change commit for the trips-detail package for the props removed.

packages/trip-details/src/types.ts Outdated Show resolved Hide resolved
packages/trip-details/src/utils.tsx Outdated Show resolved Hide resolved
Copy link
Collaborator

@binh-dam-ibigroup binh-dam-ibigroup left a comment

Choose a reason for hiding this comment

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

Much cleaner now. See the few more items. Thanks for the changes!

@daniel-heppner-ibigroup daniel-heppner-ibigroup merged commit 638a8e8 into opentripplanner:master Jul 12, 2023
2 checks passed
@daniel-heppner-ibigroup daniel-heppner-ibigroup deleted the otp2-fare-products-table branch July 12, 2023 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants