Skip to content
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

Add reading order as parameter to EPubFragment factory / constructor #376

Conversation

chrfalch
Copy link
Contributor

To be able to show resources not part of the reading order (like notes, see Impossible to open a file when linear="no" #124) it is helpful to be able to provide a special readingOrder list when opening a publication in the navigator.

This commit adds readingOrder as an optional parameter with the default value of Publication.readingOrder to the epub factory and the fragment.

In addition the EPubFragment is now using the provided readingOrder instead of publication.readingOrder in its implementation.

To be able to show resources not part of the reading order (like notes, see Impossible to open a file when linear="no" readium#124) it is helpful to be able to provide a special readingOrder list when opening a publication in the navigator.

This commit adds readingOrder as an optional parameter with the default value of `Publication.readingOrder` to the epub factory and the fragment.

In addition the EPubFragment is now using the provided readingOrder instead of publication.readingOrder in its implementation.
positionsByReadingOrder is now removed from the construtor and derived from readingOrder.

ReadingOrder is still List<Link>? (optional) and the test for custom readingOrder / publication.readingOrder is done inline where used to be able to test for null in positionsByReadingOrder.
chrfalch and others added 3 commits August 31, 2023 16:25
…EpubNavigatorFactory.kt

Co-authored-by: qnga <32197639+qnga@users.noreply.github.com>
@chrfalch chrfalch requested a review from qnga September 1, 2023 08:04
Copy link
Contributor

@qnga qnga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, though I didn't test it.

Copy link
Member

@mickael-menu mickael-menu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @chrfalch and @qnga

@mickael-menu mickael-menu merged commit 83a424a into readium:develop Sep 1, 2023
3 checks passed
marshal1919 added a commit to marshal1919/kotlin-toolkit that referenced this pull request Jun 21, 2024
commit 1b57014
Author: qnga <32197639+qnga@users.noreply.github.com>
Date:   Wed Jun 19 13:32:43 2024 +0200

    Add `ExoPlayerDataSourceProvider` to offer support for caching in media3 audio navigator (readium#539)

commit 4a2e9d3
Author: qnga <32197639+qnga@users.noreply.github.com>
Date:   Mon Jun 17 18:20:30 2024 +0200

    TTS fixes (readium#536)

commit 62f8fb8
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Fri Jun 14 13:55:56 2024 +0200

    Normalize URLs (readium#534)

commit c4eab48
Author: qnga <32197639+qnga@users.noreply.github.com>
Date:   Tue Jun 11 13:47:20 2024 +0200

    Remove `SuspendingCloseable` (readium#532)

commit 636e1fd
Author: qnga <32197639+qnga@users.noreply.github.com>
Date:   Mon Jun 10 14:31:19 2024 +0200

    Never report audio progress beyond duration (readium#531)

commit acac9b4
Author: qnga <32197639+qnga@users.noreply.github.com>
Date:   Fri Jun 7 16:06:26 2024 +0200

    Don't restart utterance in TTS when submitting the same preferences again (readium#530)

commit 852d1c9
Author: qnga <32197639+qnga@users.noreply.github.com>
Date:   Fri Jun 7 12:44:40 2024 +0200

    Prevent crash in case of misuse of AudioEngine.asPlayer().release (readium#529)

commit a226128
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Fri May 24 17:25:17 2024 +0200

    Bump dependencies (readium#521)

commit 8b95d2d
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Wed May 22 18:17:15 2024 +0200

    Optimize scrolling to an EPUB locator with a CSS selector (readium#520)

commit ac6392c
Author: qnga <32197639+qnga@users.noreply.github.com>
Date:   Tue May 21 16:39:28 2024 +0200

    Add a retrieveLicenseDocument method to LcpService (readium#519)

commit a91e76f
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Wed May 15 16:17:12 2024 +0200

    Fix sniffing media types when acquiring an LCP publication (readium#518)

commit 5ee94a2
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Wed May 15 15:39:41 2024 +0200

    Disable EPUB pagination with vertical text (readium#517)

commit 0d6efa0
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Tue May 14 16:45:13 2024 +0200

    3.0.0-beta.1 (readium#515)

commit 5ac1b6d
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Tue May 14 16:24:48 2024 +0200

    Rename `archive` Link property (readium#514)

commit 091f9ac
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Tue May 7 18:20:15 2024 +0200

    Deprecate media1 and media2 navigators (readium#512)

commit 0f23b6b
Merge: b77fa79 b88e104
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Tue May 7 12:28:10 2024 +0200

    Merge branch 'main' into develop

    # Conflicts:
    #	CHANGELOG.md
    #	README.md
    #	build.gradle.kts
    #	readium/lcp/src/main/java/org/readium/r2/lcp/license/LicenseValidation.kt
    #	test-app/build.gradle.kts

commit b88e104
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Tue May 7 10:04:28 2024 +0200

    2.4.1 (readium#511)

commit b77fa79
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Mon May 6 13:19:48 2024 +0200

    Support for the new 2.x LCP Profiles (readium#510)

commit 8fb7ccb
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Fri May 3 16:51:40 2024 +0200

    Change LCP device name strategy (readium#508)

commit d08819a
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Fri May 3 13:23:10 2024 +0200

    Fix applying preferences while recreating EPUB fragments (readium#507)

commit ff983dc
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Wed May 1 08:05:41 2024 +0200

    Documentation (readium#486)

    Co-authored-by: qnga <32197639+qnga@users.noreply.github.com>

commit 374c9c3
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Tue Apr 30 22:00:28 2024 +0200

    Replace `Date` with `Instant` (readium#506)

commit 2cc906c
Author: qnga <32197639+qnga@users.noreply.github.com>
Date:   Tue Apr 30 17:58:17 2024 +0200

    Revamp format specifications and other changes (readium#500)

commit 5a6a239
Author: qnga <32197639+qnga@users.noreply.github.com>
Date:   Tue Apr 30 13:53:17 2024 +0200

    Make possible crashes of PSPDFKit more explicit (readium#495)

commit e42d495
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Mon Apr 29 14:29:04 2024 +0200

    Fix broken EPUB selection in paginated mode (readium#502)

commit 3abdb8c
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Mon Apr 29 13:51:27 2024 +0200

    Fix handling EPUB `noteref` with nested elements (readium#503)

commit 30727af
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Fri Apr 26 15:04:30 2024 +0200

    Fix various EPUB positioning issues (readium#499)

commit bccfabc
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Sat Apr 20 10:32:46 2024 +0200

    Enable core library desugaring (readium#496)

commit 611ea81
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Wed Apr 17 11:19:21 2024 +0200

    Prevent reporting the current position while loading a locator (readium#487)

commit d335bde
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Tue Apr 16 09:12:37 2024 +0200

    Remove `completion` from `Navigator` APIs (readium#488)

    Co-authored-by: qnga <32197639+qnga@users.noreply.github.com>

commit 27d64b1
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Tue Apr 16 08:56:24 2024 +0200

    Fix a bunch of thread violations (readium#490)

    Co-authored-by: qnga <32197639+qnga@users.noreply.github.com>

commit 9d18784
Author: qnga <32197639+qnga@users.noreply.github.com>
Date:   Mon Apr 15 15:13:12 2024 +0200

    Fix opening LCP-protected publication in restricted mode (readium#494)

commit 1f59afa
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Tue Apr 9 20:50:09 2024 +0200

    Downgrade to jsoup 1.16.1 (readium#489)

commit a561e89
Author: qnga <32197639+qnga@users.noreply.github.com>
Date:   Mon Apr 8 15:56:26 2024 +0200

    Don't read content whose length is unknown in sniffing (readium#485)

    Co-authored-by: Mickaël Menu <mickael.menu@gmail.com>

commit 975e8af
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Mon Apr 8 13:05:59 2024 +0200

    Fix various crashes (readium#484)

commit 2786fb4
Author: qnga <32197639+qnga@users.noreply.github.com>
Date:   Fri Mar 29 18:06:33 2024 +0100

    Various improvements in LcpService (readium#483)

commit af16ea9
Author: qnga <32197639+qnga@users.noreply.github.com>
Date:   Fri Mar 29 11:39:44 2024 +0100

    Prevent Opds2Sniffer from reading the whole blob (readium#482)

commit 3cb8e61
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Mon Mar 4 12:14:38 2024 +0100

    3.0.0-alpha.2 (readium#480)

commit e129905
Author: qnga <32197639+qnga@users.noreply.github.com>
Date:   Fri Mar 1 10:57:49 2024 +0100

    Simplify LcpService.injectLicense (readium#479)

commit 5746e7f
Author: qnga <32197639+qnga@users.noreply.github.com>
Date:   Wed Feb 28 16:44:29 2024 +0100

    Update media3 and fix some issues with MediaService (readium#478)

commit 8d74923
Author: qnga <32197639+qnga@users.noreply.github.com>
Date:   Wed Feb 28 13:45:45 2024 +0100

    Fix TTS player crash (readium#477)

commit 11a1737
Author: qnga <32197639+qnga@users.noreply.github.com>
Date:   Mon Feb 26 16:49:53 2024 +0100

    Prevent infinite recursion in format sniffing (readium#476)

commit 82b1238
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Mon Feb 26 15:41:07 2024 +0100

    Fix EPUB deobfuscation (readium#475)

commit 449b20d
Author: qnga <32197639+qnga@users.noreply.github.com>
Date:   Thu Feb 22 14:38:54 2024 +0100

    Add `LcpService.injectLicenseDocument` (readium#473)

commit 33a0c77
Author: Steven Zeck <8315038+stevenzeck@users.noreply.github.com>
Date:   Tue Feb 13 09:51:02 2024 -0600

    Use material3 for Compose views (readium#460)

commit 9696c43
Author: qnga <32197639+qnga@users.noreply.github.com>
Date:   Fri Feb 9 20:14:42 2024 +0100

    Small fix (readium#467)

commit ee61210
Author: qnga <32197639+qnga@users.noreply.github.com>
Date:   Fri Feb 9 15:04:45 2024 +0100

    Remove the download manager (readium#465)

commit f7c7e8d
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Thu Feb 8 15:43:36 2024 +0100

    Bump `css-selector-generator` script dependency (readium#466)

commit d5a53ff
Author: Steven Zeck <8315038+stevenzeck@users.noreply.github.com>
Date:   Mon Feb 5 09:24:26 2024 -0600

    Use `Flow` instead of `LiveData` in the Test App (readium#461)

commit 2a3fbfe
Author: Steven Zeck <8315038+stevenzeck@users.noreply.github.com>
Date:   Mon Feb 5 09:03:16 2024 -0600

    Cleanup Gradle and Version files, fix Dokka (readium#456)

commit 6246f10
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Fri Feb 2 11:34:06 2024 +0100

    Remove `android:clearTaskOnLaunch` (readium#459)

commit 9dffa11
Author: Mark Raynsford <io7m@users.noreply.github.com>
Date:   Wed Jan 31 16:50:42 2024 +0000

    Implement sniffing of CSS and JS files (readium#455)

commit 5e807f6
Author: qnga <32197639+qnga@users.noreply.github.com>
Date:   Tue Jan 30 14:30:58 2024 +0100

    Extract footnote popups from the Epub navigator (readium#448)

    Co-authored-by: Mickaël Menu <mickael.menu@gmail.com>

commit b3b4033
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Fri Jan 26 13:01:11 2024 +0100

    Use canonical EPUB HREFs (readium#453)

commit 7564f19
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Tue Jan 23 15:17:57 2024 +0100

    Fix Maven Central publishing and refactor Gradle configurations (readium#452)

commit 361d2d4
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Fri Jan 19 15:03:49 2024 +0100

    3.0.0-alpha.1 (readium#450)

commit 5dd7818
Merge: 286dbb2 7649378
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Fri Jan 19 14:44:50 2024 +0100

    Merge branch 'main' into develop

commit 286dbb2
Merge: 56e88ca b13bc52
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Fri Jan 19 14:34:32 2024 +0100

    Merge pull request readium#442 from readium/v3

commit b13bc52
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Fri Jan 19 13:26:11 2024 +0100

    Minor fixes (readium#449)

commit b0967f7
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Tue Jan 16 14:45:05 2024 +0100

    Display error details in the Test App (readium#444)

commit eb2f4e3
Author: qnga <32197639+qnga@users.noreply.github.com>
Date:   Tue Jan 16 14:21:31 2024 +0100

    Minor media3 navigator fixes (readium#447)

commit cb9d2c0
Author: Steven Zeck <8315038+stevenzeck@users.noreply.github.com>
Date:   Tue Jan 16 03:25:28 2024 -0600

    Update dependencies (readium#445)

commit 54383a5
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Mon Jan 15 17:37:49 2024 +0100

    Update dependencies (readium#443)

commit 5b718ad
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Mon Jan 15 12:39:56 2024 +0100

    Update the documentation for Readium 3.0.0-alpha.1 (readium#441)

commit 4bd2893
Author: qnga <32197639+qnga@users.noreply.github.com>
Date:   Fri Jan 12 16:47:54 2024 +0100

    Fix import through intent (readium#438)

commit 3965b06
Author: qnga <32197639+qnga@users.noreply.github.com>
Date:   Fri Jan 12 16:27:02 2024 +0100

    EPUB 2 meta tags should be superseded by EPUB 3 ones (readium#437)

commit 97b9ec0
Author: qnga <32197639+qnga@users.noreply.github.com>
Date:   Fri Jan 12 16:08:02 2024 +0100

    Check hash of LCP acquisitions (readium#439)

commit 09e338b
Author: qnga <32197639+qnga@users.noreply.github.com>
Date:   Wed Jan 10 13:05:14 2024 +0100

    Merge `AssetOpener` and `AssetSniffer` public APIs into `AssetRetriever` (readium#434)

commit 1ba1223
Author: qnga <32197639+qnga@users.noreply.github.com>
Date:   Tue Jan 9 17:17:24 2024 +0100

    Small changes for v3 and guide to open a publication (readium#432)

commit 2f04d5e
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Tue Jan 9 13:17:06 2024 +0100

    Simplify the `PublicationOpener` by adding a `DefaultPublicationParser` (readium#433)

commit 7649378
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Tue Jan 9 10:17:22 2024 +0100

    Add a new form-based bug report issue template (readium#431)

commit 94463c7
Merge: b247622 56e88ca
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Mon Jan 8 19:25:12 2024 +0100

    Merge branch 'develop' into v3

commit b247622
Author: qnga <32197639+qnga@users.noreply.github.com>
Date:   Mon Jan 8 16:37:54 2024 +0100

    Revamp format (readium#428)

commit bfadfa8
Author: qnga <32197639+qnga@users.noreply.github.com>
Date:   Thu Dec 21 17:00:54 2023 +0100

    Various changes including introducing Format (readium#427)

commit c9a09ac
Author: qnga <32197639+qnga@users.noreply.github.com>
Date:   Mon Dec 11 10:39:51 2023 +0100

    Refactor errors (readium#422)

commit 56e88ca
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Thu Nov 9 11:21:55 2023 +0100

    Fix documentation publishing (readium#420)

commit 011e0d7
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Tue Nov 7 14:36:57 2023 +0100

    2.4.0 (readium#419)

commit 8bf59ed
Author: Mickaël Menu <mickael.menu@gmail.com>
Date:   Tue Nov 7 11:44:11 2023 +0100

    Fix crash when restoring the fragment hierarchy after process death (readium#418)

commit f87dd95
Author: Christian Falch <875252+chrfalch@users.noreply.github.com>
Date:   Fri Sep 1 18:41:32 2023 +0200

    Add `VisualNavigator`'s `shouldJumpToLink` listener callback (readium#375)

commit 83a424a
Author: Christian Falch <875252+chrfalch@users.noreply.github.com>
Date:   Fri Sep 1 18:05:45 2023 +0200

    Add custom `readingOrder` to `EpubNavigatorFragment` (readium#376)

commit af78d31
Author: Christian Falch <875252+chrfalch@users.noreply.github.com>
Date:   Mon Aug 28 16:04:19 2023 +0200

    Scroll to top when navigating to locators in scroll mode (readium#384)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants