Page MenuHomePhabricator

[M] Rabbit Holes: Suggested search query
Closed, ResolvedPublic

Description

This is the engineering task to build the first "half" of the rabbit holes experiment:

  • Since this is an ABC test, users in the A group will be the control, and the B group shall see the "suggested search query" mode.
  • As the user browses an article, we make a query in the background that produces a suggested search term. This will likely be based on a morelike query from the current article.
  • The suggested search term becomes the "hint" in the Search bar, in place of "Search Wikipedia".
  • If the user taps the search bar, instead of seeing their recent searches, they will now see the recommended search term (under the heading "Related to what you're reading", followed by the heading of "Recent searches" with their recent searches below. (The recommended term will continue to be the "hint" in the search text box)
  • If the user taps on any of the recent searches, or the new recommended search term, they will be taken to the search results, as before.
  • Make sure to build the workflow in such a way that analytics can be threaded through it easily.

Figma

Related Objects

StatusSubtypeAssignedTask
ResolvedNone
ResolvedDbrant

Event Timeline

Dbrant triaged this task as Medium priority.Nov 8 2024, 3:34 PM

Here is an APK with the implementation so far:
https://github.com/wikimedia/apps-android-wikipedia/actions/runs/11917094545/artifacts/2208377492

When first running the app, it will randomly assign you to one of the A/B/C test groups. To change your test group, go to Developer settings, scroll all the way to the bottom, and find the Test group for Rabbit Holes setting. You can set this to either 0 (control group), 1 (suggested search), or 2 (suggested reading list).

thank you @Dbrant!

some notes:

  1. can we load the suggested search query immediately? right now there’s a bit of a lag time, where Search Wikipedia is seen:

  1. when a user loads a new page, the former suggested search query should already be gone — right now it is still there for a split second:

  1. can the purple highlight be removed from the suggested search query when a user presses enter?:

  1. can we ensure that the background behind the suggested search query under the Related to what you’re reading heading is a gradient, rather than a slightly opaque blue? it should also have 8px left and right padding.

Latest apk (same as the other task): https://github.com/wikimedia/apps-android-wikipedia/actions/runs/11961520798/artifacts/2221182539

  1. can we load the suggested search query immediately? right now there’s a bit of a lag time, where Search Wikipedia is seen:

Afraid not; this is as immediate as it can be, since there will always be a round-trip time for retrieving a suggestion based on the current article.

  1. when a user loads a new page, the former suggested search query should already be gone — right now it is still there for a split second:

Done! (This will reset the search hint back to "Search Wikipedia", until it gets repopulated with a new suggestion for the current article.)

  1. can the purple highlight be removed from the suggested search query when a user presses enter?:

Done!

  1. can we ensure that the background behind the suggested search query under the Related to what you’re reading heading is a gradient, rather than a slightly opaque blue? it should also have 8px left and right padding.

I've made it into a gradient, but it doesn't look exactly like the gradient in the design, because it's not clear what color tokens the design is using. It looks like the desired gradient goes from #6699FF at 8%, to #FFFFFF at 40%, neither of which correspond to a known color token. (i.e. What should it be in Dark / Black / Sepia modes?)
In the current APK, I have assumed that the gradient goes from multi_select_background_color to paper_color, according to our theme guidelines.

  1. makes sense, thank you for looking into this!
  1. LGTM, TY!
  1. LGTM, TY!
  1. ah I see! so I was actually referencing the color library in Figma — specifically the last line with the slightly opaque blues, specifically #blue300, which is #6699FF at 20% — this doesn't show up in the file because when you use gradients as Figma, the tokens can't be applied to the endpoints (AFAIK!). I'm also seeing that this row is titled addition (TBD) so was this not built into the system @Dbrant ? in any case, I like the version you implemented, so let's stick with that.
Dbrant renamed this task from Rabbit Holes: Suggested search query to [M] Rabbit Holes: Suggested search query.Dec 2 2024, 6:09 PM

@Dbrant or @SChekfa-WMF I'm only seeing the survey after actually pressed enter or clicked on the recommendation, but not after interacting with search and ignoring the recommendation multiple times. Was this explicitly how Jaz wanted it set up?

I ask because it might give us a warped view of the KR: 65% or higher of feedback scores are positive, as we're only ever asking people who actually acted on our recommendation, not those who ignored it.

@Dbrant or @SChekfa-WMF I'm only seeing the survey after actually pressed enter or clicked on the recommendation, but not after interacting with search and ignoring the recommendation multiple times. Was this explicitly how Jaz wanted it set up?

Yep, it was intended for the survey to pop up only after the user clicks-through to a recommended search result.

Got it! It looks good to me then.