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

Redesign single tap event handling for annotations #709

Merged
merged 9 commits into from
Sep 24, 2021

Conversation

nishant-karajgikar
Copy link
Contributor

@nishant-karajgikar nishant-karajgikar commented Sep 24, 2021

PRs must be submitted under the terms of our Contributor License Agreement CLA.

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-ios changelog: <changelog></changelog>.
  • Update the migration guide, API Docs, Markdown files - Readme, Developing, etc

Summary of changes

This PR redesigns the way single tap gestures work in the MapView and each *AnnotationManager. The changes are motivated by a desire to make the GestureManager the home of all gesture related functionality. Accordingly, the GestureManager now owns a SingleTapGestureHandler (and exposes its associated gesture recognizer).

The singleTapGestureRecognizer is injected into the AnnotationsOrchestrator and then into any constructed *AnnotationManagers.

From a user's perspective, setting the AnnotationInteractionDelegate on an annotation manger results in a target-action being added to the singleTapGestureRecognizer.

@nishant-karajgikar nishant-karajgikar added the breaking change ⚠️ If your pull request introduces a breaking change and updates are required when version is published label Sep 24, 2021
@nishant-karajgikar
Copy link
Contributor Author

Adding more tests..

@nishant-karajgikar nishant-karajgikar merged commit ef52202 into main Sep 24, 2021
@nishant-karajgikar nishant-karajgikar deleted the nishantk/redesigned-tap-architecture branch September 24, 2021 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change ⚠️ If your pull request introduces a breaking change and updates are required when version is published
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants