Content-Length: 334424 | pFad | http://github.com/facebook/react-native/pull/49413

41 Migrate `ReactClippingViewGroup` to Kotlin by mateoguzmana · Pull Request #49413 · facebook/react-native · GitHub
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

Migrate ReactClippingViewGroup to Kotlin #49413

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mateoguzmana
Copy link
Contributor

Summary:

Migrate com.facebook.react.uimanager.ReactClippingViewGroup to Kotlin

Changelog:

[INTERNAL] - Migrate com.facebook.react.uimanager.ReactClippingViewGroup to Kotlin

Test Plan:

yarn test-android
yarn android

@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 Feb 13, 2025
@mateoguzmana mateoguzmana marked this pull request as ready for review February 13, 2025 22:52
@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 Feb 14, 2025
Comment on lines 50 to 52
@get:Deprecated("Use removeClippedSubviews property instead", ReplaceWith("removeClippedSubviews"))
@Suppress("INAPPLICABLE_JVM_NAME")
@get:JvmName("getRemoveClippedSubviews")
Copy link
Contributor

Choose a reason for hiding this comment

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

This feels wrong. Why do we need all of this? Specifically the ReplaceWith won't work as you're replacing with the same string

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, I see it now. I was overlooking it, added these annotations for backwards compatibility based on other examples in the codebase when trying to fix some issues post-migration for ReactHorizontalScrollContainerLegacyView in old arch but just double checked and indeed are not needed. Thanks for pointing this out

Comment on lines +22 to +23
override var removeClippedSubviews: Boolean = false
set(value) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is probably an indicator of a breaking change. We should check how often ReactClippingViewGroup is implemented in OSS. If the number is relevant this will have to be marked as [BREAKING] rather than internal.

If there are no relevant usages on the other hand, we can make this class [INTERNAL]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see some usages in OSS (ref), so it would be a breaking change indeed.

Now, my memory started getting back to why I added the backwards compatibility annotations: seems like we can prevent this from being a breaking change by adding the following (tested by reverting the changes in ReactHorizontalScrollContainerLegacyView):

@Suppress("INAPPLICABLE_JVM_NAME")
@set:JvmName("setRemoveClippedSubviews")
public var removeClippedSubviews: Boolean

But in the other hand, I don't see any other cases where we have done this in the codebase. Do we prefer to have it as a breaking change?

Copy link
Contributor

Choose a reason for hiding this comment

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

So we need to look only at Kotlin usages here

and here

I believe the latter as just forks, so we can consider this actually [INTERNAL]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ohh, understood. Seems good then, thank you for double checking!

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. 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








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/facebook/react-native/pull/49413

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy