Page MenuHomePhabricator

Add page views graph(s) to MediaWiki's info action for Wikimedia wikis
Closed, ResolvedPublic

Description

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

T63250: Redesign (prettify) MediaWiki's info action

Details

Reference
bz41327

Related Objects

Event Timeline

bzimport raised the priority of this task from to Lowest.
bzimport set Reference to bz41327.
bzimport added a subscriber: Unknown Object (MLST).

I talked to David S. about this earlier today. The problem currently is that this data simply isn't available (yet). The analytics infrastructure simply isn't there (yet!). I think we'll see a usable API by the end of 2013.

In the meantime, this gives us a bit over a year to get the feature request we do already have data for (bug 41329, "Add edit history graph(s) to MediaWiki's info action") implemented nicely (sanely). :-) This bug is going to be open for a bit, even though it's not really directly actionable right now.

Well, there's no way this can be done on server-side, because that would mess up Squid caching completely. The only option would be to some sort of JavaScript that reports back to the server, which would then enqueue a Job. I would guess the actual DB update would only occur after a certain number of views. The only problem is that jobs are stored in the database, so it would mean a query anyway, so there may just have to be a separate caching mechanism.

I took a stab at building this today (local wiki hacked up to show en.wp page views):

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 7 2016, 10:51 AM
Tgr added a subscriber: Tgr.Jan 13 2016, 10:34 PM

Preliminary code is now in the WikimediaPageViewInfo extension in gerrit.

Pine awarded a token.Feb 1 2016, 7:22 PM
Pine added a subscriber: Pine.
Jdforrester-WMF renamed this task from Add page views graph(s) to MediaWiki's info action to Add page views graph(s) to MediaWiki's info action for Wikimedia wikis.Feb 4 2016, 11:44 PM
Jdforrester-WMF removed a subscriber: wikibugs-l-list.
Legoktm claimed this task.Mar 11 2016, 7:26 PM
Legoktm edited projects, added PageViewInfo; removed MediaWiki-General-or-Unknown.
whym awarded a token.Mar 23 2016, 3:39 AM

The Wikimedia-Hackathon-2016 starts tomorrow and this task is featured at T119703. We want to use T130776: Wikimedia Hackathon 2016 Opening Session to promote these projects and help recruiting volunteers to work for them.

If this task is ripe for hackathon work, please follow these instructions. If it is not ready, remove it from T119703 in order to avoid volunteers' frustration. Thank you!

Liuxinyu970226 awarded a token.
Liuxinyu970226 added a subscriber: Liuxinyu970226.
Tgr added a comment.Mar 20 2017, 9:29 PM

Possible improvements: T160243: Use non smoothed style for PageViewInfo graph and showing the graph without the extra click (compare to Commons which uses a Graph + system message hack to do that).

and showing the graph without the extra click

Or at least make the graph more discoverable. I'm not sure how, other than by embedding it directly. Perhaps a button?

Why is the graph not embedded directly into the page? Maybe like a thumbnail sized-version and clicking it can open a larger view?

@Niharika: I think it's to avoid constantly invalidating the squid caches, although I wonder how we're avoiding that with including the total in the page. Seems like it would be just as problematic.

I think right now it is pretty obscure. It's not very intuitive that clicking the total pageviews count would pop up the graph.

Tgr added a comment.Mar 22 2017, 12:14 AM

Varnish ignores almost everything that has a query string.

$ curl -vs 'https://en.wikipedia.org/w/index.php?title=Main_Page&action=info' |& grep Cache-Status
< X-Cache-Status: pass

There is no performance difference whatsoever, it was probably just a design decision (as in: no one gave it too much thought).

In T43327#3120423, @Tgr wrote:

There is no performance difference whatsoever, it was probably just a design decision (as in: no one gave it too much thought).

This.

Liuxinyu970226 removed a subscriber: Liuxinyu970226.
Legoktm closed this task as Resolved.Jul 31 2018, 1:46 AM
Legoktm reassigned this task from Legoktm to Tgr.

I'm closing this as resolved, since the functionality is enabled and available (and @Tgr did most of the heavy lifting at the end!). While it's not perfect, specific enhancement requests should be tracked in the PageViewInfo project.