Beta/Alpha
Move the first paragraph above the infobox so that we can test the lead image prototype.
https://docs.google.com/presentation/d/1Apabrcu1l7mfeEJgl1k-pcovtmPys4P7FwUJ2-_etIs/edit?usp=sharing
• KHammerstein | |
Mar 5 2015, 11:34 PM |
F182755: leadimage-19.png | |
Jun 23 2015, 11:47 PM |
Beta/Alpha
Move the first paragraph above the infobox so that we can test the lead image prototype.
https://docs.google.com/presentation/d/1Apabrcu1l7mfeEJgl1k-pcovtmPys4P7FwUJ2-_etIs/edit?usp=sharing
On apps we started moving infoboxes down, but found it's much better (fewer edge case etc) to move the first "good" paragraph up. See: https://gerrit.wikimedia.org/r/#/c/192452/
The specific javascript transform we use for doing this:
https://gerrit.wikimedia.org/r/#/c/192452/7/www/js/transforms.js
To avoid a flash of unstyled content, we may want to hide the infobox by default (in some top-loaded CSS), move the infobox below the lead, and then unhide it. If the lead takes up at least the first screen, there should be no flash for the user. Probably the only way to guarantee no flash of unstyled content is to move the infobox on the server-side, but that would introduce caching complications.
@MaxSem What would be the caching implications of implementing this on the server-side (both for a beta implementation and a later stable implementation)?
There would be a noticeable latency increase for cache misses on large articles if just done in MobileFormatter without architectural changes. A more elaborate solution would be to adapt someting like apps' pageview service (that would however not depend on mobileview API, doing everything itself) and pregenerate a massaged HTML, storing it in Cassandra.
Apparently Varnish already varies the cache based on alpha, beta, or stable, so we wouldn't be making the cache fragmentation worse at least. Max also mentioned that we could take the opportunity to strip the navbox HTML from the output at the same time, which sometimes takes up as much as 60K.
This whole thing seems like a slightly bad idea, but if we're going to do it, it seems like it would make more sense to do it on the server-side, IMO. That at least provides smooth, predicable behavior for the user (apart from the caching issues, which would be temporary).
/me wonders if we would be better waiting for Parsoid or at least introducing Parsoid to alpha.
Changed the title based on @Mhurd's comment:
On apps we started moving infoboxes down, but found it's much better (fewer edge case etc) to move the first "good" paragraph up. See: https://gerrit.wikimedia.org/r/#/c/192452/