Last modified: 2013-10-18 19:30:49 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T42207, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 40207 - Navigating PDF pagination should not require page reload
Navigating PDF pagination should not require page reload
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: balloonguy123
https://commons.wikimedia.org/wiki/Fi...
:
Depends on:
Blocks: ajax 55893
  Show dependency treegraph
 
Reported: 2012-09-13 01:28 UTC by MZMcBride
Modified: 2013-10-18 19:30 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description MZMcBride 2012-09-13 01:28:36 UTC
It would be nice if, when navigating through a paginated PDF, it did not require reloading the page every time you click "next page" or "previous page". I think some JavaScript can be employed here to update the URL and load the next/previous page without requiring everything to be refreshed. I don't imagine this would be too difficult to do, so I'm going to mark this as easy.

Example PDF: <https://commons.wikimedia.org/wiki/File:MediaWikiPerformanceProfiling.pdf>.
Comment 1 MZMcBride 2013-01-12 05:08:49 UTC
Nemo: if you have reason to believe that this bug would be difficult to resolve, please share in a comment.
Comment 2 balloonguy123 2013-04-27 23:41:37 UTC
I have implemented this as a user script at [[commons:User:Balloonguy/common.js]]. Comments and instructions on how to proceed further with this appreciated. I'm not sure what part of the core I should modify to include this.
Comment 3 MZMcBride 2013-04-28 05:24:14 UTC
(In reply to comment #2)
> I have implemented this as a user script at
> [[commons:User:Balloonguy/common.js]].

Sweet!

> Comments and instructions on how to proceed further with this appreciated.
> I'm not sure what part of the core I should modify to include this.

When you use "core" on this bug tracker, most people will think of "MediaWiki core", but this particular functionality (PDF handling) is actually in a MediaWiki extension called PdfHandler: <https://www.mediawiki.org/wiki/Extension:PdfHandler>.

In order to contribute to this extension, you'll need to get a [[mw:Gerrit]] account. To get started, simply visit [[mw:Developer access]].

Gerrit manages Wikimedia's Git repositories. The Git repository for this particular extension can be viewed here: <https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/PdfHandler.git;a=tree>.

I hope this helps. Thanks again for working on this. :-)
Comment 4 Gerrit Notification Bot 2013-05-02 18:06:38 UTC
Related URL: https://gerrit.wikimedia.org/r/62005 (Gerrit Change Icd1cde7c62c4d462f5b697b9f49f5c08f6e7482b)
Comment 5 balloonguy123 2013-05-02 18:28:17 UTC
I submitted a request with my changes. The code that creates the image pagination resides at ImagePage::openShowImage and is general for all multi-page images, which are currently PDF and DjVu files.
Comment 6 Gerrit Notification Bot 2013-08-15 20:31:29 UTC
Change 62005 merged by TheDJ:
Make image pagination not require a page load.

https://gerrit.wikimedia.org/r/62005
Comment 7 Derk-Jan Hartman 2013-08-15 20:31:57 UTC
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.
Comment 8 Bartosz Dziewoński 2013-10-18 19:30:49 UTC
Let's close this, I split improvement suggestions from comment 7 to bug 55893.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links