-
Notifications
You must be signed in to change notification settings - Fork 310
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
Clean up delegate method names; use UUIDs for feedback IDs #1413
Conversation
Named delegate method parameters in Objective-C. Replaced the first argument of several delegate methods with the sending object. Made method names more consistent between NavigationMapViewDelegate, RouteMapViewControllerDelegate, and NavigationViewControllerDelegate. Represent feedback IDs as UUID instead of String, just like in Core Navigation. Renamed “callback” to “completionHandler”. Fixed an issue where NavigationViewControllerDelegate.navigationMapView(_:shapeFor:) was getting called instead of navigationMapView(_:simplifiedShapeFor:). Fixed typos in documentation comments. Separated ViewController delegate implementations into extensions.
@@ -28,11 +29,27 @@ | |||
### Other changes | |||
|
|||
* `DistanceFormatter`, `ReplayLocationManager`, `SimulatedLocationManager`, `LanesView`, and `ManueverView` are now subclassable. ([#1345](https://github.com/mapbox/mapbox-navigation-ios/pull/1345])) | |||
* Renamed several `NavigationMapViewDelegate` methods ([#1364](https://github.com/mapbox/mapbox-navigation-ios/pull/1364), [#1338](https://github.com/mapbox/mapbox-navigation-ios/pull/1338), [#1318](https://github.com/mapbox/mapbox-navigation-ios/pull/1318), [#1378](https://github.com/mapbox/mapbox-navigation-ios/pull/1378)): | |||
* Renamed many `NavigationViewController` and `NavigationMapViewDelegate` methods ([#1364](https://github.com/mapbox/mapbox-navigation-ios/pull/1364), [#1338](https://github.com/mapbox/mapbox-navigation-ios/pull/1338), [#1318](https://github.com/mapbox/mapbox-navigation-ios/pull/1318), [#1378](https://github.com/mapbox/mapbox-navigation-ios/pull/1378), [#1413](https://github.com/mapbox/mapbox-navigation-ios/pull/1413)): | |||
* `NavigationViewControllerDelegate.navigationViewControllerDidCancelNavigation(_:)` to `NavigationViewControllerDelegate.navigationViewControllerDidDismiss(_:byCanceling:)` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This list pretty huge, maybe put it behind a more/toggle button thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changelog gets included in the jazzy docset’s cover page. Not sure whether jazzy’s Markdown formatter can handle <details>
. Open to using a table, but then the concern is horizontal scrolling that could break page layouts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think a table might help.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, let's also test how this fairs in https://github.com/mapbox/navigation-ios-examples.
Updated examples based on mapbox/mapbox-navigation-ios-examples#20. |
This one is a doozy. Hot on the heels of #1378, most public NavigationViewControllerDelegate methods and some RouteControllerDelegate and TunnelIntersectionManagerDelegate methods have been renamed to conform to Cocoa naming conventions in both Swift and Objective-C. The biggest change is that all the NavigationViewControllerDelegate methods now begin with
navigationViewController
instead of sometimes beginning withnavigationMapView
. If an implementation needs access to the map view, it can usenavigationViewController.mapView
.NavigationViewControllerDelegate changes:
navigationMapView(_:routeStyleLayerWithIdentifier:source:)
navigationViewController(_:routeStyleLayerWithIdentifier:source:)
navigationMapView(_:routeCasingStyleLayerWithIdentifier:source:)
navigationViewController(_:routeCasingStyleLayerWithIdentifier:source:)
navigationMapView(_:shapeFor:)
navigationViewController(_:shapeFor:)
navigationMapView(_:simplifiedShapeFor:)
navigationViewController(_:simplifiedShapeFor:)
navigationMapView(_:waypointStyleLayerWithIdentifier:source:)
navigationViewController(_:waypointStyleLayerWithIdentifier:source:)
navigationMapView(_:waypointSymbolStyleLayerWithIdentifier:source:)
navigationViewController(_:waypointSymbolStyleLayerWithIdentifier:source:)
navigationMapView(_:shapeFor:legIndex:)
navigationViewController(_:shapeFor:legIndex:)
navigationMapView(_:didTap:)
navigationViewController(_:didSelect:)
navigationMapView(_:imageFor:)
navigationViewController(_:imageFor:)
navigationMapView(_:viewFor:)
navigationViewController(_:viewFor:)
navigationViewController(_:didSend:feedbackType:)
navigationViewController(_:didSendFeedbackAssigned:feedbackType:)
NavigationViewControllerDelegate changes in Objective-C only:
-navigationViewController:didArriveAt:
-navigationViewController:didArriveAtWaypoint:
-navigationViewController:shouldDiscard:
-navigationViewController:shouldDiscardLocation:
-navigationViewController:roadNameAt:
-navigationViewController:roadNameAtLocation:
TunnelIntersectionManagerDelegate changes:
tunnelIntersectionManager(_:willEnableAnimationAt:callback:)
tunnelIntersectionManager(_:willEnableAnimationAt:completionHandler:)
tunnelIntersectionManager(_:willDisableAnimationAt:callback:)
tunnelIntersectionManager(_:willDisableAnimationAt:completionHandler:)
Along for the ride, MapboxNavigation now represents feedback IDs as
UUID
s instead ofString
s, just like in Core Navigation, resulting in the following changes to RouteController:recordFeedback(type:description:)
returnsString
recordFeedback(type:description:)
returnsUUID
updateFeedback(feedbackId:type:source:description:)
updateFeedback(uuid:type:source:description:)
cancelFeedback(feedbackId:)
cancelFeedback(uuid:)
Finally, this PR fixes an issue (present in the current release) where
NavigationViewController.navigationMapView(_:shapeDescribing:)
(nownavigationMapView(_:shapeFor:)
) was getting called instead ofnavigationMapView(_:simplifiedShapeDescribing:)
(nownavigationMapView(_:simplifiedShapeFor:)
).Fixes #1376.
/cc @bsudekum @JThramer @vincethecoder