Kavita icon indicating copy to clipboard operation
Kavita copied to clipboard

feat: book reader swipe pagination

Open ShivamAmin opened this issue 11 months ago • 9 comments

Added

  • Added: Setting to toggle swipe to paginate setting in reader settings
  • Added: Disable text highlighting when menu is hidden and swipe to paginate is enabled
  • Added: Swipe to change page functionality using swipe distance (30% screen threshold) (Idea: #2666)
  • Added: Migrated DB to add new user preference setting: BookReaderSwipeToPaginate
  • Added: User Configurable Swipe To Paginate Threshold User Preferences settings

Changed

  • Changed: Swipe to change page functionality now also uses speed (distance/time) to determine whether to paginate.
  • Changed: CONTRIBUTING.md page to include instructions for migrating database
  • Changed: Untied immersive mode and tap pagination settings in reader settings (fixes #1997) This makes sense as you can enable swipe pagination instead.

Fixed

  • Fixed: Fixed a bug where the user is able to soft lock the book reader by enabling immersive mode but disabling click to paginate
  • Fixed: Disable click to paginate boxes when action bar is visible (fixes #2694)
  • Fixed: User preferences page so that Tap and Swipe pagination are mutually exclusive

TODO

  • Nice to have: Swipe animations (May be more effort than worth?)
  • Suggestions welcome

ShivamAmin avatar Feb 29 '24 07:02 ShivamAmin

I added the toggle for this feature to the user preferences page, but for it to work we need to add the migration. I've done this before, but I can't figure out how it's done in this stack. I'm happy to read documentation and add it myself

ShivamAmin avatar Feb 29 '24 20:02 ShivamAmin

To add the migration you add the setting to the user preferences entity then type dotnet ef migrations add MigrationNameHere.

Review the SQL and launch Kavita to have it applied.

majora2007 avatar Feb 29 '24 20:02 majora2007

To add the migration you add the setting to the user preferences entity then type dotnet ef migrations add MigrationNameHere.

Review the SQL and launch Kavita to have it applied.

Great, I'll also see about adding this to the readme or somewhere so it's documented, I'm sure I'll need to reference it in the future.

ShivamAmin avatar Feb 29 '24 21:02 ShivamAmin

Just an FYI, I am still planning to review this. I have all bugfixes and PRs on hold until I wrap this comic rework. I'm really curious to see how this works and go through the code.

majora2007 avatar Mar 09 '24 21:03 majora2007

Hey, just curious if you're up for fixing merge conflicts? I have wrapped the comic rework stuff and there is time to review this and see if it can make the v0.8 release.

majora2007 avatar Mar 30 '24 19:03 majora2007

Hey, just curious if you're up for fixing merge conflicts? I have wrapped the comic rework stuff and there is time to review this and see if it can make the v0.8 release.

Sorry it took a while, but the merge conflicts have been resolved, and I tried to clean up the commit history

ShivamAmin avatar Apr 07 '24 00:04 ShivamAmin

Thanks, I'll review the PR this week. Looks like quite a big one.

majora2007 avatar Apr 07 '24 14:04 majora2007

Hey, sorry I haven't tackled this yet. It's a big PR with a lot of different things added in (for future reference, smaller PRs that are directed with one feature is much better for me).

It's in my mind, but not a priority until I have enough time to really tackle and test.

majora2007 avatar Jun 02 '24 13:06 majora2007