-
Notifications
You must be signed in to change notification settings - Fork 117
Bookmark individual routes at stops instead of the entire stop #457
Comments
FWIW - I recently implemented route favorites on Android - currently, it's basically a mechanism to allow the user to "pin" a route to the stop of the sliding panel, so you can monitor your favorites while browsing the map or list: We'll eventually support a "starred routes" list as well (OneBusAway/onebusaway-android#354). In the current implementation on Android, the favorite stop logic/implementation remains - users can star stops, and these show up in the "starred stops" list, accessible from the main navigation drawer: So a user can have a favorite stop without necessarily starring any routes at that stop. Route favorites are implemented in parallel and tracked in a new database table. For route favorites, I wanted to accomplish two things that are interrelated:
The above design allows for easy bookmarking for commute trips that traverse transit centers. I may not want to see incoming trips for 5 at each transit center, and just outgoing. So, when the user taps on the star next to the route, they see: Bookmarking routes per direction and stop introduces two implementation challenges:
For the first challenge, I came to the conclusion that storing a combination of the To address the 2nd challenge, I'm using a boolean Here's the comment in OBA Android for the route/direction/stop favorite implementation:
Actual Java implementation is here in There is also a legacy "starred route" database table that stores favorites just per For better or worse, that's how it works on Android. I'm welcome to design improvements/ideas if anyone has any. |
Awesome, thanks for all of the information and context, @barbeau! This is going to be super-helpful. |
@aaronbrethorst np, good luck! :) |
Issues Fixed: * Fixes OneBusAway#159 - show next bus times on bookmarks tab * Fixes OneBusAway#457 - Bookmark individual routes at stops instead of the entire stop * Fixes OneBusAway#593 - Can no longer reorder bookmarks in v2.5.0 Static Table Views: * Add ability to set contextual actions on a per-table row basis. Stop View Controller: * Extract classic departure row construction into a separate method * Add/Delete bookmark contextual item * Remove a now-unnecessary class method for initialization from OBAStopViewController * Plumb in an accessor for OBAModelDAO into OBAStopViewController to allow easier testing later on. * Implement -hasBookmarkForArrivalAndDeparture: on OBAStopViewController * Dump the parallax code in the stops controller; it doesn't work properly and needs reimplementation * first stab at disambiguation UI * Never show the text "edit bookmark" at the stop level, since it no longer makes any sense. Bookmarks Controller: * Add a new cell: OBABookmarkedRouteCell * Lazy accessor for OBAModelService on OBABookmarksViewController * Show bookmarked routes on OBABookmarksViewController Bookmarks: * Bookmark versioning * * Make OBABookmarkV2 conform to NSCopying * Add ability to bookmark a single route of a stop. * add sortOrder property to bookmarks. * Get bookmark reordering working again. * Persist routeShortName in bookmarks * Create a method to determine if a bookmark is congruent to an arrival and departure object * Clarify which bookmark properties are new in 2.6.0 General/Misc: * Upgrade to a first-party SVProgressHUD pod, as the version is now parseable by iTC. * Add -oba_description:-based description method to OBARouteV2 * Add San Diego GPX file * UUID cleanup * Start adapting Podfile and project to work on Xcode 7 and 8 * Add OCMock 3 as the mocking library for OBA * fix -copyWithZone: bug in OBATableRow
Issues Fixed: * Fixes OneBusAway#159 - show next bus times on bookmarks tab * Fixes OneBusAway#457 - Bookmark individual routes at stops instead of the entire stop * Fixes OneBusAway#593 - Can no longer reorder bookmarks in v2.5.0 Static Table Views: * Add ability to set contextual actions on a per-table row basis. Stop View Controller: * Extract classic departure row construction into a separate method * Add/Delete bookmark contextual item * Remove a now-unnecessary class method for initialization from OBAStopViewController * Plumb in an accessor for OBAModelDAO into OBAStopViewController to allow easier testing later on. * Implement -hasBookmarkForArrivalAndDeparture: on OBAStopViewController * Dump the parallax code in the stops controller; it doesn't work properly and needs reimplementation * first stab at disambiguation UI * Never show the text "edit bookmark" at the stop level, since it no longer makes any sense. Bookmarks Controller: * Add a new cell: OBABookmarkedRouteCell * Lazy accessor for OBAModelService on OBABookmarksViewController * Show bookmarked routes on OBABookmarksViewController Bookmarks: * Bookmark versioning * * Make OBABookmarkV2 conform to NSCopying * Add ability to bookmark a single route of a stop. * add sortOrder property to bookmarks. * Get bookmark reordering working again. * Persist routeShortName in bookmarks * Create a method to determine if a bookmark is congruent to an arrival and departure object * Clarify which bookmark properties are new in 2.6.0 General/Misc: * Upgrade to a first-party SVProgressHUD pod, as the version is now parseable by iTC. * Add -oba_description:-based description method to OBARouteV2 * Add San Diego GPX file * UUID cleanup * Start adapting Podfile and project to work on Xcode 7 and 8 * Add OCMock 3 as the mocking library for OBA * fix -copyWithZone: bug in OBATableRow
@aaronbrethorst FYI - looks like my statement above doesn't always hold true. I'm not sure if something changed in the server-side code base since I looked at this, or if there are corner cases that I didn't originally see. But, at any rate, I'm seeing at least one case at RVTD where |
There are a lot of good reasons to do this work, ranging from paving the way to building an Apple Watch app to a Today extension. I need to flesh out this issue with some more details about how the feature is going to look and work, and what—if anything—we want to do for migrating existing users' data forward.
The text was updated successfully, but these errors were encountered: