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

Trip Preview #1272

Merged
merged 21 commits into from
Oct 16, 2024
Merged

Trip Preview #1272

merged 21 commits into from
Oct 16, 2024

Conversation

binh-dam-ibigroup
Copy link
Collaborator

@binh-dam-ibigroup binh-dam-ibigroup commented Sep 11, 2024

Description

This PR adds a preview link to saved trips that opens a view similar to the print view, with just the map and the steps to take the trip.

Behind the scenes, a new SimpleMap component is extracted, without the user interactions, to which we can pass an itinerary for display in the trip preview (and later in the print view too).

PR Checklist

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

Saved Trip List with preview (map icon) link:
image

Trip Preview:
image

@daniel-heppner-ibigroup
Copy link
Contributor

Is this ready for review?

@binh-dam-ibigroup
Copy link
Collaborator Author

@miles-grant-ibigroup Here is what aligning the "preview" link to the route numbers would look like...

image

@binh-dam-ibigroup
Copy link
Collaborator Author

@miles-grant-ibigroup Here is what aligning the "preview" link to the route numbers would look like...

image

I am not going to implement it because (i) the multiple vertical alignments look untidy and (ii) the preview link may missed if many transit symbols are rendered.

@binh-dam-ibigroup binh-dam-ibigroup marked this pull request as ready for review October 1, 2024 23:06
@binh-dam-ibigroup
Copy link
Collaborator Author

Is this ready for review?

@daniel-heppner-ibigroup This is ready for review!

@miles-grant-ibigroup
Copy link
Collaborator

@miles-grant-ibigroup Here is what aligning the "preview" link to the route numbers would look like...

image

I have a vision of like a looking glass before the icons but it's good enough for now. This thing isn't on by default is it?

@binh-dam-ibigroup
Copy link
Collaborator Author

@miles-grant-ibigroup Here is what aligning the "preview" link to the route numbers would look like...
image

I have a vision of like a looking glass before the icons but it's good enough for now. This thing isn't on by default is it?

It will be available to all deployments.

Copy link
Contributor

@daniel-heppner-ibigroup daniel-heppner-ibigroup left a comment

Choose a reason for hiding this comment

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

Looking good! only style comments so approving.

lib/components/map/simple-map.tsx Outdated Show resolved Hide resolved
mapVisible?: boolean
}

class TripPreviewLayoutBase extends Component<Props, State> {
Copy link
Contributor

Choose a reason for hiding this comment

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

What was the reason behind going for a class component here rather than a function component?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy/paste is the reason...

lib/components/map/simple-map.tsx Show resolved Hide resolved
lib/components/map/simple-map.tsx Outdated Show resolved Hide resolved
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.

Looks and works great! One small question but nothing blocking

@binh-dam-ibigroup binh-dam-ibigroup merged commit e5a4356 into dev Oct 16, 2024
9 checks passed
@binh-dam-ibigroup binh-dam-ibigroup deleted the trip-preview branch October 16, 2024 17:06
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