Merge lp:~verzegnassi-stefano/ubuntu-docviewer-app/document-page-filters into lp:ubuntu-docviewer-app/trunk
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Alan Pope πΊπ§π± π¦ on 2015-06-23 | ||||
| Approved revision: | 157 | ||||
| Merged at revision: | 152 | ||||
| Proposed branch: | lp:~verzegnassi-stefano/ubuntu-docviewer-app/document-page-filters | ||||
| Merge into: | lp:ubuntu-docviewer-app/trunk | ||||
| Diff against target: |
848 lines (+540/-62) 11 files modified
po/com.ubuntu.docviewer.pot (+81/-20) src/app/graphics/settings_alt.svg (+138/-0) src/app/qml/documentPage/DocumentGridView.qml (+8/-0) src/app/qml/documentPage/DocumentListDelegate.qml (+36/-11) src/app/qml/documentPage/DocumentListView.qml (+46/-14) src/app/qml/documentPage/DocumentPage.qml (+17/-6) src/app/qml/documentPage/DocumentPageDefaultHeader.qml (+27/-8) src/app/qml/documentPage/DocumentPageSearchHeader.qml (+57/-0) src/app/qml/documentPage/SearchEmptyState.qml (+32/-0) src/app/qml/documentPage/SortSettingsDialog.qml (+57/-0) src/app/qml/ubuntu-docviewer-app.qml (+41/-3) |
||||
| To merge this branch: | bzr merge lp:~verzegnassi-stefano/ubuntu-docviewer-app/document-page-filters | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Alan Pope πΊπ§π± π¦ | 2015-06-12 | Approve on 2015-06-22 | |
| Ubuntu Phone Apps Jenkins Bot | continuous-integration | Approve on 2015-06-22 | |
|
Review via email:
|
|||
Commit Message
Added a search mode for the DocumentPage and a list of sorting options.
Description of the Change
This MP adds a "search" mode for the DocumentPage and a list of sorting options.
The available options are:
- Sort by name
- Sort by date (default)
- Sort by size
The search filter is reset when docviewer receives a request for exporting a document via Content Hub.
A further empty state is shown when the search returns no result.
----------
I'm also interested in getting some opinion about the following questions:
1) Is it ok to use a Dialog to provide these settings?
2) I reused an earlier "settings" icon from the Suru icon theme, since there's no icon for "sort". Is there anything better out there that we can use?
3) Is my English good? :-P Please check for any error in the dialog or in the empty state.
| Alan Pope πΊπ§π± π¦ (popey) wrote : | # |
Overall it's great, I really like being able to sort the documents now.
A few observations:-
* With more buttons in the taskbar, we truncate the app name further. On the bq e4.5 it's "Document Vie..." in portrait mode. I'm wondering if we should consider truncating it down to just "Viewer"?
* The alphabetical sort order seems to be A-Z then a-z. So a document starting with a lower case "p" appears after a document with upper case "Y" which is confusing to people who don't know how standard sorting on Linux works. Perhaps we should aggregate the sort so docs are grouped together - e.g. docs starting with lower "p" and "P" together?
* I managed to crash the app if I scroll to the bottom of the list, then change the sort order from "Sort by date" to "Sort by name". I have 21 docs locally, and 7 docs on SD card, so not a huge number. Only seems to crash if I'm at the bottom of the list.
* When changing the sort order, should we jump to the top of the list? Seems strange to change the sort order and be left in the middle.
> * With more buttons in the taskbar, we truncate the app name further. On the
> bq e4.5 it's "Document Vie..." in portrait mode. I'm wondering if we should
> consider truncating it down to just "Viewer"?
"Viewer" sounds a bit generic to me. I'd prefer to switch the title of the page to "Documents", so that the purpose of the app is still understandable ("Viewer" could refers also to other formats - e.g. images - which we don't support).
> * The alphabetical sort order seems to be A-Z then a-z. So a document starting
> with a lower case "p" appears after a document with upper case "Y" which is
> confusing to people who don't know how standard sorting on Linux works.
> Perhaps we should aggregate the sort so docs are grouped together - e.g. docs
> starting with lower "p" and "P" together?
Huh, right. This urges a fix. I forgot to set the "sortCaseSensit
> * I managed to crash the app if I scroll to the bottom of the list, then
> change the sort order from "Sort by date" to "Sort by name". I have 21 docs
> locally, and 7 docs on SD card, so not a huge number. Only seems to crash if
> I'm at the bottom of the list.
Will have a check, thanks.
> * When changing the sort order, should we jump to the top of the list? Seems
> strange to change the sort order and be left in the middle.
+1. I'll update the branch with a fix for this.
| Alan Pope πΊπ§π± π¦ (popey) wrote : | # |
+1 to "Documents".
- 153. By Stefano Verzegnassi on 2015-06-22
-
Updated the title of DocumentPage
- 154. By Stefano Verzegnassi on 2015-06-22
-
Fixed case sensitivity for alphabetic sort
- 155. By Stefano Verzegnassi on 2015-06-22
-
Fixed date-time of the subText of the DocumentListDel
egate (dateDiff value changed when we started to use an Enum for it) - 156. By Stefano Verzegnassi on 2015-06-22
-
Fixed badly formatted date-time in the subText of DocumentListDel
egate when a sort rule, different than 'by date' is used. - 157. By Stefano Verzegnassi on 2015-06-22
-
Position view at beginning when the sortMode value is changed
* Update title to "Documents"
Done.
* Perhaps we should aggregate the sort so docs are grouped together - e.g. docs starting with lower "p" and "P" together?
Done.
* I managed to crash the app if I scroll to the bottom of the list, then change the sort order from "Sort by date" to "Sort by name". I have 21 docs locally, and 7 docs on SD card, so not a huge number. Only seems to crash if I'm at the bottom of the list.
I've tried to reproduce this on my desktop (Ubuntu 15.04 and ubuntu-sdk-team PPA). I've also mount an additional drive in order to emulate the SD card presence.
I've seen no crash: could you please make a second attempt with the latest commit?
* When changing the sort order, should we jump to the top of the list? Seems strange to change the sort order and be left in the middle.
Done.
Also, I've fixed an issue with the date-time shown in the ListView delegate. With the revision 143, I changed the values for the "dateDiff" role of DocumentsModel, but the logic that generates the date-time strings hasn't been updated.
Moreover, now we also show the right date-time string for any of the implemented sortModes (e.g. when sorting by name, we don't have a "Today" or "This week" section header. The string is now properly set as "Today, hh:mm" and not a generic "hh:mm").
PASSED: Continuous integration, rev:157
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Alan Pope πΊπ§π± π¦ (popey) wrote : | # |
Tested on my bq E4.5 and it works really nicely. I couldn't reproduce the crash any more and the sort order looks better. Thanks Stefano!


PASSED: Continuous integration, rev:152 91.189. 93.70:8080/ job/ubuntu- docviewer- app-ci/ 222/ 91.189. 93.70:8080/ job/generic- mediumtests- utopic/ 2927 91.189. 93.70:8080/ job/generic- mediumtests- utopic/ 2927/artifact/ work/output/ *zip*/output. zip 91.189. 93.70:8080/ job/ubuntu- docviewer- app-utopic- amd64-ci/ 119 91.189. 93.70:8080/ job/ubuntu- docviewer- app-vivid- amd64-ci/ 125
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild: 91.189. 93.70:8080/ job/ubuntu- docviewer- app-ci/ 222/rebuild
http://