Open
Conversation
Contributor
Reviewer's GuideEnhanced the pager navigation logic to attempt vertical panning (down/up) before default horizontal panning when the ‘navigateToPan’ config is enabled. Updated Class Diagram for PagerViewerclassDiagram
class PagerViewer {
+moveToNext()
+moveToPrevious()
}
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
92e9109 to
f225e61
Compare
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.
Resolves #935
Why is this feature needed?
The current reader behavior in landscape mode when zoomed in does not properly support vertical panning. Users expect that tapping right or left will first attempt to pan up or down (depending on which edge of the page is visible) before moving to the next or previous page. This update aims to improve the user experience by enabling more intuitive navigation when the page is zoomed in.
What and how are we changing? Why this approach?
We modified the logic in PagerViewer to check for vertical panning before falling back to the horizontal page navigation. When a user taps right, the code now checks if it can pan down (instead of immediately panning right) using the holder.canPanDown() function. Similarly, when a user taps left, it checks if it can pan up before executing a pan left. This approach ensures that if there is spillover for vertical navigation, the reader will pan accordingly, and if the edge of the page is reached, it will then trigger the page change.
What actions are required from users?
No immediate actions are required from users. However, it is recommended to update to the latest version of the app to benefit from this enhanced panning behavior in landscape mode when zoomed in.
How does it work? (Technical details)
• In PagerViewer.kt:
• These changes rely on the underlying capabilities of the page holder (canPanDown, panDown, canPanUp, panUp) to determine and execute the correct panning behavior.
Is it backwards compatible?
Yes, the change is backwards compatible. If the vertical panning conditions are not met, the application will utilize the existing horizontal pan behavior. Users who have not updated their reading patterns or whose pages do not have vertical panning capability will not notice any change in behavior.
Any other considerations?
We considered other approaches such as dynamically adjusting the pan behavior based on the zoom level or user settings; however, checking for the capability directly on the page holder and conditionally executing the appropriate pan provided the cleanest and most maintainable solution. Further testing will be necessary to ensure seamless performance across different page types and zoom levels.