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

DT-6564 Navigator journey end modal #5187

Merged
merged 19 commits into from
Dec 10, 2024
Merged

DT-6564 Navigator journey end modal #5187

merged 19 commits into from
Dec 10, 2024

Conversation

partisaani
Copy link
Contributor

@partisaani partisaani commented Dec 4, 2024

Proposed Changes

Adds a Navigator journey end signaling modal

journey-end.mp4

Pull Request Check List

  • A reasonable set of unit tests is included
  • Console does not show new warnings/errors
  • Changes are documented or they are self explanatory
  • This pull request does not have any merge conflicts
  • All existing tests pass in CI build

Review

  • Read and verify the code changes. I suggest a commit-by-commit review
  • Test the functionality by running the UI locally with all popular browsers available in your platform
  • Check that the implementation matches the design, when such one is defined in a Jira issue
  • Merge the pull request

@partisaani partisaani self-assigned this Dec 4, 2024
@partisaani partisaani changed the title Dt 6564 DT-6564 Navigator journey end modal Dec 4, 2024
Copy link
Member

@vesameskanen vesameskanen left a comment

Choose a reason for hiding this comment

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

Mostly clean code and good refactoring, but handling of currentLeg concept probably requires further effort.

Comment on lines 191 to 192
firstLeg: realTimeLegs?.[0],
lastLeg: realTimeLegs?.[realTimeLegs.length - 1],
Copy link
Member

Choose a reason for hiding this comment

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

I am not totally against this but why to pass first and last leg as a prop? Indexing the array is not that expensive or complicated.

Note that these legs are not consistently used in NaviContainer or NavicardContainer.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To centralize the deduction logic instead of having identical pieces of logic in multiple components. Thus, useRealtimeLegs becomes responsible for correctness of data from there on out.

app/component/itinerary/navigator/hooks/useRealtimeLegs.js Outdated Show resolved Hide resolved
app/component/itinerary/navigator/hooks/useRealtimeLegs.js Outdated Show resolved Hide resolved
app/component/itinerary/navigator/NaviContainer.js Outdated Show resolved Hide resolved
Comment on lines 753 to +754
navigationLogo: 'hsl/navigator-logo.svg',
thumbsUpGraphic: 'hsl/thumbs-up.svg',
Copy link
Member

Choose a reason for hiding this comment

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

We are currently using our icons insvg-sprite.hsl.svgand svg-sprite.default.svg We should move these icons there. Using a same key would render different images based on what instance is running.(And none if there is no corresponding icon, but may throw an error, not sure)

I highly suspect we would want images for other instances as well, even though they are yet to be designed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd say this is out of scope of this PR

@Antiik91
Copy link
Member

Antiik91 commented Dec 9, 2024

There is a bug. where user cannot pan the map or zoom in/out.

@partisaani
Copy link
Contributor Author

partisaani commented Dec 9, 2024

There is a bug. where user cannot pan the map or zoom in/out.

Inspecting this at the moment

vesameskanen

This comment was marked as duplicate.

Copy link
Member

@vesameskanen vesameskanen left a comment

Choose a reason for hiding this comment

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

NaviContainer indexes leg array instead of using lastLeg

@partisaani
Copy link
Contributor Author

Gah! Will fix.

@vesameskanen vesameskanen merged commit 3a022a3 into v3 Dec 10, 2024
6 checks passed
@vesameskanen vesameskanen deleted the DT-6564 branch December 10, 2024 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants