Skip to content

feat: true white-on-black OLED EPUB theme (refs #286) - #301

Merged
van-geaux merged 3 commits into
van-geaux:mainfrom
chortya:up/feat-epub-oled-theme
Oct 21, 2026
Merged

van-geaux merged 3 commits into
van-geaux:mainfrom
chortya:up/feat-epub-oled-theme

Conversation

@chortya

@chortya chortya commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Contribution pause

The maintainer lifted the pause and invited split PRs in #286.

  • The change is scoped to one feature (the existing OLED black EPUB reader theme becomes true white-on-black). Independent of the spread, typesetting and language PRs.
  • Compatible with the provider-module refactor: reader UI only.
  • Tests and manual-validation status are documented.
  • No credentials, cookies, API keys, private server URLs, or generated local data are included.

Summary

OLED black previously used off-white text (#F5F5F6), blue links and the regular dark app chrome, with grey surfaces around the black page. It now renders pure white on pure black end to end:

Area Change
Page White text and links on black; in-page stylesheet (installed by the existing current-document bridge loop) overrides ReadiumCSS night-mode link blue; white selection with black text; illustrations keep their colours.
Window Theme.BookOrbit.Reader.Oled applied before super.onCreate (black window and status-bar strip, black system dialogs via oled_dialog_background). Switching into or out of OLED recreates the reader at the saved locator so the window theme matches.
Reader chrome EpubReaderMaterialTheme swaps in a pure black/white Material scheme (no tonal tint) for the options sheet, chapter list, top/bottom bars, read-aloud and read-along panels. Chrome is opaque; edges and the current chapter use hairline outlines because shadows are invisible on black.
Other themes, PDF, comics Unchanged.

Verification

  • ./gradlew :app:testDebugUnitTest — 959/959 pass (new EpubOledThemeTest). :app:lintDebug — 0 errors. :app:assembleDebug succeeds. No added trailing whitespace; line endings preserved.
  • Connected, Pixel Fold API 36 emulator:
    • New EpubOledActivityInstrumentedTest 2/2 — black window background, OLED page style installed with white text/links on black; Dark theme does not get it.
    • New EpubOledWebViewInstrumentedTest 1/1 — the OLED script against the shipped ReadiumCSS night mode (link blue → white, idempotent).
    • New EpubOledPanelsInstrumentedTest 2/2 — read-aloud/read-along panel colours.
    • EpubReaderThemeStoreInstrumentedTest 1/1. ReadiumEpubOpenInstrumentedTest 15/17, EpubReaderOptionsOverlayInstrumentedTest 3/8, EpubMediaOverlayControlsInstrumentedTest 3/4 — the same tests fail on main on this emulator. One run of ReadiumEpubOpenInstrumentedTest was cut short by a WebView renderer crash in the emulator; the affected test passed on rerun.
  • Device: the theme has been used on a Galaxy Z Fold8 from the fork build. This branch itself was run only on the emulator.
  • Peer review (Codex GPT-6-Astra) found that Material3 1.2's filled Card uses surfaceVariant, so the read-aloud and read-along panels were grey on OLED. Fixed with explicit OLED card colours and a test; the re-review found no remaining issues.

🤖 Generated with Claude Code

@van-geaux

Copy link
Copy Markdown
Owner

Thanks @chortya, the implementation looks good and CI is passing. GitHub reports that the branch now conflicts with main, so please rebase or update the PR and resolve the conflict before merging.

Andriy Chortkivskyy and others added 3 commits October 21, 2026 07:45
OLED black now renders pure #FFFFFF text and links on #000000 across the
page, reader chrome, options sheet, overlays, dialogs, window background
and status-bar strip. Selection inverts to white; ReadiumCSS night-mode
blue links and pale-blue selection are overridden in-page. Images keep
their original colours. Other reader themes and comics are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EpubOledWebViewInstrumentedTest checks the OLED link/selection script
against the shipped ReadiumCSS night mode; EpubOledActivityInstrumentedTest
checks the black window background and the installed page style, and that
other themes do not get it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Material3 1.2's filled Card uses surfaceVariant, the grey hairline colour
in the OLED scheme, so both playback panels rendered grey. They now take
epubReaderOledPanelColors(): black with white content on OLED, the
default card colours otherwise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chortya
chortya force-pushed the up/feat-epub-oled-theme branch from 08c173f to 718d7ad Compare October 21, 2026 06:20
@chortya

chortya commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

Thanks! Rebased onto current main and resolved the conflicts with #300: changing the reader theme into or out of OLED recreates the reader before the spread check runs, and both docs sections are kept. CI is green again.

@van-geaux van-geaux left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks @chortya, this is a well-scoped implementation with strong OLED coverage across the EPUB page, reader chrome, panels, dialogs, and activity window. The final head has been reviewed and the automated checks are passing. Approved.

@van-geaux
van-geaux merged commit e9bdf36 into van-geaux:main Oct 21, 2026
1 check passed
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.

2 participants