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

[23022] TripKitUI refactor phase2 #187

Merged
merged 19 commits into from
Feb 25, 2025

Conversation

MichaelReyes
Copy link
Collaborator

Pull Request (PR) Checklist

Thank you for your contribution! Please confirm that you've checked all the boxes below before submitting your PR. Use [x] to check a box, e.g., [x], and make sure there's no space around the brackets.

PR Context

Changes

Describe your changes in detail, highlighting the problem it solves or the feature it adds.

  • [TripKit] update ScheduledStop to replace ArrayList with List
  • [TripKitUI] update tripKitUI build.gradle to add robolectric dependency for unit test
  • [TripKitUI] convert AlertMarkerIconFetcher.java to kotlin
  • [TripKitUI] update CreateMarkerForParking to add iconRes as parameter with default value for more flexible implementation
  • [TripKitUI] convert IconUtils.java to kotlin
  • [TripKitUI] convert ServiceStopMapFragment.java to kotlin
  • [TripKitUI] update ServiceStopMapViewModel to tag getStopForService as VisibleForTesting
  • [TripKitUI] update TimetableMapContributor to use subscribeWithErrorHandling extension for drawStops
  • [TripKitUI] add AlertMarkerIconFetcherTest
  • [TripKitUI] add CreateMarkerFoFacilityTest
  • [TripKitUI] add CreateMarkerForBikePodTest
  • [TripKitUI] add CreateMarkerForBikePodTest
  • [TripKitUI] add CreateMarkerForFreeFloatingLocationTest
  • [TripKitUI] add CreateMarkerForParkingTest
  • [TripKitUI] add CreateSegmentMarkersTest
  • [TripKitUI] add DefaultLoadPOILocationsByViewPortTest
  • [TripKitUI] add IconUtilsTest
  • [TripKitUI] add LoadBikePodsByViewPortTest
  • [TripKitUI] add LoadCarParksByViewPortTest
  • [TripKitUI] add LoadCarPodByViewPortTest
  • [TripKitUI] add LoadFacilitiesByViewPortTest
  • [TripKitUI] add ServiceStopMapViewModelTest
  • [TripKitUI] add ServiceStopMapViewModelTest
  • convert TripLocationMarkerCreator.java to kotlin
  • [TripKitUI] add GetTripLineTest
  • [TripKitUI] add LoadFreeFloatingVehiclesByViewPortTest
  • [TripKitUI] add LoadStopsByViewPortTest
  • [TripKitUI] add PinUpdateRepositoryImplTest
  • [TripKitUI] add SegmentMarkerMakerTest
  • [TripKitUI] add SegmentStopMarkerMakerTest
  • [TripKitUI] add ServiceAlertMarkerMakerTest
  • [TripKitUI] add StopMarkerViewModelTest
  • [TripKitUI] add TripLocationMarkerCreator
  • [TripKit] update RoutingResponse and Trip to use List instead of ArrayList
  • [TripKitUI] update TripResultMapContributor to add null checking for marker
  • [TripKitUI] update TripResultMapViewModel to tag the viewModels functions with VisibleForTesting for functions to test in unit test
  • [TripKitUI] convert TripVehicleMarkerCreator.java to kotlin
  • [TripKitUI] convert VehicleMarkerIconCreator.java to kotlin
  • [TripKitUI] convert VehicleMarkerIconFetcher.java to kotlin
  • [TripKit] update WaypointTask and WayPointTaskParam to use List for segments instead of ArrayList
  • [TripKit] convert IRealTimeElement.java to kotlin
  • [TripKit] update ScheduledStop to replace ArrayList usage to List
  • [TripKit] update TripSegment and update IRealTimeElement.kt overrides
  • [TripGov5] update FavoriteHomeItemManager to add null safety for stopList
  • [TripGov5] update FavoriteListViewModel to add null safety for stopList
  • [TripKitUI] update CursorToServiceConverter to update setting values to TimetableEntry
  • [TripKitUI] convert DeparturesResponse.java to kotlin
  • [TripKitUI] update FetchAndLoadTimetable to add null safety to empty string for serviceTripId
  • [TripKitUI] update FetchTimetable to add null safety to empty string for serviceTripId
  • [TripKitUI] update GetA2BTime to add null safety for startStop
  • [TripKitUI] update GetDirectionText to add null safety for startStop
  • [TripKitUI] update GetFrequencyText to add null safety for startStop
  • [TripKitUI] update GetOrdinaryTime to add null safety of startStop
  • [TripKitUI] convert LoadServiceTask.java to kotlin
  • [TripKitUI] convert MapMarkerUtils.java to kotlin
  • [TripKitUI] convert MarkerTarget.java to kotlin
  • [TripKitUI] update ServiceDetailFragment to add filter not null to alerts
  • [TripKitUI] update ServiceDetailViewModel to add null safety to empty for serviceTripId and startStopCode
  • [TripKitUI] update ServiceStopMapFragment to add null safety for serviceColor
  • [TripKitUI] update ServiceStopMarkerCreator to update getters for stopInfo variables
  • [TripKitUI] update ServiceViewModel to adjust onAlertsClick to use List instead of ArrayList
  • [TripKitUI] convert SimpleCalloutView.java to kotlin
  • [TripKitUI] convert StopInfo.java to kotlin
  • [TripKitUI] convert StopMarkerIconFetcher.java to kotlin
  • [TripKitUI] convert TimeLabelMaker.java to kotlin
  • [TripKitUI] convert TimetableEntry.java to kotlin
  • [TripKitUI] update TimetableHeaderLineItem.java to kotlin
  • [TripKitUI] update TimetableMapContributor to adjust null safety for serviceColor
  • [TripKitUI] update TimetableViewModel to use List instead of ArrayList
  • [TripKitUI] add PoiDetailsViewModelTest

Checklist for Reviewers

Documentation and Code Quality

  • KDocs Documentation: Are all changes, new functionalities, and classes documented with KDocs?
  • Architectural Patterns: Is there consistent and proper use of architectural patterns (e.g., MVVM, MVP)?

Testing and Reliability

  • Unit Testing: Are there unit tests for all new functionalities and classes?
  • Emulator and Real Device Testing: Has the application been tested on both emulators and real devices to ensure compatibility?

Error Handling and Logging

  • Error Handling: Are errors and exceptions caught and handled gracefully, ensuring the app remains stable?
  • Logging: Is there proper logging in place for critical errors and information, aiding in debugging and monitoring?

Testing Procedure

If applicable, provide steps or commands for testing your changes. This can help reviewers and testers.

Work-in-Progress (WIP)

List any remaining work or areas that need additional focus. This section can be updated as the work progresses.

  • [ ]
  • [ ]

Remember to keep this template updated based on the feedback and evolving project standards.

MichaelReyes and others added 11 commits January 31, 2025 02:47
- [TripKit] update ScheduledStop to replace ArrayList with List
- [TripKitUI] update tripKitUI build.gradle to add robolectric dependency for unit test
- [TripKitUI] convert AlertMarkerIconFetcher.java to kotlin
- [TripKitUI] update CreateMarkerForParking to add iconRes as parameter with default value for more flexible implementation
- [TripKitUI] convert IconUtils.java to kotlin
- [TripKitUI] convert ServiceStopMapFragment.java to kotlin
- [TripKitUI] update ServiceStopMapViewModel to tag getStopForService as VisibleForTesting
- [TripKitUI] update TimetableMapContributor to use subscribeWithErrorHandling extension for drawStops
- [TripKitUI] add AlertMarkerIconFetcherTest
- [TripKitUI] add CreateMarkerFoFacilityTest
- [TripKitUI] add CreateMarkerForBikePodTest
- [TripKitUI] add CreateMarkerForBikePodTest
- [TripKitUI] add CreateMarkerForFreeFloatingLocationTest
- [TripKitUI] add CreateMarkerForParkingTest
- [TripKitUI] add CreateSegmentMarkersTest
- [TripKitUI] add DefaultLoadPOILocationsByViewPortTest
- [TripKitUI] add IconUtilsTest
- [TripKitUI] add LoadBikePodsByViewPortTest
- [TripKitUI] add LoadCarParksByViewPortTest
- [TripKitUI] add LoadCarPodByViewPortTest
- [TripKitUI] add LoadFacilitiesByViewPortTest
- [TripKitUI] add ServiceStopMapViewModelTest
- [TripKitUI] add ServiceStopMapViewModelTest
- [TripKitUI] update tripkit-android submodule reference
- convert TripLocationMarkerCreator.java to kotlin
- add GetTripLineTest
- add LoadFreeFloatingVehiclesByViewPortTest
- add LoadStopsByViewPortTest
- add PinUpdateRepositoryImplTest
- add SegmentMarkerMakerTest
- add SegmentStopMarkerMakerTest
- add ServiceAlertMarkerMakerTest
- add StopMarkerViewModelTest
- add TripLocationMarkerCreator
- [TripKit] update RoutingResponse and Trip to use List instead of ArrayList
- [TripKitUI] update TripResultMapContributor to add null checking for marker
- [TripKitUI] update TripResultMapViewModel to tag the viewModels functions with VisibleForTesting for functions to test in unit test
- [TripKitUI] convert TripVehicleMarkerCreator.java to kotlin
- [TripKitUI] convert VehicleMarkerIconCreator.java to kotlin
- [TripKitUI] convert VehicleMarkerIconFetcher.java to kotlin
- [TripKit] update WaypointTask and WayPointTaskParam to use List for segments instead of ArrayList
- [TripKit] convert IRealTimeElement.java to kotlin
- [TripKit] update ScheduledStop to replace ArrayList usage to List
- [TripKit] update TripSegment and update IRealTimeElement.kt overrides
- [TripGov5] update FavoriteHomeItemManager to add null safety for stopList
- [TripGov5] update FavoriteListViewModel to add null safety for stopList
- [TripKitUI] update CursorToServiceConverter to update setting values to TimetableEntry
- [TripKitUI] convert DeparturesResponse.java to kotlin
- [TripKitUI] update FetchAndLoadTimetable to add null safety to empty string for serviceTripId
- [TripKitUI] update FetchTimetable to add null safety to empty string for serviceTripId
- [TripKitUI] update GetA2BTime to add null safety for startStop
- [TripKitUI] update GetDirectionText to add null safety for startStop
- [TripKitUI] update GetFrequencyText to add null safety for startStop
- [TripKitUI] update GetOrdinaryTime to add null safety of startStop
- [TripKitUI] convert LoadServiceTask.java to kotlin
- [TripKitUI] convert MapMarkerUtils.java to kotlin
- [TripKitUI] convert MarkerTarget.java to kotlin
- [TripKitUI] update ServiceDetailFragment to add filter not null to alerts
- [TripKitUI] update ServiceDetailViewModel to add null safety to empty for serviceTripId and startStopCode
- [TripKitUI] update ServiceStopMapFragment to add null safety for serviceColor
- [TripKitUI] update ServiceStopMarkerCreator to update getters for stopInfo variables
- [TripKitUI] update ServiceViewModel to adjust onAlertsClick to use List instead of ArrayList
- [TripKitUI] convert SimpleCalloutView.java to kotlin
- [TripKitUI] convert StopInfo.java to kotlin
- [TripKitUI] convert StopMarkerIconFetcher.java to kotlin
- [TripKitUI] convert TimeLabelMaker.java to kotlin
- [TripKitUI] convert TimetableEntry.java to kotlin
- [TripKitUI] update TimetableHeaderLineItem.java to kotlin
- [TripKitUI] update TimetableMapContributor to adjust null safety for serviceColor
- [TripKitUI] update TimetableViewModel to use List instead of ArrayList
- [TripKitUI] add PoiDetailsViewModelTest
@MichaelReyes MichaelReyes changed the title Task/23022 tripkitui refactor phase2 [23022] TripKitUI refactor phase2 Feb 5, 2025
- [TripKit] update TripSegment to fix failing unit test on TripSegmentTest due to missing setter on TripSegment serviceTripId
- [TripKit] update RoutingResponseTest to fix failing test due to expected data is wrong because the mock was updated
…phase2

# Conflicts:
#	TripKitAndroidUI/src/main/java/com/skedgo/tripkit/ui/timetables/TimetableMapContributor.kt
Copy link

github-actions bot commented Feb 6, 2025

❌ Unit tests failed!

@MichaelReyes, please review and fix the issues in the unit tests.

Test results are available under the "Artifacts" section of this run in GitHub Actions.

- [TripKitUI] Fix SegmentStopMarkerMakerTest
Copy link

github-actions bot commented Feb 9, 2025

✅ Unit tests passed successfully!

Test results are available under the "Artifacts" section of this run in GitHub Actions.

Please ensure the code is reviewed before proceeding with the merge.

- [TripKitUI] update ServiceDetailViewModel to update wrong time in service list in card by card mode
Copy link

❌ Unit tests failed!

@MichaelReyes, please review and fix the issues in the unit tests.

Test results are available under the "Artifacts" section of this run in GitHub Actions.

- [TripGov5] update tripkit-android-ui submodule reference
- [TripKitUI] update tripkit-android submodule reference
Copy link

❌ Unit tests failed!

@MichaelReyes, please review and fix the issues in the unit tests.

Test results are available under the "Artifacts" section of this run in GitHub Actions.

- [TripKit] route response test fix
- [TripKitUI] update tripkit-android submodule reference
Copy link

✅ Unit tests passed successfully!

Test results are available under the "Artifacts" section of this run in GitHub Actions.

Please ensure the code is reviewed before proceeding with the merge.

- [TripKitUI] update tripkit-android sub module reference
Copy link

✅ Unit tests passed successfully!

Test results are available under the "Artifacts" section of this run in GitHub Actions.

Please ensure the code is reviewed before proceeding with the merge.

@MichaelReyes MichaelReyes merged commit a76eab9 into develop Feb 25, 2025
1 check passed
@MichaelReyes MichaelReyes deleted the task/23022-tripkitui-refactor-phase2 branch February 25, 2025 09:34
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