-
-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New renderer #962
Comments
I got curious and went and checked the foliate-js repo, and I couldn't help but notice the mention that it doesn't support continuous scrolling. Is that a current, pre-release limitation, or is that expected to be an immutable characteristic of it? Also, am I right in understanding that "standard" scrolling mode is still supported, and continuous (across chapters, ..) is what's affected? I personally mainly use Foliate in continuous scrolling mode, though I could likely get used to regular scrolling mode if I had to. Anyway I did throw a handful of EPUBs and MOBIs at the test reader, as well as a few CBZs, and it didn't seem to have issues with them. |
It's still something that I'd like to add at some point. But I don't want it to be a blocker for the release. Though honestly, if it's possible to live without it (I believe Calibre doesn't support it, either, for example), I kind of want to just leave it out. Continuous scrolling adds a ton of complexity, and it seems impossible to eliminate unwanted flashing or shifting, especially on WebKit.
Yes, that's correct. It supports |
Thanks for the answer ! For my use while lack of |
It is now possible to switch to scrolled mode in the demo reader. |
Excellent work! Epub.js's age and lack of maintenance have started to show; having a new renderer out there is going to be hugely beneficial. |
Steps to reproduce
What should happen
What happens instead
Edit: The same issue exists for using keyboard arrows (left for back, right for forward), page up/down, home and end buttons. |
I'm not sure if it is the right time, or place to ask, but still: I'm noticing that the text shows in 1, 2, or 3 columns depending on the window width. Is it planned to offer users a setting for this? I would like to have the text shown in "pages" instead of columns, similar to how a printed book functions. Edit: an edge-case, for very large screens (or very high viewport zoom-out) shows text in a large number of very long columns. I don't think if this is intended, or desired, but my initial gut-feeling (I know, completely subjective, but still) is that that's not how a book should behave. Maybe it's just a matter of getting used to it, but it's still worth considering any other possibilities. |
Is it planned to add any of the following:
|
By the way, I must join the compliments, foliate-js looks like an amazing piece of work. Congratulations and thank you. I can't wait to test it in a desktop app and check whether it fixes the dreadful #879 😨 |
Yes, the demo viewer is highly incomplete. It doesn't handle any keyboard or mouse events yet.
It currently supports only a max column width setting (I mean in the paginator's API, not in the demo viewer, which sets it at 720px), which also doubles as the max page width in scrolled mode. It would probably make sense to add a "max number of columns" settings". To be really complete, I think a "min column width" setting is also needed, but perhaps it's not really that essential, and might be a bit confusing to use.
It already does that if your browser supports it.
This will be in Foliate the GTK app, of course, but probably not needed in the browser, as you can just right click and copy/save/open in new tab, though I'm not sure how it would work in a progressive web app context (if that's ever something that's supported by the viewer).
Yes, there will be a slider. And as mentioned, it will be better because it will be available pretty much instantly, even for very large files. Whereas in Epub.js, it must process every single section before you can get a progress slider. It might be somewhat less accurate, though, as it's based on byte size, not character count like Epub.js. Also sizes reported by the Zip file might not always be correct, so I guess a down side is that, for example, a malicious book could potentially trick you into reading it by pretending to have short chapters.
I suspect it won't. Well, you can try opening the demo viewer in Epiphany or anything that uses WebKitGTK (generally, it's a good idea to test Epiphany if the problem is very likely that WebKitGTK is not working properly for some reason). If it works then it should work. But then that applies to the current version of Foliate as well. I guess sometimes it's only reproducible under very specific conditions (e.g. how the WebView widget is placed in GTK). It does fix the problem that people fixed by deleting |
I hadn't realized this before trying it on the test reader, but it seems that Tho I did now try both modes in the current Foliate release, and continuous scrolling mode does tend to chug quite heavily in the current renderer with large cbz/r files (I'd never actually noticed this because I typically just use Evince for comics), at least for me. |
Dang. Anyway, let's wait and see. I don't think the issue described in #879 can be properly tested in the current foliate-js web renderer, because most problems are related to mouse and keyboard controls, and the bottom edge scroll bar, which are all missing from foliate-js for now. Those few that can be tested (e.g. loading a book, or moving through pages by very quickly clicking on the next/previous buttons) seem to be fixed. All issues from #879 still exist in the desktop app for me. |
@elmagio Yes, that's a fair point. The up side is that doing continuous scrolling for fixed-layout should be easier, and the result should be far less jankier, as you don't have to observe for changing page dimensions. The two renderers are totoally separate so one can try adding to the fixed-layout renderer first. And really, fixed-layout never really worked that well in Foliate (or Epub.js), anyway. |
Ok, this may or may not be related to #879. When I open a new tab in Epiphany, paste the url https://johnfactotum.github.io/foliate-js/reader.html and hit enter, the page seems to load but does not display (I only see white viewport). Only after I reload the same tab, the content displays. If I open a new tab and try the same, I get the same white page the first time, and content loads only after reloading. In other brosers this issue does not occur (tested in Vivaldi, Chromium, Firefox). I wonder if anyone else experiences the same? |
Are you using dark mode? I believe it's a bug in Epiphany when opening a page with |
Yes, I am indeed using dark mode, good catch. After switching to light mode, the above issue is gone, thanks a lot. I'm relieved now :) |
Just adding some more user feedback. For me definitely as well, continuous scrolling is a must. Across-chapters scrolling is nice to have, but not a deal-breaker. |
Continuous scrolling == Across-chapters scrolling |
For v2.6.4 and a prior version. |
2.6.4 and prior versions use Epub.js, not the new renderer. The gtk4 branch uses the new renderer. |
edit: My bad, foliate-js wasn't cloned. Added --recurse-submodules and it worked. Sorry for taking your time. |
Should issues discovered be posted here or as new bugs on the foliate-js repo? |
Well, I guess logically, if it's a general issue concerning the idea of using the new renderer, it would be appropriate to leave a comment here. If it's clearly a bug in foliate-js itself, then file it against its repo. Otherwise it would make sense to create a new issue against this repo. |
Just tried, in Firefox, with the v2.2 test epub from here: https://www.mobileread.com/forums/showthread.php?t=148097 The only (potential) issues I noticed were: Pagebreak Test Scale Tests white-space: nowrap |
This is a limitation of using CSS columns and it's also a problem in Epub.js and other column-based renderers, as There's So I guess the solution is that Foliate should replace
For This issue doesn't happen in Epub.js, but it's actually just a side effect of foliate-js setting the column layout on the root element, whereas Epub.js does it on the body. I believe the former is more desirable as it allows the book to "own" the body element more (to e.g. add padding or border to the body element, which isn't really possible with Epub.js).
This appears to be specific to Firefox. On WebKit and Chromium, it does allocate more pages. I'm not sure which is more correct, spec-wise speaking, in terms of whether |
Replace `page-break-*` with `-webkit-column-break-*`. See johnfactotum/foliate#962 (comment)
Hey, Is it possible to make Foliate compatible with qt-webengine ? (i mean possibility to use qt-webengine as backend instead of webkit2gtk) This is useful on KDE Environment, as the qt-webengine is a default dependency. |
Foliate uses GTK, not Qt, so it can't use qt-webengine. |
In the future, in the next major version, Foliate will stop using Epub.js and KindleUnpack, and use its own renderer,
foliate-js
, for opening books.The renderer has a few advantages:
<mbp:pagebreak>
s (fixes Why mobi format is slow? #764). NOTE: this will break existing annotations for this format. Existing highlights will stop being attached to the text.page-break-*
properties (fixes page-break-after doesn't work #759)This issue is an announcement, and also tracks all the issues that will be solved by the new renderer. It's also a call for testers. The demo viewer is very basic at the moment, but one can go to https://johnfactotum.github.io/foliate-js/reader.html and use drag and drop to open any file, to test if there are any rendering issues. There is also a branch that uses the new renderer as a Git submodule: https://github.com/johnfactotum/foliate/tree/gtk4
The text was updated successfully, but these errors were encountered: