foliate
foliate copied to clipboard
Exported Annotations in the wrong order
Describe the bug After exporting to HTML, the annotations are in the order, in which they were appended, when they should be in book order [CFI]. However, the notes are listed in the correct order, inside Foliate's annotation tab. [The user will notice the bug too late!.]
To Reproduce
Steps to reproduce the behavior:
- Open any book.
- Making notes on random chapters 7,2,1,5; or even just non-consecutive paragraphs.
- Look in the annotations tab. All notes appear ordered.
- Export notes.
- See error: the exported notes are out of sequence. Foliate shows them correctly, but exports them in order of appending.
Expected behavior Expected that notes would follow the starting part of the CFI location. Impose CFI order, when saving notes local? Or maybe add button to rebuild the notes.
Version:
- Foliate version: 2.6.4
- OS/Distribution and version: all, Ubuntu
- Desktop environment: all
- Installation method: flatpak
Additional context This bug is expected to affect all versions in all environments.
@johnfactotum Is there any sorting done outside epub.js
?
I just noticed this issue and came to report it. I started taking notes on paper and then switched to Foliate annotations mid way through. Returned to the start of the book when finished and transcribed my paper notes into the epub using Foliate annotations. When I exported them, the notes that are near the start of the book appear at the end of the annotation export because they were the latest. I would expect them to be first in the export since they are from the start of the book.
Notes are sorted only when you open the book, so if you add more notes, those won't be sorted. It can be worked around by closing and re-opening Foliate before you export the notes.
This has been fixed in the gtk4
branch. Well, technically, the branch is still missing the export feature, but that is a separate issue.
Thank you.