-
Notifications
You must be signed in to change notification settings - Fork 200
Support for Divina in the EPUB navigator#692
Merged
mickael-menu merged 5 commits intodevelopfrom Jan 12, 2026
Merged
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds support for displaying Divina (image-based publications like CBZ) in the fixed-layout EPUB navigator. The implementation enables the EPUB navigator to handle image-based comics and manga by setting appropriate metadata and layout properties, and by enhancing the navigator's ability to extract image dimensions and display pages correctly.
Changes:
- ImageParser now sets
layout = .fixedand marks the first page and double-page spreads with.centerpage property for proper display in the navigator - Properties struct now has a setter for the
pageproperty to allow programmatic modification - Fixed-layout navigator updated to extract image dimensions directly from embedded images and handle center pages with full viewport
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| Sources/Streamer/Parser/Image/ImageParser.swift | Sets fixed layout metadata and center page properties for Divina publications |
| Sources/Shared/Publication/Properties.swift | Adds setter for page property to enable programmatic modification |
| Sources/Navigator/EPUB/Scripts/src/fixed-page.js | Adds image dimension extraction for images loaded directly in iframes |
| Sources/Navigator/EPUB/Scripts/src/index-fixed-wrapper-two.js | Updates viewport handling to give center pages full viewport instead of half |
| Sources/Navigator/EPUB/Assets/fxl-spread-two.html | Updates CSS for center viewport to use full width |
| Sources/Navigator/EPUB/Assets/Static/scripts/readium-fixed-wrapper-two.js | Minified version of updated two-page wrapper script |
| Sources/Navigator/EPUB/Assets/Static/scripts/readium-fixed-wrapper-one.js | Minified version of updated single-page wrapper script |
| Tests/StreamerTests/Parser/Image/ImageParserTests.swift | Adds test coverage for center page property on first page and double-page spreads |
| Tests/StreamerTests/Fixtures/test-comicinfo.cbz | New test fixture with ComicInfo.xml containing double-page metadata |
| Tests/NavigatorTests/UITests/NavigatorUITests/XCUIApplication.swift | Increases memory deallocation timeout to accommodate image loading |
| CHANGELOG.md | Documents the new Divina support feature |
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sources/Navigator/EPUB/Assets/Static/scripts/readium-fixed-wrapper-one.js
Show resolved
Hide resolved
Sources/Navigator/EPUB/Assets/Static/scripts/readium-fixed-wrapper-one.js
Show resolved
Hide resolved
Sources/Navigator/EPUB/Assets/Static/scripts/readium-fixed-wrapper-two.js
Show resolved
Hide resolved
Sources/Navigator/EPUB/Assets/Static/scripts/readium-fixed-wrapper-two.js
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.