Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Active moderate issues remain in ComposePagerView’s nested-scrolling bridge, including stale consumption state, target substitution, and unmasked same-axis deltas that can corrupt parent behavior.
3 open issues
What changed in this PR
This pull request fixes Android nested-scroll forwarding through the Compose pager so page content can reach native nested-scroll parents outside the pager, such as collapsing headers.
Changes:
- Adds cross-axis Compose nested-scroll interop and native forwarding through page containers.
- Adds an Android-only collapsing-header reproduction screen and registers its native view package.
- Adds an Android end-to-end regression test for header collapse and continued list scrolling.
| File | Description |
|---|---|
| example/src/gh-issues/Issue1249NestedScrollForwardingRepro.tsx | Adds the issue #1249 reproduction UI with a collapsible native header and scrollable pager page. |
| example/src/App.tsx | Registers the new issue reproduction screen in the example app. |
| example/android/app/src/main/java/com/pagerviewexample/MainApplication.kt | Registers the example native view package with React Native. |
| example/android/app/src/main/java/com/pagerviewexample/CollapsingHeaderView.kt | Implements the native collapsing-header nested-scroll parent and view manager used by the reproduction. |
| e2e/tests/issues/issue-1249-nested-scroll-forwarding.e2e.ts | Adds Android regression coverage for header collapse and continued list scrolling through the pager. |
| android/src/main/java/com/reactnativepagerview/ComposePagerView.kt | Implements Compose and native nested-scroll forwarding across pager page containers. |
Review effort: Lite
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 4 new findings on 739c3ae. The verdict and the full list are in the summary comment.
🟢 e2e: 69 passedAll 69 tests in 28 files
Tested by e2e 0.23.1 · 9m 44s · android · run artifacts |
🟢 e2e ios: 1 flaky, 50 passed
|
| Test | Time | |
|---|---|---|
| tests/issues/issue-1154-page-change-focus.e2e.ts · 1 flaky, 13 passed | 2m 49s | |
| 🟢 | leaving a page with setPage blurs its input | 8.8s |
| 🟢 | setPage with an input focused lands on the target page | 11.2s |
| 🟢 | a setPage two pages away lands on the far page | 10.2s |
| 🟢 | a setPage repeated during the slide changes nothing | 10.6s |
| 🟢 | leaving a page with a swipe blurs its input | 10.8s |
| 🟢 | an input focused on the new page keeps focus | 11.8s |
| 🟢 | a swipe keeps the focus the new page takes from onPageSelected | 11.2s |
| 🟢 | a setPage that interrupts another lands on the page asked for last | 12.3s |
| a setPage back to the page a slide is passing lands there (1 failed attempt first) | 10.9s | |
| 🟢 | a setPage that interrupts another still lands on the later page | 11.4s |
| 🟢 | a setPage redirected once the focus has landed blurs it | 10.0s |
| 🟢 | two setPage calls that cancel out land on the first page | 10.9s |
| 🟢 | right to left › leaving a page with a swipe blurs its input | 28.5s |
| 🟢 | a page that grows with the keyboard still lands on the target page | 10.7s |
| 🟢 | tests/basic-pager.e2e.ts · 3 passed | 1m 42s |
| 🟢 | basic pager › in LTR › pages horizontally | 41.3s |
| 🟢 | basic pager › in LTR › pages vertically | 23.6s |
| 🟢 | basic pager › in RTL › pages horizontally with the reversed gesture | 36.9s |
| 🟢 | tests/issues/issue-1050-back-gesture.e2e.ts · 8 passed | 1m 40s |
| 🟢 | back gesture over the pager › in LTR › a back swipe on the first page pops the screen | 8.4s |
| 🟢 | back gesture over the pager › in LTR › a back swipe on a later page goes to the previous page | 9.3s |
| 🟢 | back gesture over the pager › in LTR › a forward swipe on the first page still goes to the next page | 7.9s |
| 🟢 | back gesture over the pager › in RTL › a back swipe on the first page pops the screen | 20.7s |
| 🟢 | back gesture over the pager › in RTL › a back swipe on a later page goes to the previous page | 19.9s |
| 🟢 | back gesture over the pager › in RTL › a forward swipe on the first page still goes to the next page | 18.7s |
| 🟢 | back gesture over a pager in a nested stack › a back swipe on the first page pops the outer stack | 7.3s |
| 🟢 | back gesture over a pager in a nested stack › a forward swipe on the first page still goes to the next page | 7.7s |
| 🟢 | tests/issues/issue-1083-modal-set-page.e2e.ts · 1 passed | 11.0s |
| 🟢 | setPage called behind a native-stack modal lands on the requested page | 11.0s |
| 🟢 | tests/issues/issue-1096-keyboard-shrink.e2e.ts · 1 passed | 13.0s |
| 🟢 | keyboard avoidance does not shrink the page under the keyboard | 13.0s |
| 🟢 | tests/issues/issue-1098-nested-pager.e2e.ts · 1 passed | 9.6s |
| 🟢 | outer pager stays responsive after its page count changes around a nested pager | 9.6s |
| 🟢 | tests/issues/issue-1142-search-bar-inset.e2e.ts · 1 passed | 9.9s |
| 🟢 | FlatList inside the pager gets the search bar safe-area insets | 9.9s |
| 🟢 | tests/issues/issue-1230-pager-between-pages.e2e.ts · 1 passed | 7.5s |
| 🟢 | a pager scrolled to a focused field still lands on the page asked for | 7.5s |
| 🟢 | tests/issues/pr-1194-remount-initial-page.e2e.ts · 1 passed | 9.7s |
| 🟢 | a pager remounted after its screen was covered starts on its own initialPage | 9.7s |
| 🟢 | tests/keyboard-dismiss-mode.e2e.ts · 3 passed | 28.0s |
| 🟢 | on-drag: dragging the pager blurs the input | 9.2s |
| 🟢 | on-drag: setPage keeps the input focused | 9.2s |
| 🟢 | none: dragging the pager keeps the input focused | 9.6s |
| 🟢 | tests/lazy-pager-view.e2e.ts · 4 passed | 52.1s |
| 🟢 | setPage mounts the target and its neighbours only | 12.6s |
| 🟢 | swiping mounts the next neighbour | 12.8s |
| 🟢 | preload distance 0 mounts only the pages visited | 12.3s |
| 🟢 | a visited page keeps its scroll position | 14.4s |
| 🟢 | tests/material-top-bar.e2e.ts · 1 passed | 15.6s |
| 🟢 | material top tabs survive a native-stack push and pop | 15.6s |
| 🟢 | tests/memo-pages.e2e.ts · 1 passed | 10.7s |
| 🟢 | memoized pages do not re-render with the pager | 10.7s |
| 🟢 | tests/native-driver-events.e2e.ts · 2 passed | 15.1s |
| 🟢 | native driver events › setPage through the Animated ref drives the native value | 7.8s |
| 🟢 | native driver events › a swipe drives the native value | 7.3s |
| 🟢 | tests/nested-pager-view.e2e.ts · 1 passed | 14.0s |
| 🟢 | nested horizontal and vertical pagers scroll independently | 14.0s |
| 🟢 | tests/on-page-selected.e2e.ts · 1 passed | 13.9s |
| 🟢 | onPageSelected fires an alert for every page change | 13.9s |
| 🟢 | tests/scrollable-pager-view.e2e.ts · 1 passed | 19.9s |
| 🟢 | pager inside a ScrollView keeps its page across vertical scrolls | 19.9s |
| 🟢 | tests/set-page-animation.e2e.ts · 4 passed | 55.7s |
| 🟢 | ltr › direct setPage selects only the target page (ltr) | 12.2s |
| 🟢 | rtl › direct setPage selects only the target page (rtl) | 25.9s |
| 🟢 | the page next to the target is selectable after a direct setPage | 8.7s |
| 🟢 | scroll setPage passes the pages in between, direct setPage does not | 8.8s |
| 🟢 | tests/smoke.e2e.ts · 1 passed | 7.3s |
| 🟢 | horizontal pager pages with the panel buttons | 7.3s |
| 🟢 | tests/tab-view-inside-scroll-view.e2e.ts · 1 passed | 14.3s |
| 🟢 | TabView inside a ScrollView swipes tabs and scrolls the page | 14.3s |
Tested by e2e 0.23.1 · 11m 44s · ios · run artifacts
🟢 e2e ios-spm: 51 passedAll 51 tests in 20 files
Tested by e2e 0.23.1 · 8m 41s · ios · run artifacts |
739c3ae to
33ad736
Compare
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 33ad736. The verdict and the full list are in the summary comment.
33ad736 to
2eab530
Compare
Apex Sentinel · 🟠 Request changes · review of
|
| Where | Finding |
|---|---|
android/src/main/java/com/reactnativepagerview/ComposePagerView.kt:797 |
ExperimentalUiInteropApi is not opted in, so the Android module fails to compile |
5 findings below minor hidden (user_settings.min_severity).
Reviewed with this repository's own Sentinel configuration (9ed912f7fb58).
💬 Talking to Sentinel
In a finding's thread, reply with:
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.


Summary
Fixes #1249. On Android, a refreshable list inside a page didn't forward its nested scroll to a native parent outside the pager, such as a collapsing header
A plain
ScrollViewalready reaches such a parent, because the framework skips the Compose layer. ARefreshControlwraps the list in an androidxSwipeRefreshLayout, so its nested scroll goes to Compose'sAndroidViewHolderinstead, which dropped it:FrameLayoutdoes, soPageContainernow enables itAndroidViewnow usesrememberNestedScrollInteropConnection()The pager's own drag runs above the page, so it doesn't pass through that connection
Test Plan
Added the repro screen Issue #1249 Nested Scroll Forwarding Repro and the e2e test
e2e/tests/issues/issue-1249-nested-scroll-forwarding.e2e.ts. The screen puts the pager inside a native collapsing header from the example app (CollapsingHeaderView). The test fails without the fix (the header stays visible) and passes with itWhat's required for testing (prerequisites)?
What are the steps to reproduce (after prerequisites)?
Issue #1249 Nested Scroll Forwarding ReproCompatibility
Checklist
README.md(not needed)