refactor: unify native DIVINA end page rendering#637
Merged
Conversation
Reuse shared native cover views for end-page covers so scroll, cover, and curl presentation paths apply the same rounded mask, shadow, and sepia multiply blend behavior. Replace the scroll end-page cells on iOS, tvOS, and macOS with the shared cover rendering path and keep the existing iOS cover controller as a thin wrapper around the shared UIKit view.
Extract a shared iOS/tvOS native end-page content view and use it from both the curl controller and scroll end cell so horizontal and vertical layouts stay identical. Update the scroll path to pass the full render configuration, and keep the scroll-only macOS end cell on the current previous-cover visibility rule while the iOS layout is unified with curl.
Remove the old SwiftUI end page from the DIVINA reader path and replace it with native iOS/tvOS and macOS hosts so cover, scroll, and curl modes share platform-native end page rendering. Add a shared macOS native end page content view, reuse the native host from CoverPageView, and route the macOS scroll cell through the shared render configuration.
Align the shared native end page landscape header with the divider treatment used in portrait mode. Stabilize cover metadata layout under landscape sizing by constraining metadata stacks and updating truncation behavior so cover, scroll, and curl hosts render consistently.
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.
Problem
DIVINA end pages had drifted across cover, scroll, and page curl presentation modes. Scroll kept its own cover treatment, cover mode still depended on the SwiftUI end-page path, and landscape layouts regressed in series-header and metadata behavior.
Approach
Collapse DIVINA end pages onto shared native presentation components for iOS/tvOS and macOS. Reuse the same native cover rendering, end-page presentation model, and host views across cover, scroll, and curl so styling, section visibility, and landscape layout rules stay in sync.
Scope
Validation
make formatmake build-iosmake build-macosmake build-tvos