-
Notifications
You must be signed in to change notification settings - Fork 35
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
Refactor ItineraryBody so it can be formatted like the original ItineraryBody in otp-react-redux #97
Refactor ItineraryBody so it can be formatted like the original ItineraryBody in otp-react-redux #97
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, of the 3 asks above, item 'a' would be the priority. This is what is being asked for the trimet.org redesign:
So for item a, there is a trip viewer with time and number of stops, but just no '| trip viewer' wording to the right of that. Also, the number of stops are in parens. My $0.02 is that parens are an improvement over the 'Ride 15 min / 13 stops' format in terms of readability. So desired Story would have '15-minute ride (13 stops) ▼' to match the mockup above (btw, 'Ride 15 min (13 stops)' would also be okay). Please feel free to use all wording / formatting from the design mockup, if you like .. or make changes based on potential translation / localization issues.
@fpurcell, the null values occurring while clicking on the destination happen because there isn't another leg that continues after the destination. Maybe I'll include another parameter that indicates that the item clicked is the destination. |
Yeah something. The clicking on that map icon in the itinerary is going to then be used to move the map to that location. So having a record with coords (or the leg index into the itinerary at least) available in the frameLeg() callback would be helpful, me thinks.... |
packages/itinerary-body/src/AccessLegBody/rented-vehicle-subheader.js
Outdated
Show resolved
Hide resolved
packages/itinerary-body/src/AccessLegBody/rented-vehicle-subheader.js
Outdated
Show resolved
Hide resolved
packages/itinerary-body/src/AccessLegBody/rented-vehicle-subheader.js
Outdated
Show resolved
Hide resolved
} | ||
|
||
LineColumnContent.propTypes = { | ||
/** whether this leg is an interlined-transit leg */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Capital W
@fpurcell Thanks for pointing that out. Yes, we are trying to frame the selected leg on the map. Taking a glance at the code in Evan's earlier commits, looks like we get both? I think we can definitely work w that 👍 |
What is the |
- refactor props and various downstream components to use isDestination - include isDestination and place in frameLeg callback - remove routingType prop - remove duplicate documentation of props in place-row
- add prop showViewTripButton - move components devoted to story to demos story - improve stories to show items requested in opentripplanner#97 (review)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now, there is one comment on the rental vehicle description that should be moved. Other comments are more formatting/style related.
@binh-dam-ibigroup, there is no custom font present. The differences in font are due to default browser styling rules. It is generally expected that implementers will define fonts at a higher level than just this component. |
I believe I've addressed most of the comments here. @fpurcell, regarding your requests, here is what I have done:
See story titled
See story titled
See story titled
The frameLeg callback now also sends the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fabulous work, Evan. Thanks for all the work, and demo'ing different style options in the Stories.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one last validation error then I think it should be good to go.
@binh-dam-ibigroup, see latest commit. |
This PR adds and refactors a bunch of stuff so that the ItineraryBody component can be styled and rendered as close as possible to the original ItineraryBody component in otp-react-redux. This also introduces some breaking changes to improve code maintenance and avoid loading unnecessary components.
frameLeg
function (fixes Pass the leg index into frameLeg callback #94).