Page MenuHomePhabricator

Add edit history graph(s) to MediaWiki's info action
Open, LowestPublic

Description

It would be nice to have a graph/graphs of edits over time in MediaWiki's info action.

See also

Details

Reference
bz41329

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 22 2014, 1:10 AM
bzimport set Reference to bz41329.
bzimport added a subscriber: Unknown Object (MLST).

Zak Greant wrote a Greasemonkey script "MediaWiki history Sparklines" which we might want to integrate:

http://userscripts.org/scripts/show/79234

That would be a nice experiment, can most probably be implemented as a Gadget too.

(In reply to comment #1)

Zak Greant wrote a Greasemonkey script "MediaWiki history Sparklines" which we
might want to integrate:

http://userscripts.org/scripts/show/79234

Neat!

That would be a nice experiment, can most probably be implemented as a Gadget
too.

Hmm, maybe. The nice thing here is that we have all of the data already (edit timestamp, page title) and it's indexed. The not-so-nice thing here is that the edge cases are a bit rough. Some pages have over 600,000 revisions.

Zak's user script is hitting the API. For small pages, this is fine. For large pages, this is probably impractical. If this feature were implemented as an extension, it could do direct queries on the database to get the underlying data and/or use a cache store/database table for larger pages.

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

Just a draft. If anybody can come up with a better way to draw graphs other than a jQuery extension, please do. I figured a JavaScript dependency would be easier to manage than a PHP dependency.

Also, it should be noted this is a bit of a draft. There is some polishing that can be done to make the graph look better.

-easy: given the discussion on commit doesn't seem so at all.

Wondering whether to move this to Extension requests too, as per dependency on bug 43666?

Patch abandoned in April 2013, resetting to New.

He7d3r set Security to None.

Wondering whether to move this to Extension requests too, as per dependency on bug 43666?

I think MediaWiki core would expose this data. Consumers might include the Graph extension. The question is then where the code that takes the data and turns into a graph that's usable at action=info would live. I'm not sure about that part.

In action=history we have year/month selectors now, so a logical starting point would be an (approximate) count of edits by year. Could even start as a table, if plotting is an issue; I don't remember if the gnuplot situation improved.

@MZMcBride: I don't think this task is well-described with pointers to help the contributor and falls under good first task?

@MZMcBride: I don't think this task is well-described with pointers to help the contributor and falls under good first task?

I think T43329#2773559 is a pretty big pointer. What more do you think is needed?

Currently the tags on this task imply that it's about writing a new extension from scratch (MediaWiki-extension-requests) but maybe that's not the case and this is just MediaWiki-General core territory now?

Currently the tags on this task imply that it's about writing a new extension from scratch (MediaWiki-extension-requests) but maybe that's not the case and this is just MediaWiki-General core territory now?

I don't think an extension is needed right now.

Writing a client-side JavaScript implementation should be fairly straightforward. The heavy lifts are building a graphing library and exposing the revision data in an API, both of which are now resolved.

A junior developer could dump data from an api.php call to a page similar to https://www.mediawiki.org/wiki/Extension:Graph/data/sp500-csv and then build a graph simliar to https://www.mediawiki.org/wiki/Extension:Graph/Demo/OverviewDetail. That would be a start.

From what I remember about Zak Greant "MediaWiki history Sparklines" script, I would say that the Revision-Slider extension is an appropriate response to this task.

It is available as a beta feature and is going to be enabled by default on mediawiki.org right now ( https://gerrit.wikimedia.org/r/319540 T149724 ).

https://www.mediawiki.org/wiki/Extension:RevisionSlider

Writing an extension from scratch does not sound like good first task.