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

[deps] Bump gl-native to v10.0.0-beta.17, common to v10.0.2, minSdkVersion to 21, and address breaking changes. #176

Merged
merged 12 commits into from
Mar 18, 2021

Conversation

pengdev
Copy link
Member

@pengdev pengdev commented Mar 16, 2021

PRs must be submitted under the terms of our Contributor License Agreement CLA.
Fixes: < Link to related issues that will be fixed by this pull request, if they exist >

Change logs:

Bump minSdkVersion of the SDK is bumped to 21, and bumped okhttp dependency to v4.9.0.

Rename jumpTo(options: CameraOptions) to setCamera(options: CameraOptions), rename setFreeCameraOptions (options: FreeCameraOptions) to setCamera(options: FreeCameraOptions).

Rename OnMapLoadingFinishedListener to OnMapLoadedListener.

Introduce OnStyleDataLoadedListener to replace OnStyleLoadingFinishedListener, and introduce OnSourceDataLoadedListener to replace OnSourceChangedListener. So that developers have granular control of style/source loading status.

Introduce coordinateBoundsForCamera() API to replace the getBounds() API.

Schedule non-rendering tasks on Android's scheduler to improve render performance.

Pull request checklist:

  • Briefly describe the changes in this PR.
  • Include before/after visuals or gifs if this PR includes visual changes.
  • Write tests for all new functionality. If tests were not written, please explain why.
  • Add example if relevant.
  • Document any changes to public APIs.
  • Apply changelog label ('breaking change', 'bug 🪲', 'build', 'docs', 'feature 🍏', 'performance ⚡', 'testing 💯') or use the label 'skip changelog'
  • Add an entry inside this element for inclusion in the mapbox-maps-android changelog: <changelog></changelog>.

Summary of changes

This PR introduces many breaking changes to the SDK:

  • Refs [RFC] updating the minimum SDK version to API 21 #69 the minSdkVersion of the SDK is bumped to 21, and introduced okhttp 4.9.0 as a dependency.
  • Renamed jumpTo(options: CameraOptions) to setCamera(options: CameraOptions), renamed setFreeCameraOptions (options: FreeCameraOptions) to setCamera(options: FreeCameraOptions).
  • Renamed OnMapLoadingFinishedListener to OnMapLoadedListener.
  • Introduce OnStyleDataLoadedListener to replace OnStyleLoadingFinishedListener, and introduced OnSourceDataLoadedListener to replace OnSourceChangedListener API to have granular control of style/source loading status.
  • Introduce coordinateBoundsForCamera() API to replace the getBounds() API
  • Schedule non-rendering tasks on Android's scheduler to improve render performance.

User impact (optional)

*
* Observable will hold a strong reference to an Observer instance, therefore,
* in order to stop receiving notifications, caller must call unsubscribe with an
* Observer instance used for an initial subscription.
*
* @param observer an Observer
*/
fun ObservableInterface.subscribeMapLoadingFinished(observer: Observer) =
subscribe(observer, listOf(MapEvents.MAP_LOADING_FINISHED))
fun ObservableInterface.subscribeMapLoaded(observer: Observer) =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit but
do we have an example somewhere of how to use that extension?
I think may be reasonable adding in some example activity.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have one example in DebugModeActivity, but it doesn't cover all the events. We should make a new example for both the listeners and observer approach.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth creating a ticket?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ticketed at #189

@pengdev pengdev force-pushed the peng-bump-gl-native-beta.17 branch from f8d626c to dae7b6e Compare March 17, 2021 21:03
@pengdev pengdev force-pushed the peng-bump-gl-native-beta.17 branch from dae7b6e to 0b87915 Compare March 17, 2021 21:06
@pengdev pengdev marked this pull request as ready for review March 18, 2021 13:09
@pengdev pengdev requested a review from a team March 18, 2021 13:09
@pengdev pengdev self-assigned this Mar 18, 2021
Copy link
Contributor

@kiryldz kiryldz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pengdev tremendous effort! great job!
please apply correct labels (like breaking change) and update description with describing breaking changes (like min sdk version, setCamera, event API)

Copy link
Member

@tobrun tobrun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Copy link
Contributor

@Chaoba Chaoba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job 👍

@pengdev
Copy link
Member Author

pengdev commented Mar 18, 2021

Verified that the style-test bot is green, merging to main.

@pengdev pengdev merged commit 66e473f into main Mar 18, 2021
@pengdev pengdev deleted the peng-bump-gl-native-beta.17 branch March 18, 2021 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants