-
-
Notifications
You must be signed in to change notification settings - Fork 773
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
Deep Link support added for places #4986
base: main
Are you sure you want to change the base?
Conversation
@raihan Thanks for the improvement! I have created an associated Phabricator task so that we can track it's status on our workboard - https://phabricator.wikimedia.org/T377343. I notice this is still marked as Draft. Is there anything you need from us before marking this as Ready for Review? |
I opened the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@raihan Thanks for the improvement! I have one issue with getting longitude and latitude to work. If you have another deep link I could test with let me know.
|
||
if (latitude && longitude) { | ||
// If the place coordinate is provided in the URL, show it in the map | ||
[[self placesViewController] searchPlaceWithCoordinateWithLatitude:latitude longitude:longitude]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not able to hit this condition - I think the latitude and longitude values are getting dropped somewhere.
@@ -1215,9 +1215,21 @@ - (BOOL)processUserActivity:(NSUserActivity *)activity animated:(BOOL)animated c | |||
[self.currentTabNavigationController popToRootViewControllerAnimated:animated]; | |||
NSURL *articleURL = activity.wmf_linkURL; | |||
if (articleURL) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Optional)
This may be tricky to fix, but I would prefer if we removed the whole WMFArticleURL=
part of these places deep links:
wikipedia://places?WMFArticleURL=https://en.wikipedia.org/wiki?latitude=52.3547498&longitude=4.8339215
wikipedia://places?WMFArticleURL=https://en.wikipedia.org/wiki?place=Berlin
It is unnecessary information, and indicates we are searching against the subdomain wiki (en.wikipedia.org
), when in reality the app searches against the primary app language wiki in Settings.
If you could find a way to get these two links to work instead:
wikipedia://places?latitude=52.3547498&longitude=4.8339215
wikipedia://places?place=Berlin
I think that would feel better.
Background Context:
I have added deep link support for places in the Wikipedia app. So, when the Wikipedia app is opened through the deep link, it will directly go to the ‘Places’ tab and show the location specified by the caller app.
In this PR:
Testing Steps:
Please use the following deep link patterns
wikipedia://places?WMFArticleURL=https://en.wikipedia.org/wiki?place=Amsterdam&latitude=52.3547498&longitude=4.8339215
wikipedia://places?WMFArticleURL=https://en.wikipedia.org/wiki?place=Berlin
Screenshot/demo:
Wikipedia-deep-link.mov