Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preferences api migration #64

Draft
wants to merge 61 commits into
base: develop
Choose a base branch
from
Draft

Conversation

JayPanoz
Copy link
Contributor

@JayPanoz JayPanoz commented Feb 27, 2025

This PR aims to migrate user settings to the Preferences API in ts-toolkit. This will end up in a lot of complexity being removed from the codebase, and handled directly by EpubNavigator.

In practice, this means:

  • removing auto-pagination and line-length helpers as they are now implemented in ts-toolkit
  • removing the handling of the container’s width to ts-toolkit
  • removing resize handlers
  • removing all the internal properties/methods of EpubNavigator re. ReadiumCSS
  • moving settings to the Preferences API

At the time of drafting, this migration to the Preferences API is done in a relatively simplistic way in order to remove the major part of the complexity we’re aiming to remove. Things will evolve as we implement new settings and resolve side-effects.

Copy link

cloudflare-workers-and-pages bot commented Feb 27, 2025

Deploying playground with  Cloudflare Pages  Cloudflare Pages

Latest commit: dc10643
Status: ✅  Deploy successful!
Preview URL: https://cf0aee69.playground-7xz.pages.dev
Branch Preview URL: https://preferencesapi-migration.playground-7xz.pages.dev

View logs

JayPanoz added 30 commits March 6, 2025 16:14
In theory, it should also work for FXL, with useEpubNavigator providing what’s needed for FXL or reflow.
With known line-height bug in ReadiumCSS: readium/readium-css#166
React Aria Components have now Tree out of unstable
There’s still a massive margin-left and -right applied to body for no apparent reason cos’ the resizeHandler should take care of that and resize the container accordingly…
So that we can test/debug canvas measureText
Exposing PaginationStrategies to make it testable and confirm it’s implementing the logic properly.
+ TMP component for testing purposes
No longer necessary thanks to fix on scroller
Instead of absolute
And move RSPaginationStrategy to Layout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Draft
Development

Successfully merging this pull request may close these issues.

1 participant