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

Nearby view support (types) #681

Conversation

daniel-heppner-ibigroup
Copy link
Contributor

This PR adds the necessary properties to the types for the nearby view.

@daniel-heppner-ibigroup
Copy link
Contributor Author

I'm thinking maybe instead of gtfsId we should just use id and rename the property in the query. We seem to have a mix though in the app, and should probably standardize. Thoughts?

name: string;
routes?: Route[];
gtfsId: string;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sort props

@@ -473,10 +486,11 @@ export type Stop = {
dist?: number;
geometries?: { geoJson?: GeoJSON.Polygon };
id: string;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Consider adding a type alias per https://github.com/opentripplanner/otp-ui/pull/655/files#r1387985351 if we are to avoid breaking compatibility in a whole bunch of packages in #655.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Very good suggestion, thank you

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.

Small fixes, nothing serious

@@ -460,6 +473,8 @@ export type StopLayerStop = LayerEntity & {
name: string;
};

export type StopEventHanlder = (stop: Stop | { stopId: string }) => void;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Typo Handler

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thnx

Comment on lines 492 to 493
lat?: number;
lon?: number;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are these marked optional?

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 added them to make something work I think, but we should probably remove them and just expect these fields to always be there.

@daniel-heppner-ibigroup daniel-heppner-ibigroup merged commit fb33beb into opentripplanner:master Nov 10, 2023
2 checks passed
@daniel-heppner-ibigroup daniel-heppner-ibigroup deleted the nearby-view-support-types branch November 10, 2023 20:53
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