Skip to content
This repository has been archived by the owner on Dec 7, 2021. It is now read-only.

refactor(app.js): Migrate to @opentripplanner icons #260

Merged
merged 16 commits into from
Jul 1, 2020

Conversation

binh-dam-ibigroup
Copy link
Contributor

@binh-dam-ibigroup binh-dam-ibigroup commented May 11, 2020

This PR migrates trimet-mod-otp to use the new @opentripplanner icon sets.
What changes (breaking):

  • The configure() function in config.js now defines:
    • A new ModeIcon attribute that sets the icon set for the transit mode selection pane.
    • A new LegIcon attribute that replaces applyCustomIconLogic and contains custom logic to determine icons based on travel leg.
  • The old customIcons are entirely removed.

Now depends on #265 .

@binh-dam-ibigroup binh-dam-ibigroup marked this pull request as ready for review May 11, 2020 22:35
lib/config.js Outdated Show resolved Hide resolved
@binh-dam-ibigroup
Copy link
Contributor Author

Also @landonreed or @evansiroky, I had to regenerate yarn.lock or I would get an error involving the moment package. Let me know if you are luckier regarding that.

lib/config.js Outdated Show resolved Hide resolved
lib/app.js Outdated Show resolved Hide resolved
lib/app.js Outdated Show resolved Hide resolved
lib/app.js Show resolved Hide resolved
Copy link
Contributor

@landonreed landonreed left a comment

Choose a reason for hiding this comment

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

This still splits the icon config stuff up quite a bit. Can we just consolidate icon config in config.js and leave the rest out?

@landonreed
Copy link
Contributor

CSS issues:

Destination icon is incorrect (should be double ring)

image

TriMet rose is too large in mode icon

image

Exclusive modes should be centered

image

radio button selections are not blue (here and in date/time)

image

@binh-dam-ibigroup
Copy link
Contributor Author

That's a caveat of using the OTP-UI library. The default OTP-RR is ported over, so to avoid that you need to compile the desired style into OTP-RR before hand.

@landonreed
Copy link
Contributor

I'm seeing a prop warning when I plan a trip: trip plan

image

@landonreed
Copy link
Contributor

It looks like the arrow for the collapsible div for walking directions doesn't toggle up/down like it should:
image

@binh-dam-ibigroup
Copy link
Contributor Author

@landonreed, I think we have now a pretty good visual parity between the two with my latest changes to opentripplanner/otp-react-redux#150.

image

package.json Outdated Show resolved Hide resolved
lib/app.js Outdated Show resolved Hide resolved
lib/config-example.js Outdated Show resolved Hide resolved
… config.js.

BREAKING CHANGE: ustomIcons previously defined in config.yml must be moved into custom ModeIcon or
custom LegIcon components that you define in config.js.
Copy link
Contributor

@landonreed landonreed left a comment

Choose a reason for hiding this comment

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

Looks good! But let's be sure not to merge into master until the otp-rr release is performed and fully tested. In fact, I think it might actually be good to change the base branch from master to otp-ui-refactor (which should be branched from master).

@landonreed landonreed removed their assignment Jun 1, 2020
lib/config.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@evansiroky evansiroky left a comment

Choose a reason for hiding this comment

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

See most recent comment (#260 (comment)). Also, there are merge conflicts.

@evansiroky evansiroky removed their assignment Jun 3, 2020
@binh-dam-ibigroup binh-dam-ibigroup added the BLOCKED Issue is blocked pending resolution of another issue. label Jun 16, 2020
@binh-dam-ibigroup
Copy link
Contributor Author

Blocked pending action on opentripplanner/otp-react-redux#171.

@binh-dam-ibigroup binh-dam-ibigroup removed the BLOCKED Issue is blocked pending resolution of another issue. label Jun 23, 2020
@binh-dam-ibigroup binh-dam-ibigroup changed the base branch from master to with-otp-ui-refactor June 23, 2020 19:54
Copy link
Collaborator

@evansiroky evansiroky left a comment

Choose a reason for hiding this comment

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

Why is the branch changed to with-otp-ui-refactor? Can't we just use master for this?

@binh-dam-ibigroup binh-dam-ibigroup added the BLOCKED Issue is blocked pending resolution of another issue. label Jun 30, 2020
@binh-dam-ibigroup
Copy link
Contributor Author

Blocking, awaiting #265.

@binh-dam-ibigroup binh-dam-ibigroup merged commit b86a587 into with-otp-ui-refactor Jul 1, 2020
@binh-dam-ibigroup binh-dam-ibigroup deleted the with-custom-icons branch July 1, 2020 16:13
@binh-dam-ibigroup binh-dam-ibigroup restored the with-custom-icons branch July 1, 2020 16:13
@binh-dam-ibigroup binh-dam-ibigroup deleted the with-custom-icons branch July 1, 2020 16:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
BLOCKED Issue is blocked pending resolution of another issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants