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

JGirault subscribed.

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.

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 triaged this task as High priority.Mar 10 2017, 7:43 PM
debt added a project: Discovery-ARCHIVED.

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.

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

This was deployed in production on April 11, 2017