Mantano/iridium

reader widget not showing TOC

voipworld opened this issue Β· 28 comments

Hello,
i want to inform you dear developer, that the newer iridium reader widget is not showing table of content from two diferent epub files.
i can see bookmarks but not the TOC.
thanks,
Tayeb.

this is one of the ebooks that's not able to be read by the table of content panel, link to download:
https://old.shamela.ws/epubs/090/9089.epub

Hi @voipworld I tried your ebook with :

  • a Readium 2-based app, but it doesn't show any Table of Contents neither.
  • Apple iBooks: I can see the TOC
  • Our good old Bookari Premium: I can see the TOC.
    So this may be an issue with the R2 parser (our Flutter parser is ported from R2)... Do you know a Radium-2 based app that can correctly display the TOC ?
    BTW: we do not support RTL for now, but this shouldn't be too difficult. I add it explicitly on the roadmap.

Hello,
i realy dont know any readium based app for now, but i try always with a good android epub reader called "Reasily", i can see the toc.
but i'm wondring why i can see the TOC with the ebook provided with the demo apps, and not this epub files?

hi @jmgeffroy
i wanted to add a small note: in the bookmarks panel after adding bookmarks, how to know to what bookmark i'm going to? all i can see is a button, but no label or something. if i have 10 bookmarks, how to identify them?

hi @jmgeffroy
i wanted to add a small note: in the bookmarks panel after adding bookmarks, how to know to what bookmark i'm going to? all i can see is a button, but no label or something. if i have 10 bookmarks, how to identify them?
That's a recent regression. You should see the text of the beginning of the page for each bookmark. But we've broken it. Will be fixed shortly!

Hello, i realy dont know any readium based app for now, but i try always with a good android epub reader called "Reasily", i can see the toc. but i'm wondring why i can see the TOC with the ebook provided with the demo apps, and not this epub files?
I'll investigate the structure of your epub. In Apple Books on iOS and Bookari on Android, the TOC items do have their correct titles (in arabic), but in some apps I see the name of the file instead (Readium 2 testap). In some other apps I see nothing (Aldiko Next, which is based on Readium 2).
Maybe from your side you can investigate with some epub checker. But anyway we'll also have a look at this issue.

Hello @voipworld, FYI I am currently implementing RTL support so that you can test with your books. It almost works now, but maybe still 1 or 2 days of work.

hi @jmgeffroy,
i may give a small suggestion, you might add a directionality argumant to the widget so we can explissitly set it to rtl, maybe the detection wont work with some malformed epubs like the one i gave in this issue, what do you think?

Hi, @voipworld Thank you for the suggestion, we'll think about it. Currently, our system does correctly recognize your book is RTL, however. It's pagination which is not fully compatible yet.
BTW, I have a really stupid question: for RTL books, I guess you obviously prefer having a reversed progress bar, right? In other words, dragging the progress handle left should make move forward in the book...
I see other (popular) apps that don't behave this way (no name here ;-) ), hence my question. I was extremely surprised to see that.

hello,
yep exactly, the progress bar must also be rtl.

Hi @voipworld , I have just pushed the RTL support on the develop branch. You can test the reader widget example app. I have temporarily added your book inside, but I don't know what it is about: do you have some Arabic tales book, maybe?

Can you test and confirm the RTL support is correct? BTW we haven't fixed the Table of Contents display issue. Only added RTL support in Epub reflow for now.

Note: the preloading doesn't work well in RTL. So chapter changes aren't as smooth as they should be. We'll investigate that in a future iteration.

Edit: I found a huge collection of free Arabic ebooks, but it's in PDF, what a shame! Same here...

Edit 2: I think I found a great resource here! So I have replaced the default RTL test book by 1001 nights.

Edit 3: Found an issue. Don't test for now.

hello,
huge progress... i'm truely lost...

Update:
the progress bar and navigation is rtl and properly done.
the TOC is still not shown with the book i send last time, allready found in the assets folder.

@voipworld Thank you for your feedback! TOC will be fixed shortly. This will be the first item next week.
I have also noticed a few strange behaviors on iOS, such as partial page rendering (half white, with lines truncated).
Also, I'm not 100% satisfied with performances: there are some visual glitches when a new chapter is displayed, because the webviews fail to prerender when they aren't visible. As I said earlier, this is caused by Hybrid Composition, which is the way the native webviews are "integrated" or "interleaved" with Flutter's rendering engine. So I'll do a new iteration on this part. I want to improve it. I'll make again a comparison between webview_flutter and flutter_inappwebview. This latter webview allows to create offscreen renderings, so I have some reasonable hopes to be able to fix the issue with this one.

Quick update: a test in a separate scratch project with the excellent Flutter InAppWebView provides extremely positive results: we can prerender any number of chapters.
Replacing the webview_flutter with this one requires quite a lot of work, this won't be instant. But definitely worth trying.

what do you think about webview_flutter?
https://pub.dev/packages/webview_flutter
the virtual display mode give native feeling and look like the text is natively randered from accessibility points of view.
maybe this would be easyer?

Hello @voipworld , yes webview_flutter is what we currently use. But we have more native feeling with hybrid composition than virtual displays (btw on iOS, we only have HC). You can pexperiment switching to Virtual displays in our app, there is a comment somewhere, which indicates how to switch (I'm writing from my ohone, so I can't easily browse to provide you the exact location of this comment).
But in any case, most if the issue relies in prerendering invisible chapters. For reasons outside of my current understanding, this is where InAppWepView is better.

Hi there! FYI I have just posted an issue in the webview_flutter Github. I think I have found 1 or 2 important clues that might help the author(s) fix this issue.

I'll wait a few days to see if the webview_flutter issue gets fixed. And if not then I'll switch to flutter_inappwebview.

i see, i'm following up this issue there.
what's the issue with using virtual display mode if it works?

The swipe gesture isn't as smooth with VD than with HC. And on iOS, anyway, we only have HC. So it must be fixed.
But flutter_inappwebview is already a great "fallback solution", if we can't fix the webview_flutter version.
I'm very confident that the reading experience will be as smooth as it can be πŸ˜‰

Hello,
any update to this issue?
i feel the webView is totaly infocusable with screen readers now, and double clicking it as befaure never show the toolbar?
anything changed?

Hello @voipworld, the toolbar issue has just been fixed in [this commit](Hi Morris, problem fixed in the latest commit! 3698b71).
For the accessibility issue, maybe it's just a matter of wrapping the InappWebview inside a Semantics? Can you try?

hi @jmgeffroy
i just tested the double tap its working perfectly now.
but, the toc parsing issue is still there, its not showing t
he toc i referenced.
for the webView focus, i'll try to use semontic widgets and see.

Hi @voipworld, Thank you for your feedback. I have tested your original book again and that's right, I can reproduce your issue with the toc. To be fixed.
In the meantime, again please notice that the viewer is currently under heavy evolution. This evolution will remove the jQuery dependency, and pave the way for future additional features.

hi @jmgeffroy
i wanted to add a small note: in the bookmarks panel after adding bookmarks, how to know to what bookmark i'm going to? all i can see is a button, but no label or something. if i have 10 bookmarks, how to identify them?
That's a recent regression. You should see the text of the beginning of the page for each bookmark. But we've broken it. Will be fixed shortly!

is it fixed?

hey Jean-Marie, i'm back to this issue again. is there any progress on TOC please? most of dart based epub librarys is having dificulty with this kind of TOC.