Story
As a reader, I want the ability to get an overview of an article as soon as I land on the page, so I do not have to scroll very far to know what the article is about
Background
Per outcome of T143803:
MobileFormatter should be updated so that we move the first paragraph above the infobox.
As discussed, be careful not to relocate the paragraph above the hatnote.
- If a paragraph already appears before the infobox do not do anything.
- If there is no paragraph before the infobox move the first paragraph that appears after the infobox ahead of the infobox, but after any other elements (e.g. hatnote div) that may be before the infobox.
- If a lead section has an infobox and no paragraphs do nothing.
- Controlled via feature flag for beta or stable
- Enabled in beta.
- When the config flag is enabled it should have no impact on the API. It should only apply to the mobile skin to avoid any breakages to extensions using MobileView.
QA plan
- Opt into the beta mode of the mobile site
- Visit https://en.m.wikipedia.beta.wmflabs.org/wiki/Barack_Obama on a mobile browser.
- The infobox should appear under a single paragraph of black text
- Gray text (hatnote) should appear above the first paragraph of text.
- Opt into the stable mode of the mobile site. The infobox should appear underneath the hatnote (gray text) but above the black text.
- Repeat the above steps for 3 random pages in https://en.m.wikipedia.beta.wmflabs.org/wiki/Category:Living_people checking that where there is an infobox in the page the positioning is the same.
- Also repeat the above steps for the following pages: https://en.m.wikipedia.beta.wmflabs.org/wiki/Suwon, https://en.m.wikipedia.beta.wmflabs.org/wiki/Coccinellidae, https://en.m.wikipedia.beta.wmflabs.org/wiki/Capitol_View,_Atlanta
[1] Infobox looks like this: