onebusaway-android
onebusaway-android copied to clipboard
Allow saving planned trips
Summary:
From user:
i love this feature to plan trips can there be a future feauture to save planned trips?
Saving planned trips allows users to quickly see real-time info along their entire trip
Steps to reproduce:
- Plan a trip
Expected behavior:
Allow me to save that trip, and plan a future trip using that same origin/destination
Observed behavior:
I can't save my origin and destination to use in a future trip plan
Device and Android version:
N/A
Hi Sean, I would like to attempt to add this feature.
Hi, I came across this issue and would love to work on it. Saving planned trips seems like a valuable feature, and I’d like to implement it. Could you confirm if this is still relevant and assign it to me?
Thanks!
@Akshatb2006 you can work on that but you can first write a technical plan for that would be great!
Technical Plan: Saved Planned Trips Feature
User Flow
- Plan a Trip: User plans a trip (origin → destination).
- Save Trip Option: User sees an option to "Save Trip" on the trip details page.
- Access Saved Trips: Saved trips are accessible via a "Saved Trips" section in the app.
-
Use Saved Trips: Users can:
- Select a saved trip.
- View real-time updates (e.g., delays, arrival times).
- Reuse the trip to plan another journey.
Feature Overview
The "Save Planned Trips" feature will:
- Allow users to save a planned trip (including origin, destination, travel time, and trip preferences).
- Display saved trips in a user-accessible list or dashboard.
- Provide real-time updates (e.g., delays, disruptions, or route changes) for saved trips.
- Enable users to modify or delete saved trips as needed.
Key Components
1. Frontend Changes
Save Trip UI
- Add a "Save Trip" button to the trip planning interface.
- Display saved trips in a dedicated section (e.g., "Saved Trips" menu or dashboard).
Manage Saved Trips
- Allow users to:
- View saved trips.
- Edit, delete, or activate saved trips.
- Include a real-time status indicator for each saved trip when activated.
2. Backend Changes
Trip Data Storage
Design a database schema to store saved trips for each user. Suggested fields:
- trip_id: Unique identifier for the trip.
- user_id: Reference to the user saving the trip.
- origin: Starting location.
- destination: Ending location.
- trip_preferences: Options like preferred modes of transportation, travel time, etc.
- timestamp: Time of creation.
API Endpoints
Develop RESTful API endpoints:
-
Save a Trip:
POST /api/trips/save
-
Fetch Saved Trips:
GET /api/trips
-
Edit a Saved Trip:
PUT /api/trips/{trip_id}
-
Delete a Saved Trip:
DELETE /api/trips/{trip_id}
-
Activate a Saved Trip for Real-Time Updates:
POST /api/trips/{trip_id}/activate
3. Real-Time Updates
- Integrate the existing trip planner's real-time API to fetch updates for active saved trips.
- Use WebSockets or push notifications to notify users about:
- Disruptions.
- Delays.
- Route changes.
Future Enhancements
-
Multiple Saved Trips:
Currently, the "Save Trips" feature will allow saving only one trip. Based on its success and user reviews, we can expand this feature to support multiple trips in the future. -
Enhanced Management Options:
Add advanced filtering, sorting, and sharing options for saved trips.
Collaboration and Timeline
-
Complexity of the Issue:
Since this is a large and complex feature, it might take significant time to implement. -
Team Collaboration:
If possible, we can schedule a meeting to discuss the implementation in detail. Alternatively, the task can be assigned to multiple contributors to work collaboratively.
@Akshatb2006 please don't put a meeting on my calendar to discuss bugs.
Hi, I came across this issue and reviewed the technical plan. I’d like to work on it and collaborate with @akshatb2006. Could you please assign the task to both of us?
Thankyou!!
Hi @amrhossamdev
I shared my technical plan for this issue three weeks ago, but I haven't received any feedback yet. Could you please review it and let me know if any modifications are needed? I’d love to proceed further based on your input.
Thanks!