Skip to content

feat: add scroll-guard module, resetToBuiltInBundle API, and bump to 1.1.38#33

Open
huhuanming wants to merge 14 commits intomainfrom
feat/reset-to-builtin-bundle
Open

feat: add scroll-guard module, resetToBuiltInBundle API, and bump to 1.1.38#33
huhuanming wants to merge 14 commits intomainfrom
feat/reset-to-builtin-bundle

Conversation

@huhuanming
Copy link
Contributor

@huhuanming huhuanming commented Mar 12, 2026

Summary

  • Add resetToBuiltInBundle() API to react-native-bundle-update that clears the currentBundleVersion preference, allowing the app to revert to the built-in JS bundle on next restart
  • Add new react-native-scroll-guard module — a native view wrapper that prevents parent scrollable containers (PagerView/ViewPager2) from intercepting child scroll gestures
  • Fix scroll-guard Android crash: use ViewGroupManager instead of nitrogen-generated SimpleViewManager to properly support child views (fixes IViewGroupManager ClassCastException)
  • Fix scroll-guard iOS gesture blocking reliability
  • Add nitrogen/ to .gitignore and clean up tracked nitrogen files
  • Bump all packages version to 1.1.38

Test plan

  • Verify resetToBuiltInBundle() clears the bundle preference on Android and iOS
  • Verify app loads built-in bundle after calling resetToBuiltInBundle() and restarting
  • Verify ScrollGuard wraps FlatList/ScrollView inside PagerView without crash on Android
  • Verify ScrollGuard correctly blocks parent gesture interception on iOS
  • Verify horizontal/vertical/both direction modes work correctly

🤖 Generated with Claude Code

Add resetToBuiltInBundle() method to clear currentBundleVersion preference,
allowing the app to revert to the built-in JS bundle on next restart.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
devin-ai-integration[bot]

This comment was marked as resolved.

huhuanming and others added 2 commits March 12, 2026 18:05
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Native view component that prevents parent PagerView from intercepting
child ScrollView gestures. Uses requireGestureRecognizerToFail on iOS
and requestDisallowInterceptTouchEvent on Android. Supports horizontal,
vertical, and both directions. Includes example test page.
@socket-security
Copy link

socket-security bot commented Mar 13, 2026

No dependency changes detected. Learn more about Socket for GitHub.

👍 No dependency changes detected in pull request

huhuanming and others added 10 commits March 13, 2026 23:31
- Nitro host views render React children as native siblings, not subviews.
  Override hitTest to return nil (pass-through) and find sibling ScrollView.
- Use two-layer blocking: touch detector (LongPress with 0 delay) disables
  pager on touch-down instantly; blocker pan + require(toFail:) as backup.
- Disable bounces on example banner ScrollView to prevent edge scroll leak.
- Add homepage field to package.json for podspec validation.
- Persist blocker across pager page transitions to avoid first-touch delay.
Remove 476 auto-generated nitrogen files from git tracking across all
modules. Add nitrogen/ ignore rule to pager-view, scroll-guard, and
tab-view .gitignore files. Also simplify scroll-guard .gitignore.
…roid

HybridScrollGuardManager (generated by nitrogen) extends SimpleViewManager which
doesn't implement IViewGroupManager, causing a ClassCastException when React Native
tries to add child views. Replace with a custom ScrollGuardViewGroupManager that
extends ViewGroupManager to properly support containing child scrollable views.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@huhuanming huhuanming changed the title feat(bundle-update): add resetToBuiltInBundle API and bump to 1.1.37 feat: add scroll-guard module, resetToBuiltInBundle API, and bump to 1.1.38 Mar 13, 2026
devin-ai-integration[bot]

This comment was marked as resolved.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant