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

Resolve issue where selected view annotation is not moved to correct z-order #1607

Merged

Conversation

ZiZasaurus
Copy link
Contributor

@ZiZasaurus ZiZasaurus commented Sep 28, 2022

Fixes #1599

Pull request checklist:

  • Describe the changes in this PR, especially public API changes.
  • 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 documentation comments for any added or updated public APIs.
  • Add any new public, top-level symbols to the Jazzy config's custom_categories (scripts/doc-generation/.jazzy.yaml)
  • Add a changelog entry to to bottom of the relevant section (typically the ## main heading near the top).
  • Update the guides (internal access only), README.md, and DEVELOPING.md if their contents are impacted by these changes.
  • If this PR is a v10.[version] release branch fix / enhancement, merge it to main first and then port to v10.[version] release branch.

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

@ZiZasaurus ZiZasaurus requested a review from a team as a code owner September 28, 2022 15:05
try? manager.update(annotationViewA, options: ViewAnnotationOptions(selected: true))
XCTAssertEqual(mapboxMap.addViewAnnotationStub.invocations.first?.parameters.id, "test-id")

// After adding a new annotation, the item clostst to the map is now furthest from the map
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// After adding a new annotation, the item clostst to the map is now furthest from the map
// After adding a new annotation, the item closest to the map is now furthest from the map

And here

The tests seem right, but the comments don't seem to align. Could you add context about what each step is looking for

Copy link
Contributor

@maios maios left a comment

Choose a reason for hiding this comment

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

correct me if I'm wrong but the order of the views is decided in DelegatingViewAnnotationPositionsUpdateListenerDelegate, upon receiving changes in view annotations (adding/removing/updating), mapboxMap will notify its delegate about new placement of annotation views. I think the test should setup similar to this test below

…wift

Co-authored-by: Patrick Leonard <pjleonard37@users.noreply.github.com>
Copy link
Contributor

@maios maios left a comment

Choose a reason for hiding this comment

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

Please check if 2 added files in Debug App and Example Apps are intended

@ZiZasaurus ZiZasaurus merged commit acd42ff into main Oct 5, 2022
@ZiZasaurus ZiZasaurus deleted the MAPSIOS-381-selected-view-annotation-doesnt-render-on-top branch October 5, 2022 13:52
OdNairy pushed a commit that referenced this pull request Oct 7, 2022
…z-order (#1607)

* fix issue where selected view annotation is not moved to correct z-order
OdNairy pushed a commit that referenced this pull request Oct 7, 2022
…z-order (#1607)

* fix issue where selected view annotation is not moved to correct z-order
OdNairy added a commit that referenced this pull request Oct 7, 2022
* Update GL-Native and Common versions

* Update Maps version to 10.9.0-rc.1

* fix zh localization (#1602)

* Write static config only if directory exists (#1608)

* Write static config only if directory exists

* Fix MapboxMaps -> MapboxMaps-static

* Enable ASan, JUnit collection, fix e2e, store crashes (#1622)

* Store crashes during unit tests

* Use JUnit for unit tests

* Fix e2e script on pushes without linked PR

* Enable Address Sanitizer for tests

* Resolve issue where selected view annotation is not moved to correct z-order (#1607)

* fix issue where selected view annotation is not moved to correct z-order

* Resolve initial view annotation placement issue (#1604)

* resolving initial annotation view placement issue

* Smooth reduced accuracy ring radius interpolation (#1625)

Co-authored-by: Ankur Khandelwal <ankur.khandelwal@mapbox.com>
Co-authored-by: Mai Mai <mai.mai@mapbox.com>
Co-authored-by: ZiZi <44972592+ZiZasaurus@users.noreply.github.com>
Co-authored-by: Roman Laitarenko <roman.laitarenko@mapbox.com>
persidskiy pushed a commit that referenced this pull request Aug 17, 2023
* Make internal map to conform to UIViewControllerRepresentable
* Wrap SwiftUI view annotation to UIKit.
* Support dynamic sizing for view annotations
OdNairy pushed a commit that referenced this pull request Aug 22, 2023
* Make internal map to conform to UIViewControllerRepresentable
* Wrap SwiftUI view annotation to UIKit.
* Support dynamic sizing for view annotations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

iOS: selected ViewAnnotation doesn't render on top
4 participants