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

Itinerary Body: migrate to OTP2 trip props #640

Merged

Conversation

miles-grant-ibigroup
Copy link
Collaborator

The OTP1 trip props are no longer in use, and are fundamentally incompatible with the OTP2 props. This PR resolves this incongruity.

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.

I smell a breaking change so it will require a breaking change commit. To avoid a breaking change, fall back on fromIndex and toIndex if fromStopId and toStopId are not provided.

@miles-grant-ibigroup
Copy link
Collaborator Author

I think we have to make a breaking change. OTP1 is no longer supported, so it makes no sense to support it here. I will modify the commit message

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.

Could you update the mocks for the "Individual Leg Fare Components" to have fromStopId and toStopId?

packages/itinerary-body/src/TransitLegBody/index.tsx Outdated Show resolved Hide resolved
packages/itinerary-body/src/types.ts 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.

@miles-grant-ibigroup
Copy link
Collaborator Author

Updating the mocks would be a 2-release process...

@binh-dam-ibigroup
Copy link
Collaborator

Updating the mocks would be a 2-release process...

Why? The mocks are in the itinerary-body package.

@miles-grant-ibigroup
Copy link
Collaborator Author

Updating the mocks would be a 2-release process...

Why? The mocks are in the itinerary-body package.

Wait sorry, I got myself confused. Mocks are updated

@miles-grant-ibigroup
Copy link
Collaborator Author

I'm not sure what's going on... The new mocks aren't showing up in the GitHub diffs either, but they are showing up in my local git commit history

@miles-grant-ibigroup
Copy link
Collaborator Author

Looks like everything is updated now, please try again @binh-dam-ibigroup

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.

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.

LGTM, sorry for the confusion!

Copy link
Contributor

@daniel-heppner-ibigroup daniel-heppner-ibigroup left a comment

Choose a reason for hiding this comment

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

I think the types could use some work, but this looks good... Thanks!

leg?.trip?.arrivalStoptime?.stopPosition
}
toIndex={leg.to?.stopIndex}
toStopId={leg?.to?.stopId}
Copy link
Contributor

Choose a reason for hiding this comment

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

unneeded question mark

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What happens if there is no to?

leg?.trip?.departureStoptime?.stopPosition
}
fromIndex={leg.from?.stopIndex}
fromStopId={leg?.from?.stopId}
Copy link
Contributor

Choose a reason for hiding this comment

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

unneded question mark

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What happens if there is no from

@miles-grant-ibigroup miles-grant-ibigroup merged commit 8eb78bb into opentripplanner:master Sep 11, 2023
2 checks passed
@miles-grant-ibigroup miles-grant-ibigroup deleted the otp2-trip-migration branch September 11, 2023 17:46
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.

4 participants