Skip to content

[gestures] Refactor gestures configuration options to be aligned better across platforms.#672

Merged
pengdev merged 12 commits intomainfrom
peng-update-gesture-options
Sep 29, 2021
Merged

[gestures] Refactor gestures configuration options to be aligned better across platforms.#672
pengdev merged 12 commits intomainfrom
peng-update-gesture-options

Conversation

@pengdev
Copy link
Copy Markdown
Member

@pengdev pengdev commented Sep 24, 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 >

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>Refactor gestures configuration options to be aligned better across platforms.</changelog>.

Summary of changes

This PR refactors the gestures plugin's configuration options to be better aligned with iOS SDK.

List of changes:

  • Rename flingVelocityAnimationEnabled to scrollDecelerationEnabled
  • Rename rotateVelocityAnimationEnabled to rotateDecelerationEnabled
  • Rename scaleVelocityAnimationEnabled to pinchToZoomDecelerationEnabled
  • Rename zoomEnabled to pinchToZoomEnabled and limit its effect to just pinch to zoom
  • Rename panScrollMode to scrollMode
  • Rename zoomRate to zoomAnimationAmount
  • Remove disableRotateWhenScaling
  • Rename increaseRotateThresholdWhenScaling to increaseRotateThresholdWhenPinchingToZoom
  • Rename increaseScaleThresholdWhenRotating to increasePinchToZoomThresholdWhenRotating
  • Split doubleTapToZoomEnabled into doubleTapToZoomInEnabled and doubleTouchToZoomOutEnabled
  • Remove pixelRatio from gesture options (if needed, use the value from map init options so that this option is not duplicated)
  • Rename GesturesSettings#isPanHorizontallyLimited to GesturesSettings#isScrollHorizontallyLimited
  • Rename GesturesSettings#isPanVerticallyLimited to GesturesSettings#isScrollVerticallyLimited

@pengdev pengdev self-assigned this Sep 24, 2021
@pengdev pengdev changed the title [gestures] Refactor gestures naming to be aligned better across platforms. [gestures] Refactor gestures configuration options to be aligned better across platforms. Sep 24, 2021
@pengdev pengdev force-pushed the peng-update-gesture-options branch from c04ba8b to 0baf65c Compare September 24, 2021 11:34
@pengdev pengdev force-pushed the peng-update-gesture-options branch from fb53430 to f5e9d12 Compare September 27, 2021 09:17
Comment thread app/src/main/java/com/mapbox/maps/testapp/examples/GesturesActivity.kt Outdated
@pengdev pengdev force-pushed the peng-update-gesture-options branch from 848cd47 to 7d2ef39 Compare September 27, 2021 12:28
@pengdev pengdev force-pushed the peng-update-gesture-options branch from c18e57e to 208d6bb Compare September 27, 2021 17:36
@pengdev pengdev force-pushed the peng-update-gesture-options branch from 208d6bb to c3a6fd7 Compare September 27, 2021 17:41
@pengdev pengdev marked this pull request as ready for review September 28, 2021 09:13
@pengdev pengdev requested a review from a team September 28, 2021 09:13
@pengdev pengdev force-pushed the peng-update-gesture-options branch from ac9ac9e to 02bb780 Compare September 28, 2021 14:23
Comment thread app/src/main/java/com/mapbox/maps/testapp/examples/GesturesActivity.kt Outdated
Copy link
Copy Markdown
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.

LGTM, great job @pengdev!

@pengdev pengdev merged commit 7ca274d into main Sep 29, 2021
@pengdev pengdev deleted the peng-update-gesture-options branch September 29, 2021 12:14
@daniel-j-h
Copy link
Copy Markdown
Contributor

Hey folks, just FYI but this is breaking the Maps SDK v10's public API your users are working with.

I just upgraded to v10.2.0 and ran into my code base no longer compiling

https://github.com/mapbox/mapbox-maps-android/releases/tag/android-v10.2.0

It would have been great to call it out in the changelog or release notes.

Are breaking changes expected between minor version changes, because you folks want to keep the major version at v10?

@pengdev
Copy link
Copy Markdown
Member Author

pengdev commented Feb 1, 2022

Hi @daniel-j-h , sorry to hear this breaks your codebase.
For more context, this breaking change was introduced in https://github.com/mapbox/mapbox-maps-android/releases/tag/android-v10.0.0 , where we had change logs and release notes.
This was the final API alignment efforts before we pushing out the stable release from rc state, and we are avoiding making breaking changes between stable minor versions.

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.

7 participants