Page MenuHomePhabricator

Navigating PDF/DJVU pagination could be improved
Closed, ResolvedPublic

Description

Quoth bug 40207 comment 7:

Open points for future improvement are:

1: tracking history (using history.pushState or hash fragment tracking).
2: mw.hook notifying about finishing the loading of the page fragment
3: using api to do all of it, instead of downloading a full page.


Version: 1.22.0
Severity: enhancement
Whiteboard: gci2013
URL: https://commons.wikimedia.org/wiki/File:MediaWikiPerformanceProfiling.pdf

Details

Reference
bz55893

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:16 AM
bzimport set Reference to bz55893.
bzimport added a subscriber: Unknown Object (MLST).

Working on this as part of GCI. Some thoughts and a status update:

  1. Mostly implemented, but having a bit of trouble with popstate event handling (specifically, state data disappearing after the back button is clicked 2+ times?) -- will investigate further, but may come back here for guidance.
  1. Done.
  1. *Thinking* about this. Will require a different approach to #1 as well, but should follow the same basic principles. Will work on tomorrow/over weekend as time permits.

(In reply to comment #1)

Yay! :-) Thanks for working on this.

(In reply to comment #1)

  1. (…) having a bit of trouble with popstate event handling

(specifically, state data disappearing after the back button is clicked 2+
times?) -- will investigate further, but may come back here for guidance.

Let me just note that it will be much easier for everyone to see what's going on if they can see the code :) Submitting incomplete or work-in-progress patches to gerrit is perfectly okay, since you can always change them later.

  1. *Thinking* about this.

Heh, you're ambitious I see ;) I'm really itching to see what you come up with.

Hmm, the task has been claimed by somebody else… :(

Change 97125 had a related patch set uploaded by Theopolisme:
Improve PDF/DJVU navigation

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

Made a patch anyways. The more the merrier I suppose...it's not about the specific tasks, it's about improving Wikipedia ;)

Change 97363 had a related patch set uploaded by RAZVOR:
nc

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

t.lam wrote:

I just started working on this and was wondering how to make my local installation of mediawiki have the multipage viewing

(In reply to comment #9)

@Thomas replied at GCI task.

Link?

Broadly, we should probably cross-reference in both directions (Bugzilla <--> GCI), if we're not already doing so.

Change 97125 merged by jenkins-bot:
Improve PDF/DJVU navigation

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

The first two points from comment 0 are done.

The last point is not done and I'm personally not sure if it's worth doing at all (maybe if we introduce some sane client- and server-side template system into MediaWiki to avoid having two ways of rendering the same thing?), so I'll close this bug. Thanks!

Change 97363 abandoned by Brian Wolff:
Improve PDF/DJVU navigation

Reason:
Sorry, but this appears to already be done by someone else in 5e77f391a528d4bc64fc8cfe8065e254427b9ccd

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

The last point is actually fairly impossible without a rewrite of how the API provides media resources (since we're using (~dynamically) generated static graphics files, not the raw pdfs, etc, etc). So, yep, resolved :)

(In reply to comment #15)

The last point is actually fairly impossible without a rewrite of how the API
provides media resources (since we're using (~dynamically) generated static
graphics files, not the raw pdfs, etc, etc). So, yep, resolved :)

Actually for pdf files that's not to hard - the imageinfo module will provide urls to the thumbnail, but the general case is hard (e.g. ogg that does js stuff), and I don't think we should do it unless it would work with any potential future formats

  NODES
Note 2
Project 1