Skip to content

Commit 945ff5a

Browse files
committed
Merge branch 'fix/gesture-response-distance-react-navigation-failure' into fix/gesture-response-distance-navigation-failure
2 parents 83964f1 + ee3acd5 commit 945ff5a

33 files changed

Lines changed: 163 additions & 1323 deletions

.github/workflows/android.yml

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ jobs:
1919
group: ${{ github.ref }}-android
2020
cancel-in-progress: true
2121
steps:
22-
- uses: oven-sh/setup-bun@v2
23-
- uses: actions/checkout@v4
22+
- uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2.0.2
23+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2424

2525
- name: Install dependencies
2626
shell: bash
@@ -31,27 +31,18 @@ jobs:
3131
run: bun install
3232
working-directory: example
3333

34-
- uses: actions/setup-java@v4
34+
- uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
3535
with:
3636
distribution: 'zulu'
3737
java-version: '17'
3838
cache: 'gradle'
3939

40-
- name: Install Maestro CLI
41-
run: |
42-
export MAESTRO_VERSION=1.31.0; curl -Ls "https://get.maestro.mobile.dev" | bash
43-
brew tap facebook/fb
44-
brew install facebook/fb/idb-companion
45-
46-
- name: Add Maestro to path
47-
run: echo "${HOME}/.maestro/bin" >> $GITHUB_PATH
48-
4940
- name: Bundle app
5041
run: bun run build:android
5142
working-directory: example
5243

5344
- name: Create AVD and generate snapshot for caching
54-
uses: reactivecircus/android-emulator-runner@v2
45+
uses: reactivecircus/android-emulator-runner@1dcd0090116d15e7c562f8db72807de5e036a4ed # v2.34.0
5546
with:
5647
# Use the slimmer aosp_atd images for working
5748
# around "System UI isn't responding" ANR
@@ -73,22 +64,3 @@ jobs:
7364
disable-animations: false
7465
script: |
7566
bun example:android:release
76-
bun test:e2e:android
77-
78-
- name: Upload report
79-
if: always()
80-
uses: actions/upload-artifact@v4
81-
with:
82-
name: E2E Report
83-
path: |
84-
${{ github.workspace }}/*.mp4
85-
${{ github.workspace }}/*.png
86-
${{ github.workspace }}/report*.xml
87-
~/.maestro/tests/**/*
88-
89-
- name: Store tests result
90-
uses: actions/upload-artifact@v4
91-
with:
92-
name: e2e_android_report
93-
path: |
94-
report.xml

.github/workflows/ios.yml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ jobs:
2020
group: ${{ github.ref }}-ios
2121
cancel-in-progress: true
2222
steps:
23-
- uses: oven-sh/setup-bun@v2
24-
- uses: actions/checkout@v4
23+
- uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2.0.2
24+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2525

2626
- name: Install dependencies
2727
shell: bash
@@ -34,7 +34,7 @@ jobs:
3434

3535
- name: Cache Pods
3636
id: cache-pods
37-
uses: actions/cache@v4
37+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
3838
env:
3939
cache-name: cached-ios-pods-deps
4040
with:
@@ -49,19 +49,6 @@ jobs:
4949
run: bun pods
5050
working-directory: example
5151

52-
- name: Install Maestro CLI
53-
run: |
54-
export MAESTRO_VERSION=1.31.0; curl -Ls "https://get.maestro.mobile.dev" | bash
55-
brew tap facebook/fb
56-
brew install facebook/fb/idb-companion
57-
58-
- name: Add Maestro to path
59-
run: echo "${HOME}/.maestro/bin" >> $GITHUB_PATH
60-
6152
- name: Build iOS App
6253
run: |
6354
bun example:ios:release
64-
65-
- name: Run tests
66-
run: |
67-
bun test:e2e:ios

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ jobs:
1919

2020
steps:
2121
- name: Set up Bun
22-
uses: oven-sh/setup-bun@v2
22+
uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2.0.2
2323

2424
- name: Checkout repository
25-
uses: actions/checkout@v4
25+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2626

2727
- name: Install dependencies
2828
shell: bash

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
2+
<a href="https://www.callstack.com/open-source?utm_campaign=generic&utm_source=github&utm_medium=referral&utm_content=react-native-pager-view" align="center">
3+
<picture>
4+
<img alt="React Native PagerView" src="https://github.com/user-attachments/assets/1f0f7b9f-5723-4a9c-b0f1-99ed472f3122">
5+
</picture>
6+
</a>
7+
18
# react-native-pager-view <img src="img/viewpager-logo.png" alt="ViewPager" width="24" height="24">
29

310
[![npm package](https://badge.fury.io/js/react-native-pager-view.svg)](https://badge.fury.io/js/react-native-pager-view)
@@ -156,6 +163,7 @@ For advanced usage please take a look into our [example project](https://github.
156163
| `offscreenPageLimit: number` | Set the number of pages that should be retained to either side of the currently visible page(s). Pages beyond this limit will be recreated from the adapter when needed. Defaults to RecyclerView's caching strategy. The given value must either be larger than 0. | Android |
157164
| `overdrag: boolean` | Allows for overscrolling after reaching the end or very beginning or pages. Defaults to `false` | iOS |
158165
| `layoutDirection: ('ltr' / 'rtl' / 'locale')` | Specifies layout direction. Use `ltr` or `rtl` to set explicitly or `locale` to deduce from the default language script of a locale. Defaults to `locale` | both |
166+
| `allowNavFullscreenGesture: boolean` | Allows navigation swipe-back gestures to pass through when PagerView is at index 0. If `overdrag` is set to `true`, it will have higher priority. Defaults to `false` | iOS |
159167

160168
| Method | Description | Platform |
161169
| ------------------------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------: |

android/src/main/java/com/reactnativepagerview/Helper.kt

Lines changed: 0 additions & 21 deletions
This file was deleted.

android/src/fabric/java/com/reactnativepagerview/PagerViewViewManager.kt renamed to android/src/main/java/com/reactnativepagerview/PagerViewViewManager.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,11 @@ class PagerViewViewManager : ViewGroupManager<NestedScrollableHost>(), RNCViewPa
163163
}
164164
}
165165

166+
@ReactProp(name = "allowNavFullscreenGesture")
167+
override fun setAllowNavFullscreenGesture(view: NestedScrollableHost?, value: Boolean) {
168+
return
169+
}
170+
166171
@ReactProp(name = "overdrag")
167172
override fun setOverdrag(view: NestedScrollableHost?, value: Boolean) {
168173
return

android/src/paper/java/com/reactnativepagerview/PagerViewViewManager.kt

Lines changed: 0 additions & 172 deletions
This file was deleted.

example/ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,7 +1332,7 @@ PODS:
13321332
- React-jsiexecutor
13331333
- React-RCTFBReactNativeSpec
13341334
- ReactCommon/turbomodule/core
1335-
- react-native-pager-view (6.7.1):
1335+
- react-native-pager-view (6.8.1):
13361336
- DoubleConversion
13371337
- glog
13381338
- hermes-engine
@@ -2321,7 +2321,7 @@ SPEC CHECKSUMS:
23212321
React-logger: 8edfcedc100544791cd82692ca5a574240a16219
23222322
React-Mapbuffer: c3f4b608e4a59dd2f6a416ef4d47a14400194468
23232323
React-microtasksnativemodule: 054f34e9b82f02bd40f09cebd4083828b5b2beb6
2324-
react-native-pager-view: f238ed7fb53458bd03366944a33686f067c83e9a
2324+
react-native-pager-view: 919534782a0489f7e2aeeb9a8b8959edfd3f067a
23252325
react-native-safe-area-context: 562163222d999b79a51577eda2ea8ad2c32b4d06
23262326
React-NativeModulesApple: 2c4377e139522c3d73f5df582e4f051a838ff25e
23272327
React-oscompat: ef5df1c734f19b8003e149317d041b8ce1f7d29c

example/src/App.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,6 @@ export function Navigation() {
107107
name="PagerView Example"
108108
component={App}
109109
options={{
110-
title: global?.nativeFabricUIManager
111-
? 'PagerView Example (Fabric)'
112-
: 'PagerView Example',
113110
headerRight: () => (
114111
<Button
115112
onPress={() =>

0 commit comments

Comments
 (0)