[ios, macos] Deprecate trafficDayStyleURL and trafficNightStyleURL#9918
Conversation
There was a problem hiding this comment.
These comments say “Emerald”.
9b2cfcf to
3934c78
Compare
There was a problem hiding this comment.
This change renames the selector from -trafficDayStyleURLWithVersion: to -trafficDayStyleURL. This is a backwards-incompatible change. Consider retaining the original method name but deprecating it nonetheless.
There was a problem hiding this comment.
@1ec5 I'm deprecating + (NSURL *)trafficDayStyleURL; and deleting trafficDayStyleURLWithVersion:(NSInteger)version is that ok or should I keep the later?
There was a problem hiding this comment.
We shouldn’t delete anything without a major version bump. So we’ll need to keep both symbols and mark them both as deprecated.
4474f33 to
6738042
Compare
| [MGLStyle satelliteStyleURL], | ||
| [MGLStyle satelliteStreetsStyleURL], | ||
| [MGLStyle trafficDayStyleURL], | ||
| [MGLStyle trafficNightStyleURL], |
There was a problem hiding this comment.
For consistency with iosapp, we might as well keep the styles-as-URLs here, too.
| styleURL = [MGLStyle trafficDayStyleURL]; | ||
| break; | ||
| case 8: | ||
| styleURL = [MGLStyle trafficNightStyleURL]; |
There was a problem hiding this comment.
The menu items themselves are defined in MapDocument.xib (for the toolbar) and MainMenu.xib (for the View menu). Removing the backing code without removing the UI elements leads to the assertion below when interacting with the UI elements.
6738042 to
efafdfa
Compare
There was a problem hiding this comment.
To clarify, it’s fine to remove the deprecated styles from macosapp – after all, Emerald isn’t listed – but you need to remove them completely. Otherwise, any inconsistencies between this code and the XIBs could result in a crash.
There was a problem hiding this comment.
Removed or kept, we should do the same here and in iosapp.
There was a problem hiding this comment.
Might be a good idea to add a \b where the ; was, to ensure that all the methods have the same parameter name (and not something like versions).
There was a problem hiding this comment.
We should continue to test these versioned methods as long as they’re part of the API. To work around the deprecation warnings, use pragmas.
efafdfa to
d392203
Compare
friedbunny
left a comment
There was a problem hiding this comment.
LGTM, but I defer to @1ễc5.
d392203 to
5a4e0c0
Compare
There was a problem hiding this comment.
[MGLStyle trafficDayStyleURLWithVersion:1] ends up returning Traffic Day v2. This could be a breaking change for any developers calling this method.
There was a problem hiding this comment.
@1ec5 I may misunderstood this but is it possible return a versioned style now that is deprecated? in the docs I wrote https://github.com/mapbox/mapbox-gl-native/pull/9918/files#diff-1d168de285fc4ba01ce48c4236f0b3ceR298
There was a problem hiding this comment.
-trafficDayStyleURLWithVersion: should return whatever version is specified, like it always has. -trafficDayStyleURL should return version 2. Both methods should be deprecated but should continue to work like they always have.
5a4e0c0 to
0114484
Compare
… in MGLStyleTests.
0114484 to
d369f8d
Compare
1ec5
left a comment
There was a problem hiding this comment.
Interestingly, it looks like we were never testing the unversioned traffic methods in the first place.
|
|
||
| /** | ||
| Returns the URL to the given version of the | ||
| Returns the URL to to the version 2 of the |
….1.4 * release-ios-v3.6.0-android-v5.1.0: (36 commits) [android] [auto] Update properties to version 5.1.4 in preparation for build. [android] - latLngBounds test [android] - update changelog for 5.1.4 release. bump MAS version number to 2.2.3 (mapbox#9901) [android] fix is download complete (a download is complete when count and required resources match and the download state is inactive) (mapbox#9913) [android] - avoid adding duplicate points to bounds [android] Clear out mapCallback's OnMapReadyCallbacks on onDestroy [android] - harden offline region deletion Do not check connection if it is local request [android] - disable rotation gesture when pinch zooming macos-v0.5.1 [ios] Bump podspec to 3.6.4 (mapbox#10059) [android, ios, macos] Updated translations [core] make sure tiles are not treated as complete until all worker operations completed [core] keep tiles renderable even if a subsequent error occurs [ios] Be sure to get a BOOL value for nullable dict keys iosv3.6.3 podspec bump (mapbox#10008) [ios, macos] Deprecate trafficDayStyleURL and trafficNightStyleURL (mapbox#9918) [ios] Use constraints to manage ornament view placement (again) (mapbox#9995) [ios] Canned spam coming from Transifex ... # Conflicts: # platform/android/MapboxGLAndroidSDK/proguard-rules.pro # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapGestureDetector.java
Deprecates styles according to the latest spec.