Page MenuHomePhabricator

[Spike] Evaluate best solution to enable use of webview for reference and notes pop-up.
Closed, ResolvedPublic

Description

Goal
Evaluate the best approach to fetch content for a a webview powered references pop-up

Background
Currently we are unable to render reference and notes in the popup correctly. A solution might be to use webviews in a similar way to how they are used for link previews.

Options might include:

  • Whether getting around parsoid's wikitext -> html external limitations are possible?
  • Scraping from the page html and then rendering in the webview
  • Other?

Hello,
I was reading the page on Fast inverse square root:
https://en.wikipedia.org/wiki/Fast_inverse_square_root?wprov=sfla1

and I noticed that when clicking on a note, the pop-up does not render the style markup. This is most noticable with the math markup.

The first screenshot shows how Note 2 is rendered in the pop-up window when clicking on it in the article, and the second screenshot shows it correctly rendered on the actual page at the bottom of the article.

If there is a limitation that the pop-up window can only display plain text, then stripping out some of the math markup may help it become more readable.

Thanks,

Screenshot_20230929-154056.png (1×864 px, 253 KB)

Screenshot_20230929-154114.png (1×864 px, 273 KB)

Event Timeline

@Seddon will decide where the responsibility lies with this

Seddon renamed this task from Issue with Style Markup Rendering in Pop-up Notes to [Spike] Evaluate best solution to enable use of webview for reference and notes pop-up..Oct 23 2023, 1:48 AM
Seddon updated the task description. (Show Details)
Seddon moved this task from UX Debt Backlog to Bug Backlog on the Wikipedia-Android-App-Backlog board.

The spike is completed:

  1. We can use the WebView to show the references, but it will also introduce other issues like the internal links are not handled properly, or the styles are not consistent.
  2. We can also use an in-web popup style to show the reference, but it requires changes in the mobile-html with additional CSS styles and JavaScript code to handle the pop-up dialog.
  3. Or, we can use both WebView or the existing TextView for this specific case where the math formula does not show properly.
HNordeenWMF removed cooltey as the assignee of this task.
HNordeenWMF added a subscriber: cooltey.