Page MenuHomePhabricator

Mentor dashboard: the page displays additonal text when loading
Closed, ResolvedPublic

Description

  1. Go to Special:MentorDashboard page
  2. When the page loads - the text "The table requires JavaScript. Please enable JavaScript to be able to use this module" is visible.

Screen Shot 2021-08-26 at 4.54.00 PM.png (974×1 px, 122 KB)

  1. When the page finishes loading, the text is not displayed on the page:
    Screen Shot 2021-08-27 at 4.34.00 PM.png (638×874 px, 102 KB)
  • A users sees the message only for a split second - it's not possible to read it
  • The message is not an indication that JavaScript is disabled on a client side.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Urbanecm_WMF added a subscriber: Tgr.

Thank you for pointing this out. I’m not sure how to prevent it well, though. That’s because mentee overview’s server render method merely outputs this text, and JavaScript replaces it with the actual module. That was done to avoid implementing rendering twice (once for JavaScript clients, with all features, including JS-only, like popups; second time server-side either with just first table, or by reimplementing everything via forms and page reloads).

I can check where the replacing happens in the code, and move it to the earliest phase possible, which can theoretically reduce the timeframe during which this message is displayed, but not fully prevent showing it.

I’m unaware of any way to check for JS enablement from the server side. If there is such a way, fixing this would be trivial (render a blank div for JS clients and a message for non-JS clients). @Tgr, do you have any thoughts or suggestions?

Something like

.client-js .growthexperiments-mentor-dashboard-module-mentee-overview-content { display: none }

would work I think. Doesn't necessarily prevent the flash of content but makes it as short as possible.

Urbanecm_WMF triaged this task as Low priority.

I will try @Tgr's suggestion out. Thanks!

Change 717021 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] Mentor dashboard: Try to hide no JS notice from JS users

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

Change 717021 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Mentor dashboard: Try to hide no JS notice from JS users

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

@Etonkovidova We tried to decrease the time the message can be seen, hopefully this is enough. Please re-review!

Checked in betalabs - the text "The table requires JavaScript. Please enable JavaScript to be able to use this module" is not visible anymore, even network throttling.