Skip to content

Conversation

@miles-grant-ibigroup
Copy link
Collaborator

@miles-grant-ibigroup miles-grant-ibigroup commented Sep 17, 2021

This PR depends on opentripplanner/otp-ui#289 to render the labels. Until these updates are released, imports (and therefore tests) will fail.

Adds labels to legs if they are provided by OTP, and generates a combined score for the itinerary
Screen Shot 2021-09-17 at 3 09 12 PM

@miles-grant-ibigroup miles-grant-ibigroup self-assigned this Sep 17, 2021
@miles-grant-ibigroup miles-grant-ibigroup added BLOCKED Blocked (waiting on another PR to be merged) WIP Work in progress labels Sep 17, 2021
@miles-grant-ibigroup miles-grant-ibigroup removed WIP Work in progress BLOCKED Blocked (waiting on another PR to be merged) labels Sep 27, 2021
@miles-grant-ibigroup miles-grant-ibigroup marked this pull request as ready for review September 27, 2021 07:18
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.

The accessibility label texts need to support i18n.

miles-grant-ibigroup and others added 3 commits October 1, 2021 10:13
Co-authored-by: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com>
@miles-grant-ibigroup miles-grant-ibigroup added the BLOCKED Blocked (waiting on another PR to be merged) label Oct 1, 2021
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.

One more minor comment for now.

@miles-grant-ibigroup miles-grant-ibigroup removed the BLOCKED Blocked (waiting on another PR to be merged) label Oct 18, 2021
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.

Please update the OTP-UI package versions for this PR.

@miles-grant-ibigroup
Copy link
Collaborator Author

miles-grant-ibigroup commented Oct 27, 2021

Good catch Binh thanks! Totally slipped off my radar. Packages are updated and behavior seems to work!

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.

One last change on the message id for the accessibility text.

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.

In example-config.yml, please move the accessibility localized text to be a child of the config section before merging.

Copy link
Contributor

@philip-cline philip-cline left a comment

Choose a reason for hiding this comment

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

Looks great to me, just one small comment about file structure.

/**
* Determine if an itinerary has accessibility scores
*/
export const itineraryHasAccessibilityScores = (itinerary) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

For the i18n work, I was organising util functions into lib/util, and utility components like FormattedDuration into lib/components/util. Should these be moved to lib/util?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Good point, if the function is used from multiple files then it should go to lib/util, if not, it should become private to this file.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sorry I was merging too many things this morning and accidentally forgot about this! Very sorry. The fix is in #487

@miles-grant-ibigroup miles-grant-ibigroup merged commit 19627ac into dev Nov 2, 2021
@miles-grant-ibigroup miles-grant-ibigroup deleted the accessibility-routing branch November 2, 2021 08:56
@github-actions
Copy link
Contributor

🎉 This PR is included in version 3.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants