Skip to content

Stop react-native-pager-view from entering the web bundle of the example app - #4604

Merged
m-bert merged 1 commit into
mainfrom
@mbert/fix-web-bundle-pager-view-import
Oct 16, 2026
Merged

m-bert merged 1 commit into
mainfrom
@mbert/fix-web-bundle-pager-view-import

Conversation

@m-bert

@m-bert m-bert commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

Description

Since #4589 the web build of expo-example fails with Unable to resolve module ../../src/private/devsupport/rndevtools/ReactDevToolsSettingsManager from react-native/Libraries/Core/setUpReactDevTools.js.

The new Native intercept cancellation test screen imports react-native-pager-view statically. The screen is registered with unsupportedPlatforms for web, but that only hides it from the list, Metro still resolves the import for every platform. On web PagerViewNativeComponent pulls in codegenNativeCommands, which reaches InitializeCore through RendererProxy, and InitializeCore requires a module that only ships .ios.js and .android.js variants.

The screen is now index.android.tsx, with an index.tsx stub for the other platforms, the same pattern the legacy pagerAndDrawer example uses. The import never enters the web graph.

Test plan

  • expo start web, Android and iOS bundles all build. The web bundle contains the stub and no react-native-pager-view module, the Android bundle contains the real screen.
  • yarn ts-check and eslint pass.

Copilot AI balanced review requested due to automatic review settings October 16, 2026 13:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9c323083-850c-4636-aa5b-8ca57c7a2245
📥 Commits

Reviewing files that changed from the base of the PR and between 404c091 and ebf35de.

📒 Files selected for processing: 2
  • apps/common-app/src/new_api/tests/nativeInterceptCancellation/index.android.tsx
  • apps/common-app/src/new_api/tests/nativeInterceptCancellation/index.tsx

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

📝 Summary

Summary by CodeRabbit

  • New Features
    • Added an Android example demonstrating how native pager swipes and drawer gestures cancel an in-progress tap, with tap counts and gesture lifecycle logging.
    • On other platforms, the example displays a message noting that it is Android-only.

The change adds an Android example that demonstrates tap cancellation when a pager or drawer takes over touch handling. The example tracks tap activations and logs tap lifecycle callbacks. The non-Android component displays a message identifying the demo as Android-only.

Changes: Native interception cancellation demo

Layer / File(s) Summary
Android gesture-cancellation example and platform fallback
apps/common-app/src/new_api/tests/nativeInterceptCancellation/index.android.tsx, apps/common-app/src/new_api/tests/nativeInterceptCancellation/index.tsx
The Android example adds a tap counter, lifecycle logging, and controls to switch between pager and drawer layouts. The non-Android component now renders an Android-only message.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to ebf35

The Android demo and the fallback match the intended platform split. No issue identified here needs resolution before merging.

Pre-merge checks: Passed 3
Check name Status Explanation
Title check Passed The title accurately and clearly states the primary change: preventing react-native-pager-view from entering the example app's web bundle.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@m-bert
m-bert merged commit dff741a into main Oct 16, 2026
7 checks passed
@m-bert
m-bert deleted the @mbert/fix-web-bundle-pager-view-import branch October 16, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants