Add learner-defined custom themes to the EPUB reader#14827
Open
rtibbles wants to merge 3 commits into
Open
Conversation
Contributor
Build Artifacts
Smoke test screenshot |
f290d91 to
2e28a08
Compare
rtibblesbot
reviewed
Jun 14, 2026
2e28a08 to
614c45e
Compare
614c45e to
eaf7f14
Compare
eaf7f14 to
5c54c35
Compare
5c54c35 to
83ff8ec
Compare
Add the color picker, add/edit, and delete-confirmation modals that let learners define custom reader themes, along with shared theme constants and a helper to derive a hover color from a chosen background. Pulls in alwan for the color picker. Co-Authored-By: Richard Tibbles <richard@learningequality.org> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
83ff8ec to
38cbd64
Compare
Render saved custom themes in the settings sidebar with apply, edit, and delete actions, persist them to local storage, and redesign the fixed theme picker to match. Co-Authored-By: Richard Tibbles <richard@learningequality.org> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Use the active theme's link color, falling back to the default link blue, when styling links in rendered EPUB content. Co-Authored-By: Richard Tibbles <richard@learningequality.org> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
38cbd64 to
9dc6848
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
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.
Summary
Brings the EPUB reader's custom themes feature — originally a GSoC contribution — to merge-readiness on the current codebase. Alongside the six fixed themes, learners can create, edit, and delete their own themes (background, text, and link colors), picked via a color picker and persisted per-device in
localStorage.The feature was functional in the GSoC branch; this branch modernises and hardens it.
References
Continues the custom-themes work from the GSoC-era
epub-custom-themesbranch (merge base ~July 2023). No tracking issue was filed for the original work.Reviewer guidance
How to test: Open any EPUB and open the reader settings (sliders icon). Under Themes, switch the six fixed themes — check link contrast on the dark ones (Black / Grey / Yellow). Under My themes (signed in), add a theme: name it, pick background/text/link colors, save; confirm it applies, appears in the list, and that rename/edit and delete work.
Deliberate convention departure: the six fixed themes are hardcoded hex in
EpubConstants.jsrather than$themeTokens/$themePalette, so EPUB reading palettes don't shift with Kolibri's app theme. Intentional, but it diverges from the "use theme tokens" guideline and is worth a deliberate decision.Two maintenance notes:
alwanaccessibility patch inColorPickerModal.vuekeys off the library's internal class/attribute names, so analwanupgrade could silently turn it into a no-op.SettingsSideBar.vueuse$refs.<button>.$el.focus(). KButton gained a publicfocus()method in KDS 5.8.0, which internally just callsthis.$el.focus(); we're pinned to 5.7.0, so we focus$eldirectly for now. Switch these to the publicfocus()when KDS is upgraded.AI usage
Used Claude Code throughout. It reviewed the GSoC-derived branch and, under my direction, modernised and hardened it — converting the components from Options (and mixed) API to Composition API, extracting persistence into the
useCustomThemescomposable, and adding stable theme ids, accessible link colors, CSS-ellipsis names, analwanaccessibility patch, and the test suite — then drove a headless browser to verify rendering and run axe audits on the new UI. I made the design decisions (theme identity, hardcoded vs token colors, auditing color-picker alternatives before keepingalwan) and critically reviewed and revised its output.