Skip to content

[Web] Restore enabled on a full config replace - #4487

Open
j-piasecki wants to merge 1 commit into
push-psxlkolpnzonfrom
push-ulsumnxmxtrt
Open

[Web] Restore enabled on a full config replace#4487
j-piasecki wants to merge 1 commit into
push-psxlkolpnzonfrom
push-ulsumnxmxtrt

Conversation

@j-piasecki

Copy link
Copy Markdown
Member

Description

The web GestureHandler kept the previous enabled value when a full config replace did not carry the key. It now falls back to true, matching Android and iOS.

Test plan

Added a test in GestureHandler.test.ts.

## Description

The web GestureHandler kept the previous enabled value when a full config replace did not carry the key. It now falls back to true, matching Android and iOS.

## Test plan

Added a test in `GestureHandler.test.ts`.
@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: 6e02220d-641c-4fd5-a439-7faff2c975c8

📥 Commits

Reviewing files that changed from the base of the PR and between 8bac43c and 81419f9.

📒 Files selected for processing (2)
  • packages/react-native-gesture-handler/src/web/handlers/GestureHandler.ts
  • packages/react-native-gesture-handler/src/web/handlers/__tests__/GestureHandler.test.ts

Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review.


📝 Summary

Summary by CodeRabbit

  • Bug Fixes

    • Gesture handlers now become enabled by default when configuration does not specify an enabled value.
    • Updating a disabled handler with otherwise empty configuration correctly restores its enabled state.
  • Tests

    • Added coverage to verify the default enabled behavior.

Walkthrough

The web gesture handler now defaults omitted enabled values to true. A regression test verifies that applying an empty configuration re-enables a disabled handler.

Changes

Gesture enablement

Layer / File(s) Summary
Default enabled configuration
packages/react-native-gesture-handler/src/web/handlers/GestureHandler.ts, packages/react-native-gesture-handler/src/web/handlers/__tests__/GestureHandler.test.ts
setGestureConfig applies enabled: true when the configuration omits enabled. The test verifies that an empty configuration restores a disabled handler to enabled === true.

Suggested reviewers: m-bert

Merge Risk: ⚪ Minimal · up to 81419

Web gesture handlers now return to their default enabled state when a replacement configuration omits enabled, matching the intended platform behavior. The focused regression coverage supports merge readiness.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly describes the main change: restoring the default enabled state when a full gesture configuration replacement omits enabled.

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.

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.

2 participants