Page MenuHomePhabricator

Do not blur non-JS version of chart while loading
Open, LowPublic

Description

Reproduce:

Result:

image.png (698×485 px, 51 KB)

Expected:
No blur should happen.

Note:
The relevant code is here: https://gerrit.wikimedia.org/g/mediawiki/extensions/Chart/+/f5c718a7057a8263b4747e65ebd42cc870255417/resources/ext.chart/styles.less#14
And also T378210: Update chart extension to include client side rendering has "charts will appear blurred initially until the echarts library has loaded and progressively enhanced the chart"

However no part of MediaWiki interface is blurred while loading, so I am not sure it is the right thing to do. I have reason against blurring: Chart should be readable even before JS is fully loaded, for users with slow Internet connection loading JS needs a bit long time; and it should also be readable even if JS failed to load for whatever reason.

Event Timeline

Seddon triaged this task as Low priority.Dec 9 2024, 7:48 PM
Jdlrobson subscribed.

The non-JS chart is different from the JS rendered chart, so the blur improves the transition as the code loads on demand. Derek are there other approaches we could take here.

Regarding slow/dropped connections I think we could make these a bit more resilient. I will open a new bug for this.

DTorsani-WMF subscribed.

Ideally we would use a skeleton loader, but we don't have that yet in Codex and so we don't have definitive guidance on this. However, there is this task that we could draw inspiration from since we're not using Codex components anyways. We do have a ProgressBar component in codex, and we have used other loaders in other instances, but I'm not sure those are right for this. Do you think we could try some sort of skeleton loader?

I think the blur effect solves the same problem as the skeleton loader, so if we aren't fundamentally pursuing a different loading approach, we should leave it as-is for now until the skeleton is available.

Wellverywell raised the priority of this task from Low to Medium.Dec 4 2025, 3:29 AM
Aklapper lowered the priority of this task from Medium to Low.Dec 4 2025, 11:49 AM
Aklapper added a subscriber: Wellverywell.