Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make setPointerEvents public on ReactViewGroup.java #45975

Closed

Conversation

jakex7
Copy link
Contributor

@jakex7 jakex7 commented Aug 12, 2024

Summary:

I maintain the react-native-svg library, where our elements extend ReactViewGroup. Currently, ReactViewGroup only exposes the getter for mPointerEvents publicly, so we cannot set it. To properly handle pointerEvents, we would have to duplicate all methods related to mPointerEvents, which results in maintaining a separate state. This duplication can lead to desynchronization between the state in our class and the state in the superclass.

PR with a workaround that we can avoid with this change software-mansion/react-native-svg#2395

Changelog:

[ANDROID] [CHANGED] - make setPointerEvents public

Test Plan:

This change was tested manually by making the field public, allowing dependent classes to override or reference it.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 12, 2024
@react-native-bot
Copy link
Collaborator

Warnings
⚠️ 📋 Missing Test Plan - Can you add a Test Plan? To do so, add a "## Test Plan" section to your PR description. A Test Plan lets us know how these changes were tested.

Generated by 🚫 dangerJS against 90e1247

@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Aug 12, 2024
@facebook-github-bot
Copy link
Contributor

@javache has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Aug 12, 2024
@facebook-github-bot
Copy link
Contributor

@javache merged this pull request in 010e001.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @jakex7 in 010e001

When will my fix make it into a release? | How to file a pick request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants