foliate icon indicating copy to clipboard operation
foliate copied to clipboard

Exported Annotations in the wrong order

Open itprojects opened this issue 3 years ago • 1 comments

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:

  1. Open any book.
  2. Making notes on random chapters 7,2,1,5; or even just non-consecutive paragraphs.
  3. Look in the annotations tab. All notes appear ordered.
  4. Export notes.
  5. 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.

itprojects avatar Feb 03 '22 13:02 itprojects

@johnfactotum Is there any sorting done outside epub.js ?

itprojects avatar Mar 05 '22 01:03 itprojects

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.

rastacalavera avatar Jan 25 '23 14:01 rastacalavera

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.

johnfactotum avatar Mar 17 '23 12:03 johnfactotum

Thank you.

itprojects avatar Mar 25 '23 01:03 itprojects