Page MenuHomePhabricator

Prevent javascript from hiding page content indefinitely
Closed, ResolvedPublic

Description

Currently the content on wikipedia.org is hidden with javascript until a script fetches translations and replaces the text. This could lead to a situation where, if the script breaks, the content remains invisible.

A timeout should be set near the top of the page that added the classname jsl10n-visible to the HTML element so that the content is forced to be visible after a certain amount of time, regardless of whether the translations are ready.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 22 2017, 8:56 PM
JGirault added a subscriber: JGirault.

Sounds good to me.

Side note: the code can be put at the bottom of the page, it's just there as a worst-case fallback.

mxn added a subscriber: mxn.Feb 23 2017, 12:38 AM

Change 339376 had a related patch set uploaded (by Jdrewniak):
Setting a timeout to force display of page content

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

debt moved this task from What's Next to In Progress on the Discovery-Portal-Sprint board.
debt triaged this task as High priority.Mar 10 2017, 7:43 PM
debt added a project: Discovery.
debt added a comment.Mar 14 2017, 3:48 PM

This needs to be reviewed

Dzahn added a subscriber: Dzahn.Mar 17 2017, 6:46 PM

A user has mailed dns-admin@ and said:

Your JavaScript is slowing down your page time which leads to less user friendly module At

https://www.wikipedia.org/portal/wikipedia.org/assets/js/index-d1cc91a7f4.js

I am one of your user at Wikipedia
Username="Trish1996"

@Dzahn we monitor the performance of the wikipedia portal carefully here:
https://grafana.wikimedia.org/dashboard/db/webpagetest-portals?from=1458474417000&to=1490010417359

From all our metrics, the performance of the page has actually improved over the past year.

Dzahn added a comment.Mar 20 2017, 3:56 PM

Alright, cool. I'm merely reporting what users are sending us.

Alright, cool. I'm merely reporting what users are sending us.

Thank you! It is very appreciated. :-)

Change 339376 merged by jenkins-bot:
[wikimedia/portals] Setting a timeout to force display of page content

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

Dzahn removed a subscriber: Dzahn.Apr 13 2017, 3:57 PM
debt closed this task as Resolved.Apr 13 2017, 9:34 PM

This was deployed in production on April 11, 2017