After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 745172 - Handle inability to load unsupported e-book formats
Handle inability to load unsupported e-book formats
Status: RESOLVED FIXED
Product: gnome-documents
Classification: Core
Component: books
unspecified
Other All
: Normal normal
: ---
Assigned To: GNOME Books Maintainers
GNOME documents maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-02-25 17:16 UTC by Bastien Nocera
Modified: 2015-03-25 13:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
books: Hide unsupported book types (1.46 KB, patch)
2015-02-25 17:16 UTC, Bastien Nocera
none Details | Review
books: Hide unsupported book types (2.02 KB, patch)
2015-02-26 11:19 UTC, Bastien Nocera
none Details | Review
documents: Fix spinner starting after an error (1.53 KB, patch)
2015-03-02 13:26 UTC, Bastien Nocera
committed Details | Review
books: Show a warning when trying to load e-Books (2.74 KB, patch)
2015-03-02 13:26 UTC, Bastien Nocera
none Details | Review
preview: Remove unused variable (1.12 KB, patch)
2015-03-06 15:13 UTC, Debarshi Ray
committed Details | Review
view, errorBox: Split ErrorBox into its own file (6.35 KB, patch)
2015-03-06 15:13 UTC, Debarshi Ray
committed Details | Review
preview: Restore the ability to handle load-error (4.72 KB, patch)
2015-03-06 15:14 UTC, Debarshi Ray
committed Details | Review
books: Show a warning when trying to load e-Books (2.19 KB, patch)
2015-03-06 15:15 UTC, Debarshi Ray
committed Details | Review
Screenshot (19.09 KB, image/png)
2015-03-06 15:19 UTC, Debarshi Ray
  Details

Description Bastien Nocera 2015-02-25 17:16:42 UTC
.
Comment 1 Bastien Nocera 2015-02-25 17:16:45 UTC
Created attachment 297906 [details] [review]
books: Hide unsupported book types

As we do not have a viewer for ePub books yet, don't show them in the UI.
Comment 2 Cosimo Cecchi 2015-02-25 17:54:17 UTC
Review of attachment 297906 [details] [review]:

What about all the other non-ePub formats that you removed?
If they're also not viewable yet, consider this a-c-n.
Comment 3 Bastien Nocera 2015-02-25 18:11:34 UTC
(In reply to Cosimo Cecchi from comment #2)
> Review of attachment 297906 [details] [review] [review]:
> 
> What about all the other non-ePub formats that you removed?
> If they're also not viewable yet, consider this a-c-n.

None of them can be viewed yet. I would personally have preferred still showing the items, because it's a book manager, even if we couldn't play them, in the same way that Music or Videos might show videos that cannot be played.

Allan?
Comment 4 Debarshi Ray 2015-02-25 19:26:58 UTC
Review of attachment 297906 [details] [review]:

I created an early gnome-3-16 branch for this, so that we don't get into a revert epubs / unrevert epubs cycle in master. So please push to it if you end up removing these.

::: src/search.js
@@ -214,3 @@
-                                        name: _("e-Books"),
-                                        filter: '(nie:mimeType(?urn) IN (\"application/epub+zip\", \"application/x-mobipocket-ebook\", \"application/x-fictionbook+xml\", \"application/x-zip-compressed-fb2\"))',
-                                        where: '?urn rdf:type nfo:EBook .' }));

You will also need to remove EBOOKS from getDocumentTypes.
Comment 5 Bastien Nocera 2015-02-26 11:19:36 UTC
Created attachment 297961 [details] [review]
books: Hide unsupported book types

As we do not have a viewer for ePub books yet, don't show them in the UI.
Comment 6 Allan Day 2015-02-26 11:29:41 UTC
(In reply to Bastien Nocera from comment #3)
...
> None of them can be viewed yet. I would personally have preferred still
> showing the items, because it's a book manager, even if we couldn't play
> them, in the same way that Music or Videos might show videos that cannot be
> played.
> 
> Allan?

I'm not entirely sure about this being comparable to Music [1], but I agree that it's a bit odd to have a Books app that doesn't show any books in it. :) Since I assume that 3.16 is going to be billed as a preview, it might even be nice to show a hint when someone tries to view a book:

"You are currently using a preview of Books. Full viewing capabilities are coming soon!"

Or something like that.


[1] Non-playable music is generally due to codecs, which is an idea that people are used to. The same isn't true for Books.
Comment 7 Debarshi Ray 2015-02-26 12:08:41 UTC
(In reply to Allan Day from comment #6)

> I'm not entirely sure about this being comparable to Music

You can still get a music player to somehow play the file if you install the codec. In this case, the code simply does not exist anywhere.

> it's a bit odd to have a Books app that doesn't show any books in it

It can still show comic book archives in its current form.
Comment 8 Allan Day 2015-02-26 12:17:45 UTC
(In reply to Debarshi Ray from comment #7)
...
> > I'm not entirely sure about this being comparable to Music
> 
> You can still get a music player to somehow play the file if you install the
> codec. In this case, the code simply does not exist anywhere.

Right, I think that's the point I was trying to make. 

> > it's a bit odd to have a Books app that doesn't show any books in it
> 
> It can still show comic book archives in its current form.

Yes, but given that ePub is the most commonly associated format with books, it would be odd not to show them. There will be a lot of cases where people have ePubs but not comics.
Comment 9 Cosimo Cecchi 2015-02-26 17:49:50 UTC
I would be fine keeping the ePub files in the view for 3.16, and add a dialog or a page with a message like Allan proposed, if we're not too late for that now.
Comment 10 Bastien Nocera 2015-03-02 13:26:06 UTC
Created attachment 298284 [details] [review]
documents: Fix spinner starting after an error

In some circumstances, such as the PDF loading throwing an error during
the load() call, the error signal could be received before
"load-started" is, starting the spinner even though we can't make any
progress.
Comment 11 Bastien Nocera 2015-03-02 13:26:10 UTC
Created attachment 298285 [details] [review]
books: Show a warning when trying to load e-Books

e-Books cannot be previewed yet, but will be in the future. When trying
to load an ePub, MOBI, etc. book, throw an error saying:
You are currently using a preview of Books. Full viewing capabilities
are coming soon!
Comment 12 Debarshi Ray 2015-03-03 16:58:08 UTC
Review of attachment 298284 [details] [review]:

Looks good to me. Thanks, Bastien.
Comment 13 Debarshi Ray 2015-03-06 15:13:33 UTC
Created attachment 298719 [details] [review]
preview: Remove unused variable
Comment 14 Debarshi Ray 2015-03-06 15:13:59 UTC
Created attachment 298720 [details] [review]
view, errorBox: Split ErrorBox into its own file
Comment 15 Debarshi Ray 2015-03-06 15:14:31 UTC
Created attachment 298721 [details] [review]
preview: Restore the ability to handle load-error
Comment 16 Debarshi Ray 2015-03-06 15:15:11 UTC
Created attachment 298722 [details] [review]
books: Show a warning when trying to load e-Books
Comment 17 Debarshi Ray 2015-03-06 15:16:43 UTC
These patches introduce this new string:
"You are using a preview of Books. Full viewing capabilities are coming soon!"
Comment 18 Debarshi Ray 2015-03-06 15:19:54 UTC
Created attachment 298723 [details]
Screenshot
Comment 19 André Klapper 2015-03-06 15:51:21 UTC
> "You are using a preview of Books. Full viewing capabilities are coming
> soon!"

Is it helpful to tell me something about "full viewing capabilities" when the very same dialog also says "unable to load file" and rather makes me want to know why the application cannot load that file?
File not found? File somehow broken? DRM restrictions? What do I know?

(If you want to imply that some formats are not supported yet by the software, you might want to make that crystal clear, apart from optimistic phrasing?)
Comment 20 Debarshi Ray 2015-03-25 13:32:18 UTC
From #gnome-hackers on GIMPNet:

13:25 <andre> I'd say too late now to break strings for 3.16 so I'd keep the    
      strings as is
13:25 <andre> (and also too unimportant)
Comment 21 Bastien Nocera 2015-03-25 13:50:54 UTC
Reassigning to new default assignee.