Page MenuHomePhabricator

Replace phplot graphs with JavaScript library solution
Closed, ResolvedPublic

Description

This will make the data better reusable as it will be exposed in machine readable format. With JavaScript we also do not need to worry about fonts and we can make prettier and more interactive graphs.

Event Timeline

Nikerabbit added a project: patch-welcome.
Nikerabbit moved this task from Backlog to Statistics on the MediaWiki-extensions-Translate board.

Change 620736 had a related patch set uploaded (by Abijeet Patro; owner: Abijeet Patro):
[mediawiki/extensions/Translate@master] [WIP] Add Chart.js in Special:TranslationStats

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

Screenshot from a quick POC -

Will discuss with Niklas further.

Change 622546 had a related patch set uploaded (by Abijeet Patro; owner: Abijeet Patro):
[mediawiki/extensions/Translate@master] Create separate classes for different graph types

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

Change 622547 had a related patch set uploaded (by Abijeet Patro; owner: Abijeet Patro):
[mediawiki/extensions/Translate@master] Refactor stats data fetching logic into TranslationStatsDataProvider

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

Change 622548 had a related patch set uploaded (by Abijeet Patro; owner: Abijeet Patro):
[mediawiki/extensions/Translate@master] Add a common interface to query graph options

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

Change 623169 had a related patch set uploaded (by Abijeet Patro; owner: Abijeet Patro):
[mediawiki/extensions/Translate@master] Add API to fetch translation stats

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

Change 622546 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Create separate classes for different graph types

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

Change 622547 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Refactor stats data fetching logic into TranslationStatsDataProvider

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

Change 622548 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Add a common interface to query translation statistics

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

Change 627477 had a related patch set uploaded (by Abijeet Patro; owner: Abijeet Patro):
[mediawiki/extensions/Translate@master] Ignore empty array options when generating TranslationStats template code

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

Change 623169 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Add API to fetch translation stats

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

Change 620736 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Add Chart.js in Special:TranslationStats

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

Change 627477 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Ignore empty array options when generating TranslationStats template code

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

Change 627984 had a related patch set uploaded (by Abijeet Patro; owner: Abijeet Patro):
[mediawiki/extensions/Translate@master] Align translation stats graphs horizontally

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

This is now deployed on Translatewiki.net. We've removed the dependency on PHPlot and are now rendering the graph using Chart.js. While working on this, we've also added an API (translationstats) that is queried to fetch the data for the graph.

We're going to file some follow-up tasks to do some bug fixes and other code improvements that were identified while working on this task.

Development on all tasks (and bugs) under this task is done and deployed. Currently waiting for QA on T263543: Improve accessibility for the Translation statistics and configuration change for T264158: Stat type registrations is too slow for Wikimedia production

All sub-tasks have been resolved.