-
Notifications
You must be signed in to change notification settings - Fork 24.7k
Convert ReactPropForShadowNodeSpecTest to Kotlin #39284
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for working on this!
Just a couple of nitpick comments :)
|
||
companion object { | ||
private class BaseViewManager( | ||
private val mShadowNodeClass: Class<out ReactShadowNode<ReactShadowNodeImpl>> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using Hungarian notation is not idiomatic for Kotlin, could you please name it shadowNodeClass
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated!
@Ignore | ||
class ReactPropForShadowNodeSpecTest { | ||
|
||
companion object { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please move the companion object to the end of the class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved
companion object { | ||
private class BaseViewManager( | ||
private val mShadowNodeClass: Class<out ReactShadowNode<ReactShadowNodeImpl>> | ||
): ViewManager<View?,ReactShadowNode<*>>() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
View
could probably be non-nullable here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
object : ReactShadowNodeImpl() { | ||
@ReactPropGroup(names = ["prop1", "prop2"]) | ||
fun setterWithNoIndexParam(value: Float, boolean: Boolean) {} | ||
}::class.java |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why ::class.java
here vs .javaClass
in prior clauses?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Silly mistake on my end. This has been updated
@rshest has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Hey thanks for the quick review @rshest ! I actually created this PR because I ran into a roadblock. The issue (#38825) asks us to
I was able to kotlinify the test but i am stuck on making it pass hence why it is still ignored. I run into an Unsatisfied link error caused by the yoga dependency |
@IzuEneh I'll check it out, but otherwise we could take fixing as a separate follow-up. |
@rshest has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Summary: ## Changelog: [Internal] - Follow up to facebook#39284 (D48960815), which landed and broke one of the build clauses on CircleCI tests (treating unused parameters as errors, even though they are expected to be unused). Differential Revision: D49010472
Summary: ## Changelog: [Internal] - Follow up to facebook#39284 (D48960815), which landed and broke one of the build clauses on CircleCI tests (treating unused parameters as errors, even though they are expected to be unused). Reviewed By: hoxyq Differential Revision: D49010472
Summary: Pull Request resolved: #39311 ## Changelog: [Internal] - Follow up to #39284 (D48960815), which landed and broke one of the build clauses on CircleCI tests (treating unused parameters as errors, even though they are expected to be unused). Reviewed By: hoxyq Differential Revision: D49010472 fbshipit-source-id: 469bf3a9923b85e465d4574e69e9372c16fbc125
Summary: Pull Request resolved: facebook#39311 ## Changelog: [Internal] - Follow up to facebook#39284 (D48960815), which landed and broke one of the build clauses on CircleCI tests (treating unused parameters as errors, even though they are expected to be unused). Reviewed By: hoxyq Differential Revision: D49010472 fbshipit-source-id: 469bf3a9923b85e465d4574e69e9372c16fbc125
Summary:
This PR converts ReactPropForShadowNodeSpecTest to Kotlin. #38825
Changelog:
[INTERNAL] [CHANGED] - Kotlinify ReactPropForShadowNodeSpecTest.java
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
Test Plan:
./gradlew :packages:react-native:ReactAndroid:test
must pass