Help improve document application

asked 2015-04-20 10:54:57 +0300

updated 2015-10-01 12:27:34 +0300

  • 2015-10-01 : added the optional feature to remember last open page position and zoom level for PDF documents, see below.
  • 2015-05-28 : final proposal before sending a pull request upstream, see below.
  • 2015-05-20 : updated implementation for in-document search, see below.
  • 2015-04-23 : updated implementation for page selection, see below.

Toolbar developments

I would like to discuss here some improvements that can be done to the document application of Jolla. This application is free software and thus be modified / adapted by ourself. Specificaly speeking, I would like to address these issues for PDF documents :

I propose as a solution to have a toolbar that is displayed when the document is scrolled up and hidden when document is scrolled down, like in the browser. This makes the applications more consistent together. I've implemented this and I join a screen shot :

Toolbar for the PDF viewer

The code is visible in my github (toolbar branch). I've implemented on the left a page indicator, in the centre the space will be used for the search action (to be implemented later) and the icon on the right send to the table of content. What I would like your opinion on is :

  • how to make the page indicator easily seen that it is sensitive to tap and that it can open a page selection dialog ?
  • how to make the page indicator a bit more eye candy than just the document icon and numbers ?
  • general comments about the design and possibilities of such a toolbar.

Page navigation

2015-04-23 : after several trials, I've decided to put the capability to jump to a given page in the already existing Index page. This makes sense in my opinion since one use this page already to go to a specific page available from the table of content. I've thus added a "go to pag" text input at the bottom of the page, see below :

Table of content with the got to page text input Choosing a page number to jump to

I'm wondering if it's clever to have a single page and three entry points for this single page :

  • the tap and swipe to the right ;
  • the page numbers from the toolbar ;
  • and the table of content icon from the toolbar.

Any comments ?

In-PDF search interface

2015-05-20 : I've an initial implementation of in-document search for PDF files (search in documents). The search field is inside the toolbar. When tapped, it expand in all the toolbar and the user can enter a text to search for. Text is indeed search for after pressing the enter key. Then the two 'next' and 'previous' buttons appear to go to next or previous search match. There is an animation to highlight the next or previous match.

Toolbar with search capability in PDF documents

I need to add a feedback on search waiting time for long documents and a way to display the number of matchs. After that, I'll submit a pull request for this complete work on the toolbar. As mentioned before, the code is visible in my github (toolbar branch).

2015-05-28 : feedback has been added, and also a label to display the number of matching items. Also, as @Rolfa suggests, when searching, the first matching string is automatically scrolled to.

Any remarks ?

Testing

Before I send a pull request upstream, one can test this by installing an RPM compiled by me, available in my github. This is a non official RPM, so one should know what he's doing when installing it. One can return back to stock version typing 'pkcon install sailfish-office'.

Last page position developments

2015-10-01 I've developped a patch to add the possibility to remember last page position and zoom level for PDF documents. This feature is optional, and controlled by a entry in the settings (see the applications menu en the setting app). The way it works is quite simple, when leaving a PDF document (returning to the menu or quiting the application), the current page index, the position in the page and the zoom level is saved in a local database. When the same PDF document is open again, the view is immediately set at the saved position.

Before I send a pull request upstream, one can test this by installing an RPM compiled by me, available in my github. This is a non official RPM, so one should know what he's doing when installing it. One can return back to stock version typing 'pkcon install sailfish-office'.

edit retag flag offensive close delete

Comments

1

If it is not too much of a hassle, could you upload latest version to Openrepos? I suppose that is permitted. Toolbar is a good option like Sailfish browser which has good UI.

anandrkris ( 2015-04-20 15:53:10 +0300 )edit
3

I've created a pre-release in my github containing these modifications for testing purposes. I've attached a arm RPM there, see https://github.com/dcaliste/sailfish-office/releases/tag/TJC-toolbar-0.1 if someone would like to test.

One should know what he's doing while testing with this non-official RPM file.

One can return back to stock version typing 'pkcon install sailfish-office'.

PS : this RPM is based on current upstream HEAD, which means that it contains the correction made by @sverzegnassi for PDF documents with mixed page orientations, my commits for protected documents and issue when rotating devices for long PDF documents. By the way, report me any strange behaviours regarding device rotation and zoom that may be due to this patch and that I should correct.

Damien Caliste ( 2015-04-23 17:32:14 +0300 )edit

Thanks, I have updated package on my phone. First, glad to see password protection support. Page no. seems to work fine, is this default layout keyboard layout? Not sure of the usage of some keys eg: +/-

anandrkris ( 2015-04-24 10:59:54 +0300 )edit
3

I've created a pre-release in my github containing these modifications for testing purposes. I've attached a arm RPM there, see https://github.com/dcaliste/sailfish-office/releases/tag/TJC-toolbar-0.2 if someone would like to test. One should know what he's doing while testing with this non-official RPM file. See previous comment.

Damien Caliste ( 2015-05-20 11:42:56 +0300 )edit
2

Awesome work @damien-caliste :) It would be cool if there is a way to stop searching. I would go for something similar as in the browser?

Also while the search job is running it would be nice to have a BusyIndicator centered over the page.

Furthermore it would be cool to only show the highlights once the unerlying page was rendered.

lukedirtwalker ( 2015-05-20 13:08:47 +0300 )edit