Skip to content

Conversation

jaclync
Copy link
Contributor

@jaclync jaclync commented Sep 19, 2025

Just one review is required.

Description

This PR enhances the address map picker functionality in order details by setting the map region to the search completer's region to potentially enhance search relevance. Additionally, it fixes iOS 17 warnings related to deprecated Map usage and removes all iOS 17 availability requirements now that the app is iOS 17+.

Previously, Jorge from Kiwi reported an issue from the address map search that resolved itself later p1755255735655679/1755255191.666409-slack-C03L1NF1EA3. While searching for potential causes, it's recommended to set the region to the local search completer so that it prioritizes nearby places. The default region is the world, and it might be too broad for the initial search. I tested that it's still possible to search for addresses in a very far part of the world from the map region.

Steps to reproduce

  1. Go to an order in the Orders tab
  2. Tap on the shipping or billing address to edit it
  3. Tap on "Find on Map"
  4. Search for an address nearby --> the top results should include nearby places
  5. Select a place from the search result --> the map should center on the selected place with its address
  6. Now search for an address that is far away in a different country, it might require filling in the country name to get the desired search result
  7. Select a place from the search result that is far away from the initial map region --> the map should center on the selected place with its address
  8. Search for another address near the new map region --> the results should prioritize places near the new map region, instead of the initial map region

Testing information

I tested on iOS 18.4 simulator and iOS 26 device.

Screenshots

Whenever I turned on recording mode in either simulator or device, testing steps 8 stopped working due to MapCameraPosition.region being nil without a clear reason 😓 . Therefore, just sharing a basic screencast of the flow:

Simulator.Screen.Recording.-.iPad.A16.-.2025-09-19.at.15.09.57.mov

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@jaclync jaclync added type: task An internally driven task. feature: order details Related to order details. labels Sep 19, 2025
@jaclync jaclync added this to the 23.4 milestone Sep 19, 2025
@wpmobilebot
Copy link
Collaborator

App Icon📲 You can test the changes from this Pull Request in WooCommerce iOS Prototype by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS Prototype
Build Numberpr16154-4840663
Version23.2
Bundle IDcom.automattic.alpha.woocommerce
Commit4840663
Installation URL7f5kbnbj0j818
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@iamgabrielma iamgabrielma self-assigned this Sep 29, 2025
Copy link
Contributor

@iamgabrielma iamgabrielma left a comment

Choose a reason for hiding this comment

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

I don't seem to get the expected results when searching in the app vs when searching in Apple Maps, just a quick example:

Looking for a mall near my place in Apple maps shows it as soon as I type the initial characters, but in the app it never shows (until shows no results found after many characters).

By looking at the mapPosition.region this seems to be accurate to my current position, but still gives me results from the States, and India as I start typing, until no results are given.

Screenshot 2025-09-29 at 13 42 08

The issue seems to be with MKLocalSearchCompletion giving a dozen of results, but none of them matching the search intention, not sure how much we can do in this regard. Do you think of anything I can do/change on my end for further testing? Should I expect similar results when comparing with Apple Maps?

For reference, tested in iPad Pro 12.9 inch - iOS 26.0

var isSearchFocused: Bool = false
private(set) var searchResults: [MKLocalSearchCompletion] = []
var region = MKCoordinateRegion(
var mapPosition: MapCameraPosition = .region(MKCoordinateRegion(
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm curious why are we using Cupertino coordinates here? Should we pass in some sort of Location service that uses CLLocationManagerDelegate for the merchant's location? (I see we already instantiate a CLLocationManager when configuring the map) Or not really needed?

@staskus staskus modified the milestones: 23.4, 23.5 Oct 3, 2025
@jaclync jaclync removed this from the 23.5 milestone Oct 17, 2025
@dangermattic
Copy link
Collaborator

1 Error
🚫 PR is not assigned to a milestone.

Generated by 🚫 Danger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: order details Related to order details. type: task An internally driven task.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants