bump crengine, migrate books to normalized xpointers#5897
bump crengine, migrate books to normalized xpointers#5897poire-z merged 3 commits intokoreader:masterfrom
Conversation
|
Pinging @noembryo for info: there's a new cre_dom_version upgrade, so new books will get it. I dunno how the proposed cre_dom_version upgrade, and so a change of it for a same book, will affect KOHighlights. |
Just like what's been done previously for InfoMessage. Also tweak 'other_buttons' option (not yet used anywhere) to allow multiple rows of such other buttons.
e3a5b49 to
b07c214
Compare
|
@poire-z Yeap.. KOHighlights checks the |
| end | ||
|
|
||
| local text = _([[ | ||
| This book has been first opened, and handled since, by some old version of the rendering code. |
There was a problem hiding this comment.
Perhaps it can be slightly more succinct?
This book was first opened by an older version of the rendering code.
Bookmarks and highlights can be upgraded to the latest version of the code.
%1
Proceed with this upgrade and reload the book?
There was a problem hiding this comment.
I find that a bit too succint :) but well, as the author of the verbose variant, I can't say much :)
Any other opinion ?
(out for a bit, will rethink that later)
There was a problem hiding this comment.
I kinda like it, I'd possibly switch the second sentence to "You won't lose your bookmarks & highlights" or something similar.
The end goal being hiding the technicalities, and just basically saying "we need to reload the book, here's what it'll mean for you in practical terms".
There was a problem hiding this comment.
ok ok :)
I'd like to keep the , and handled since, by... - because, with just was first opened by, there's some continuity/logic missing. ("OK, I opened it previously, but why this upgrade now?")
Fine with keeping it?
And so:
Bookmarks and highlights can be upgraded to the latest version of the code.
should replace the 2nd sencence of the first paragraph, or also the 2nd paragraph when all is good (All your bookmarks and highlights are valid and will be available after the migration) ?
What about the 2 possible (but rare in practice I think) "Note that..." ?
There was a problem hiding this comment.
This book is currently handled by an older version of the rendering code?
There was a problem hiding this comment.
That's quite ok, but it doesn't tell why it is currently handled by... to the curious user :)
| other_buttons = {{ | ||
| { | ||
| -- this is the real cancel/do nothing | ||
| text = _("Ask me next time"), |
There was a problem hiding this comment.
The awful Apple way to deal with that in notifications is Snooze.
I kinda like Not now, FWIW ;).
it's updated once, when the user hits "Upgrade now", then it's stored as Just wondering if you should or not make an exception for your cre_dom_version coherency check, and allow synchronizing current book with 20200223 to your cached data for that same book when it had 20180528 or older: the pos0/pos1 may be the same or may have changed, but the text and notes will be the same. |
Enable new rendering feature COMPLETE_INCOMPLETE_TABLES on all enhanced rendering mode, but have it disabled for earlier cre_dom_version. Also increase default_cre_storage_size_factor from 20 to 40.
b07c214 to
1433eb0
Compare
|
@poire-z The problem is that the wrong |
|
OK, merging. |
|
Something a bit unfortunate that I just realized now: koreader/frontend/apps/reader/modules/readerrolling.lua Lines 1277 to 1289 in 1d58eb8 Dismissing that ConfirmBox by taping outside of it (which is quite common for me) will then have "Not for this book" setting saved - and so one will never see that ConfirmBox anymore for this book (until one goes removing that setting from metadata.epub.lua) Might be considered a design choice from the Dont-Bother-Users-Front - but I would have prefered "Not now"... :| |
|
I agree, not now is probably better for that. |
|
Given the button geometry/length (cancel|OK) always on the first row, other rows added after, and cancel being the one triggered when taping outside, I guess the easier solution is just to use |
|
I suppose so, although getting the dialog again might be slightly annoying too. |
|
Re-releasing the release (with a .1 bump) is out of the question? |
|
Fine by me, but it'd better to wait a couple of days for that in case something actually important pops up. |
|
Is there a way i can make my books auto upgrade? i rarely use bookmarks, and do not want to have to confirm for every book. Edit:
like @poire-z sugested above #5897 (comment) auto migrate in case 1) & 2) |
Manually :) you could grep/sed all your .sdr/metadata.epub.lua to set
It might be a bit late 18 days after this went it, and now that we made some releases, to change this - users might get used and expect to see this to be confortable knowing their book were upgraded. So, I guess it could/should be some user manual choice to have that migration done from now on without asking. How, not sure:
|

Will need a base bump for koreader/koreader-base#1054:
Includes koreader/crengine#328 :
cre.cpp: adds
getDomVersionWithNormalizedXPointers()andgetNormalizedXPointer(xpv1)When opening a book previously opened with an older DOM version, a migration/upgrade to use the latest one, and migrate previous unnormalized XPointers to normalized ones is proposed (previous metadata.lua is backup'ed as
metadata.epub.lua.old_dom20180528).Currently with those kind of ConfirmBoxes:
(I'm not a big highlighter, and I think I've seen that 3rd one only on test html files that I often edited to add test cases, so easily inducing shifts in the DOM and breaking past highlights.)
I don't know if we should really show these messages, or just do the migration in the 1) and 2) cases, which could just look like 2 consecutive openings of the same document.
I guess we should show the 3rd, even if I'm not sure the user will be able to get these lost ones back.
May be let them for a few weeks in the nightlies, so testers can see and tell, and we'll then decide if it's worthwhile showing them? Should I still let these message translatable then?
The style tweaks about list items (added to the Paragraphs> section ) might help getting back bullets when the publisher uses features that we don't support, like:
This change is