Background
- We are testing content recommendations on mobile. This task is to add those recommendations to the search bar when activated
User story
- As a user in the appropriate test group, I see article recommendations when I activate the search bar, so I can potentially deepen my relationship with Wiki and more easily fall into "rabbit holes"
Requirements
- Must work on mobile (if it works on desktop this is a positive side effect)
- Must utilize the MoreLike API currently in use for Related Articles to generate three recommendations
- Must be disabled by default
- When the experiment is enabled 50% of the sample group see the recommendations, 50% of the sample group. get the existing behaviour
- WIkimediaEvents is able to determine if the experiment is running or not.
BDD
Feature: Display MoreLike-based article suggestions in mobile search bar
Scenario: Article recommendations appear on activating the search bar
Given the user is on the mobile site
When the user activates the search bar
Then MoreLike-based article suggestions should be displayed below the search barTest Steps
Test Case 1: Validate recommendations display when activating the search bar
- Navigate to the mobile site.
- Ensure the search bar is visible on the page.
- Activate the search bar by tapping on it.
- Verify that MoreLike-based article suggestions appear below the search bar.
- AC1: Recommendations are displayed when the search bar is activated.
Design
- More detailed designs to come
Acceptance criteria
- We have added 3 MoreLike-based search results to treatment group users on mobile.
- These results do not appear for the control group
- We have tied this into instrumentation as part of https://phabricator.wikimedia.org/T378109
The solution should be minimal and comprise of the following components based on our discussion in T378109: Mobile search A/B test instrumentation - technical enablers:
- A mw.hook should be fired whenever the search results are empty. The hook is fired with an element in which a consumer can render recommendations. This code will be added in MobileFrontend. [Done in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/+/1088629?usp=search]
- The existing RelatedArticles code will be adapted to render in the empty search results. This will be conditional based on whether the A/B test is enabled or not. By default nothing should render. [Proof of concept https://gerrit.wikimedia.org/r/c/mediawiki/extensions/RelatedArticles/+/1092871]
- Minimal CSS to adapt the existing RelatedArticles design per @JScherer-WMF 's mock
Communication criteria - does this need an announcement or discussion?
- Yes - we need to document and communicate how this works and our reasoning for this experiment
Rollback plan
- What is the rollback plan in production for this task if something goes wrong?
This work needs to only apply to the treatment group
This task was created by Version 1.2.0 of the Web team task template using phabulous
QA Results - Beta
| AC | Status | Details |
|---|---|---|
| 1 | ✅ | T378117#10399296 |



