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

improvement(apiv2): use the OTP-UI conversion utility for legacy format #991

Merged
merged 5 commits into from
Sep 6, 2023

Conversation

daniel-heppner-ibigroup
Copy link
Contributor

Description:
Uses the OTP-UI utility function to convert new OTP response into old for use in the app.

PR Checklist:

  • Does the code follow accessibility standards (WCAG 2.1 AA Compliant)?
  • Are all languages supported (Internationalization/Localization)?
  • Are appropriate Typescript types implemented?

@daniel-heppner-ibigroup
Copy link
Contributor Author

Didn't realize the Percy tests broke on this.

@@ -962,7 +922,7 @@ export function routingQuery(searchId = null, updateSearchInReducer) {
const withCollapsedShortNames =
response.data?.plan?.itineraries?.map((itin) => ({
...itin,
legs: itin.legs?.map(processLeg)
legs: itin.legs?.map(convertGraphQLResponseToLegacy)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is great. Could you also update the dependencies to use core-utils 11.0.2 when it gets published?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, makes sense to roll that into this

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.

Seems to work!

Copy link
Collaborator

@miles-grant-ibigroup miles-grant-ibigroup left a comment

Choose a reason for hiding this comment

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

No regressions! Thanks for the changes

@daniel-heppner-ibigroup daniel-heppner-ibigroup deleted the use-otp-ui-gql-conversion branch September 6, 2023 07:40
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