Skip to content

Conversation

@AvivAbachi
Copy link
Collaborator

@AvivAbachi AvivAbachi commented Jul 24, 2025

refactor: update vehicle location handling and API integration

  • Refactored vehicle location data structures to use SiriVehicleLocationWithRelatedPydanticModel.
  • Updated API calls in gtfsService and siriService to accept optional parameters.
  • Removed the VehicleLocation model and adjusted related components to align with the new structure.
  • Enhanced the useVehicleLocations hook to improve data fetching and state management.
  • Updated map-related components and storybook data to reflect the new data model.
  • Adjusted tests to accommodate changes in vehicle location handling.

- Refactored vehicle location data structures to use SiriVehicleLocationWithRelatedPydanticModel.
- Updated API calls in gtfsService and siriService to accept optional parameters.
- Removed the VehicleLocation model and adjusted related components to align with the new structure.
- Enhanced the useVehicleLocations hook to improve data fetching and state management.
- Updated map-related components and storybook data to reflect the new data model.
- Adjusted tests to accommodate changes in vehicle location handling.
@AvivAbachi AvivAbachi requested a review from NoamGaash July 24, 2025 17:18
…and correct ride ID reference in LineProfileRide
…mit reduction

- Reduced the LIMIT for vehicle location requests from 10,000 to 1,000.
- Enhanced the loadData method to accept an AbortSignal for better request management.
- Updated fetchWithQueue to handle the AbortSignal, allowing for cancellation of requests.
- Modified the LocationObservable constructor to include signal handling.
Copy link
Member

@NoamGaash NoamGaash left a comment

Choose a reason for hiding this comment

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

that's a good change - thank you!
I'm just concerned about the potential performance impact when we use objects instead of primitives as react dependencies, but everything else seems amazing 👍

…bers

- Changed the vehicle location request parameters from dayjs objects to timestamps (numbers).
- Updated related functions and hooks to handle the new timestamp format.
- Ensured compatibility with existing components by adjusting how timestamps are processed and displayed.
Copy link
Member

@NoamGaash NoamGaash left a comment

Choose a reason for hiding this comment

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

👏

…r handling

- Replaced `getRoutesAsync` with `getGTFSRoutes` across various components and hooks for consistency.
- Updated route fetching to accept parameters as objects, improving flexibility and readability.
- Adjusted related components to handle new parameter structure, ensuring compatibility with existing functionality.
- Increased vehicle location request limit from 1,000 to 10,000 for improved data retrieval.
@github-actions
Copy link
Contributor

github-actions bot commented Aug 10, 2025

@AvivAbachi AvivAbachi changed the title refactor: update vehicle location handling and API integration pref: improve vehicle location preformed and API integration Aug 19, 2025
@AvivAbachi AvivAbachi changed the title pref: improve vehicle location preformed and API integration perf: improve vehicle location performance and API integration Aug 19, 2025
@AvivAbachi
Copy link
Collaborator Author

@NoamGaash I think to improve the map performance on the client side, we need to move the map to WebGL Maps.

@AvivAbachi AvivAbachi marked this pull request as draft October 28, 2025 20:51
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