Page MenuHomePhabricator

Support page view graphs in Charts extension (Graphs parity request)
Open, LowPublicFeature

Description

We've gotten a number of requests for providing again a way to do page-view graphs as was doable on Graphs (cf T334940). This remains a key post-MVP requirement, and it would be nice to get it going as we have most of the infrastructure needed now.

Graphs was doing client-side REST API fetching of the page view data, which is exposed into pageinfo data by PageViewInfo:

It's also available via action API: https://www.mediawiki.org/w/api.php?action=query&titles=Main_Page&prop=pageviews

So the data's available, but we have no way to query it as a data source in Charts at this time.

Current plan is to remedy this by exposing the page views data to Lua code which can fill out the data set in a transform, either:

  • -> use ExternalData extension with allow-listing of rest API targets
  • -> something like ExternalData but tuned to our specific needs

This is outside scope of the MVP for Charts Task Force but is a good stretch goal / potential work for Community Wishlist and should be prioritized sooner rather than later.

Event Timeline

CCiufo-WMF changed the subtype of this task from "Task" to "Feature Request".

This is outside scope of the MVP for Charts Task Force

No, it's not. This was the job.

Note that the MVP for the taskforce indeed doesn't include adding this specific data lookup ability, but it has gotten us to the point where the missing part *is* the specific lookup ability, which will make it much easier to add coming up.

The most likely implementation method will be to either adopt ExternalData with sufficient settings to allow querying REST API hits, or something very similar to it, from Lua code that can then stuff them into the chart.

I don't know what MVP stands for.

However, if after 27 months of breaking something, the so-called solution doesn't include solving the things that were perfectly working before, then we are not talking about a "missing part", but about negligence.

There has been lots of discussions about what should be done, and solving at least what we had, was pointed out again and again. There has been even live events (i.e. Hackathons) were this have been commented. If no one in the team took notes, then there's a problem somewhere, but not in the volunteer's side.

As mentioned in T396269, we have a notable 7,7% of pages at Basque Wikipedia with an error message (for more than two years): https://eu.wikipedia.org/wiki/Kategoria:Pages_with_disabled_graphs.

Solving that is not a small issue, is *the* issue.

MVP stands for "minimum viable product", and refers to a more or less basically functional version of a feature that can be added to and improved.

In this case, the system is that it can take Data: pages and render them to charts with the key features of a chart. The secondary work then proceeds, which is adding additional data sources but with less of the problems we had with the previous sytem.

If you have specific helpful comments about the functioning of the MediaWiki Rest API and the pageviews stores, or the existing code in Extension:ExternalData please feel free to be involved in that process.

Otherwise I assure you we already know that the page view graphs are very popular and people want them back, and that we're looking at how to do that most cleanly (rather than, just doing the fastest thing that could have worked.)

the system is that it can take Data: pages and render them to charts with the key features of a chart.

No, it can't: T396269

the system is that it can take Data: pages and render them to charts with the key features of a chart.

No, it can't: T396269

That's an unactionable task as written, so I'm turning it into a tracking task. For any group of specific graphs that aren't doable now, please try to extract a common attribute that could describe them as a group. If you're not willing to create individual tasks for those groupings, then at least please provide specific links from which others can do the work. Thanks.