Skip to content

refactor: unify native DIVINA end page rendering#637

Merged
everpcpc merged 5 commits intomainfrom
codex/unify-scroll-endpage-cover
Mar 9, 2026
Merged

refactor: unify native DIVINA end page rendering#637
everpcpc merged 5 commits intomainfrom
codex/unify-scroll-endpage-cover

Conversation

@everpcpc
Copy link
Copy Markdown
Owner

@everpcpc everpcpc commented Mar 9, 2026

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

  • Add shared native book cover views for UIKit/AppKit end pages
  • Introduce shared native end-page content views for iOS/tvOS and macOS
  • Convert scroll and curl native end-page hosts into thin wrappers over the shared content views
  • Replace the DIVINA cover-mode SwiftUI end page with a native host view
  • Align landscape series dividers, header visibility, and cover metadata sizing across modes
  • Remove the old SwiftUI DIVINA end-page implementation while leaving EPUB end pages unchanged

Validation

  • make format
  • make build-ios
  • make build-macos
  • make build-tvos

everpcpc added 4 commits March 9, 2026 11:27
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.
@everpcpc everpcpc changed the title fix: unify scroll end page cover rendering refactor: unify native DIVINA end page rendering Mar 9, 2026
@everpcpc everpcpc merged commit f58d198 into main Mar 9, 2026
3 checks passed
@everpcpc everpcpc deleted the codex/unify-scroll-endpage-cover branch March 9, 2026 04:46
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.

1 participant