Suggestion: Implement retention of scroll position of pages when Epub is scrollable #572
Replies: 2 comments 4 replies
-
Hello,
Opening a PR is the right way. You can do it now so that we can have a look at your implementation, or later when the suitable behaviour for the toolkit is clearer. |
Beta Was this translation helpful? Give feedback.
-
If by that you mean retention in the navigator, then I don't think that's necessarily a good idea. But swiping between two resources should be treated like jumping to an item in the TOC or following a link. It should trigger an event indicating a discontinuity in the progression that contains a locator. Storing these locators would allow an app to implement a history forward/backward feature.
Swiping between resources is what we have currently in the toolkits but remains less than ideal. In Readium Web, our preference is for using links at the bottom of the scroll instead. On mobile, this could be an overscroll since achieving continuous scrolling remains a challenge. In the case of an accidental swipe for the time being, the best way to deal with them is to use the back feature and restore the previous position. |
Beta Was this translation helpful? Give feedback.
-
Description: Every page the user visited, the scroll position is saved and when the user navigates back to a page they already visited during the same session, it should still be focused on the last scroll position. Current behavior is that they navigate to the top when scrolling to a previous page and navigate to the top when navigating to a next page. This data will only last until EpubNavigatorFragment is destroyed. Probably add this setting as an additional EpubPreferences setting.
Reason: Swiping between pages can be really sensitive and when accidentally swiping when trying to highlight or copy something, the user would need to scroll back to the last position manually. For educational books, it is also a good feature to have so the user can easily navigate back and forth while comparing something between pages.
I have implemented this in a local project based on the sample app and can create a PR for this myself but I don't know how to get about this. How does this usually work for open source projects?
Beta Was this translation helpful? Give feedback.
All reactions