feat(mobile): add horizontal swipe navigation between articles#4926
Open
atmasphere wants to merge 1 commit intoRSSNext:devfrom
Open
feat(mobile): add horizontal swipe navigation between articles#4926atmasphere wants to merge 1 commit intoRSSNext:devfrom
atmasphere wants to merge 1 commit intoRSSNext:devfrom
Conversation
Adds swipe left/right to navigate between articles in the entry detail screen, addressing the UX gap where users had to scroll to the bottom of an article before advancing to the next one. Changes: - New `useSwipeEntryNavigation` hook wrapping content in PagerView - New `EntryNavBar` component with prev/next buttons and position counter - EntryDetailScreen integrated with both swipe and existing pull-up-to-next - Shared `navigateToEntry()` function used by swipe, buttons, and pull-up The swipe uses the same `entryIds` array and `replaceControllerView` pattern already used by pull-up-to-next navigation. PagerView (already a dependency) handles the gesture, with haptic feedback on page change. Closes RSSNext#4577
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
navigateToEntry()function used by swipe, tap buttons, and existing pull-up-to-nextProblem
Currently in article reading mode, the only way to advance to the next article is to scroll all the way to the bottom and pull up. This is impractical for long articles and doesn't match the interaction patterns of other RSS readers (Reeder, Feedbin, Inoreader).
Closes #4577
Implementation
New files
useSwipeEntryNavigation.tsx— Hook that wraps content in aPagerViewwith prev/current/next pages. On swipe completion, navigates viareplaceControllerView(same mechanism as pull-up-to-next).EntryNavBar.tsx— Prev/Next button bar with position counter. Buttons disable at list boundaries. Haptic feedback on navigation.Modified files
EntryDetailScreen.tsx— Integrated swipe wrapper and nav bar. ExtractednavigateToEntry()as shared function for all navigation methods.Architecture
entryIdsarray already passed toEntryDetailScreenreact-native-pager-view(already a dependency) for gesture handlingreplaceControllerViewpattern as pull-up-to-nextexpo-haptics(matchingPagerListpattern)Test plan