Page MenuHomePhabricator

Mobile Page Previews: bug bash
Closed, ResolvedPublic

Description

A non-exhaustive of contexts to test:

  • Dark mode
  • Light mode (standard)
  • Standard font size
  • Medium font size
  • Large font size
  • RTL languages
  • Agglutinative languages like German and Finnish with super long words
  • No image
  • No summary text
  • Stubs
  • Articles with no intro paragraph

Design feedback

  • Summary text should be smaller than the article body text

Acceptance Criteria

  • Address design feedback
  • QA

Event Timeline

Change #1270081 had a related patch set uploaded (by LWatson; author: LWatson):

[mediawiki/extensions/ReaderExperiments@master] Mobile Page Previews: font size is smaller than body text

https://gerrit.wikimedia.org/r/1270081

I'll QA based on the test case list in the description. Also, this patch makes the page summary font size smaller than the article body text: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/ReaderExperiments/+/1270081. Justin reported the font size issue on Slack.

Test cases

Tested on production wiki, iOS Simulator iPhone 14 Pro. Otherwise noted in the test case.

(1) Dark and light mode
Example: https://en.wikipedia.org/wiki/Wikipedia?mpo=mobile-page-previews:treatment

Dark modeLight mode
MobilePagePreviews - dark mode.png (1×796 px, 506 KB)
MobilePagePreviews - light mode.png (1×784 px, 469 KB)

(2) Font size mode
Minerva font mode includes standard, medium, and large font sizes.
The preview summary text should be smaller than the article text.

Font modeCSS selectorbody textsummary text
Standardclientpref-small1 rem / font-size-mediumfont-size-small
Mediumclientpref-regular1.125rem / font-size-largefont-size-medium
Largeclientpref-large1.25rem / font-size-x-largefont-size-large

(3) RTL languages
Example: https://ar.wikipedia.org/wiki/ببغاء_رمادي_إفريقي?mpo=mobile-page-previews:treatment
📝 Note: Missing "Read more" translation

MobilePagePreviews - RTL.png (1×782 px, 460 KB)
MobilePagePreviews - RTL text only.png (1×794 px, 366 KB)

(4) Agglutinative languages like German and Finnish with super long words
Unable to test because ReaderExperiments is not enabled on German and Finnish wikis as per wmgUseReaderExperiments config (reference).

(5) No image
Example: https://en.wikipedia.org/wiki/Sinners_(2025_film)?mpo=mobile-page-previews:treatment

MobilePagePreviews - no image.png (1×778 px, 366 KB)

(6) No summary text
Tested locally by forcing missing summary text.

MobilePagePreviews - no summary text.png (292×822 px, 136 KB)

(7) Stubs
A stub example: https://en.wikipedia.org/wiki/Romeo_and_Juliet_(swans)?mpo=mobile-page-previews:treatment from "Popular low quality articles".

(8) Articles with no intro paragraph
Example: https://en.wikipedia.org/wiki/Order_of_precedence_in_Thailand?mpo=mobile-page-previews:treatment from Pages missing lead sections

MobilePagePreviews - no lead section.png (1×778 px, 302 KB)


T423173: Mobile Page Previews: Launch the experiment - will address translation coverage and enabling ReaderExperiments on the target wikis.

Change #1270081 merged by jenkins-bot:

[mediawiki/extensions/ReaderExperiments@master] Mobile Page Previews: font size is smaller than body text

https://gerrit.wikimedia.org/r/1270081

Change #1270950 had a related patch set uploaded (by LWatson; author: LWatson):

[mediawiki/extensions/ReaderExperiments@master] Mobile Page Previews: fix width of bottom sheet

https://gerrit.wikimedia.org/r/1270950

Change #1270950 merged by jenkins-bot:

[mediawiki/extensions/ReaderExperiments@master] Mobile Page Previews: fix width of bottom sheet

https://gerrit.wikimedia.org/r/1270950

lwatson renamed this task from Minerva page previews bug bash to Mobile Page Previews: bug bash.Apr 14 2026, 6:20 PM

Notes for QA

Navigate to a Wikipedia article on beta wiki

(1) Touch only

Link tap triggers the bottom sheet on touch screen devices only (or via touch emulation).

Steps:

  1. On a touch screen device, navigate to any article
  2. Tap a link in the article body

Expected:

  • Browser does not navigate to the article immediately
  • Backdrop dims the page
  • Bottom sheet slides up with a progress spinner initially when loading
  • After data loads, thumbnail, summary, and “Read more” link appear
  • The tapped link is styled as an active link (text underlined)

Test with a mouse click. Expect that the bottom sheet doesn’t appear and navigation proceeds normally (immediately opens the article on preview link click)

(2) Redirect timeout fallback

Steps:

  1. In DevTools Network, throttle network connection to 3G to test slow connection.
  2. Tap on a link and wait without interacting.

Expected:

  • Bottom sheet appears immediately with spinner
  • After ~3 seconds (the redirect timeout), the browser navigates to the target article regardless of whether the fetch completed
(3) Redirect timeout cleared on successful fetch

Steps:

  1. Tap a link under normal network conditions
  2. Wait for the card to fully render

Expected:

  • Card renders (spinner is replaced by content)
  • No navigation occurs after 3 seconds
  • User remains on the current article with the bottom sheet open
(4) API error (fallback redirect)

Steps:

  1. In DevTools Network, block the /api/rest_v1/page/summary/ request (reference), or simulate a 500 response
  2. Tap a link in the article body

Expected:

  • Bottom sheet appears with spinner
  • On fetch failure, the sheet closes and the browser navigates to the target article
(5) Dark mode

Steps:

  1. Enable dark mode via Minerva’s appearance menu
  2. Tap a link to open the bottom sheet

Expected:

  • Backdrop uses a dark-appropriate overlay color
  • Bottom sheet background is dark (not white)
  • Title text, summary text, and “Read more” link are legible against the dark background
  • Close button icon is visible
(6) Font size mode

Steps:

  1. In Minerva settings, change font size to small, then repeat for regular and large
  2. Tap a link

Expected:

  • Summary text in the card reflects the selected font-size (@font-size-small@font-size-medium@font-size-large)
  • “Read more” link font size matches the summary paragraph font size
  • Text remains readable and does not overflow at any size
(7) Image missing (no thumbnail in API response)

Steps:

  1. Find a link to an article known to have no lead image (e.g., a stub or text-only article), or mock the API to omit the thumbnail field.
  2. Tap the link

Expected:

  • No thumbnail is shown
  • Summary and “Read more” link still display correctly
  • Card layout is not broken; content is not misaligned due to missing image
(8) Summary missing (no extract_html in API response)

Steps:

  1. Find or mock an article where the API returns no summary
  2. Tap the link

Expected:

  • No summary text is shown
  • Article title fallback is shown instead of summary text
  • “Read more” link is present
(9) Dismiss with close button

Steps:

  1. Tap a link to open the bottom sheet
  2. Tap the close button

Expected:

  • Sheet slides down and disappears
  • Backdrop fades out
  • Page scroll is re-enabled (body overflow: hidden is removed)
  • The tapped link’s active highlight style is removed
  • No navigation occurs
  • Tapping another link opens the bottom sheet
(10) Dismiss by tapping backdrop

Steps:

  1. Tap a link to open the bottom sheet
  2. Tap the dimmed backdrop outside the bottom sheer

Expected:

  • Same result as Test Case 9 (sheet closes, no navigation)
(11) Navigate to an article via the “Read more” link

Steps:

  1. Tap a link to open the bottom sheet
  2. Wait for the card to fully load
  3. Tap the “Read more” link at the bottom of the card

Expected:

  • Browser navigates to the target article
  • The link opens with target="_blank" behavior (new tab)
  • The external link icon is visible next to the “Read more” link text
Etonkovidova subscribed.

Thank you, @lwatson for test cases and for test results in https://phabricator.wikimedia.org/T422950#11817096.

I've run the tests on enwiki (and enwiki beta) - no issues found.

Additionally, I checked