Page MenuHomePhabricator

As a user I want to be able to search the wikipedia iOS app from spotlight
Closed, ResolvedPublic

Description

To support this we need to implement both NSUserActivity and CoreSportlight APIs for our in app content.

Need to define test cases.

Event Timeline

MBinder_WMF triaged this task as Low priority.
MBinder_WMF raised the priority of this task from Low to High.
MBinder_WMF updated the task description. (Show Details)
MBinder_WMF moved this task from Product Backlog to PM-Backlog on the Wikipedia-iOS-App-Backlog board.
MBinder_WMF added a subscriber: JMinor.

@JMinor if you can find the epic for this, it could be child'd under that (and we could tag that epic appropriately).

Need to add associated domains to the plist and update the provisioning profile

Proposed acceptance criteria:

Scenario: using spotlight to find recent or saved article
Given that I have a (saved|recent) article with title $1
When I run a search in the iOS Spotlight search interface for $1
Then I should see the Wikipedia app as one of the results
And when I tap that result, it should open article with title $1 in the reader view

Scenario: deleted pages shouldn't be found
Given that I had a (saved|recent) article with title $1 but have deleted it
When I run a search in the iOS Spotlight search interface for $1
Then I should NOT see the Wikipedia app as one of the results

Scenario: handoff between app and desktop
Given that I have two iOS devices and have enabled Allow Handoff on both
When I have article with title $1 open on the reader view on device 1
Then I should see the iOS handoff tab in the iOS App Switcher on device 2

And when I tap the handoff tab on device 2
Then the article with title $1 should open on device 2

So, handoff is working. Went between iPad Mini 2 and iPhone 5c back and forth. Article work, but basic interface views also hand be handed off (Explore) which is a little odd since they may have different contents on each device, and may be confusing if you expect cross device history syncs (for example). Not worth taking out, but something to improve on.

Search from spotlight was not working in 5.0.0 764 following the steps in the first test scenario (test title was Leonardo DiCaprio). I saved the article, backgrounded the app, then searched for "Leonardo DiCaprio" in spotlight. No app results shown. Tried on both iPad and iPhone.

Is this dependent on the JSON change on the site file?

{F3504602}Okay, after a few minutes (looks like 20 by the comment time stamp) I went back to the devices and ran another search. Now works on iPhone (5C iOS 9.2.1) but not on iPad (Mini 2 9.2.1). Must be some lag in the indexing? Seems to happen instantly now.

Looks like DISPLAYTITLE html is coming through, though. See screenshot showing <i>Girl Pat</i> result.

Not a blocker but would be nice to strip out for v.1

I find that I can search for any article in spotlight and it will find Wikipedia and take me to the page through Safari. It doesn't matter whether an article is saved in the app or not, it will always go to the article through Safari. As a result, the steps don't seem to work to test the app as intended.

Nicholas.tsg can you retest this with the current build. Its working for me, so I just want to confirm its not a build version issue.

Checked with 5.0.0(575)
Scenario: using spotlight to find recent or saved article - it works.

  • Scenario: deleted pages shouldn't be found** - the spotlight search finds any article; it does not take into account whether articles are/have been in Saved/History or never been there.

Seems that spotlight cashes search results ?

As a special case - I checked with Airplane mode ON. Filed it as a phab task T128938: [5.0.0(575)] Spotlight search for offline mode uses cached search results

@JMinor can we resolve this one, or change the tag to v5.0.1? Archiving the board...

Resolved but we should deal with caching, esp as relates to privacy, in 5.0.1 see: T128938: [5.0.0(575)] Spotlight search for offline mode uses cached search results