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
Use bit flag instead of booleans in TestDrawableComponent #79
Comments
Hey @emilsjolander, I want to take up this issue. Can you guide me? Do we need to use bit flags just like it is used in InternalNode.java file? |
Awesome! Yes I believe so. Will delegate specifics to @mihaelao who is the POC for this issue 👍 She should be able to provide more specific guidance. |
Hey @mihaelao, I have some doubt regarding this issue. Do we also need to change the return types of methods like callsShouldUpdateOnMount() etc? |
Hi @anu0012, thanks for taking this up! You're right, the idea is to use bit flags instead of booleans, same as for InternalNode. The API shouldn't change though, those methods should still return booleans, but you can perform bitwise operations on the flags instead of returning the booleans directly. |
Resolved with #138 |
We have a lot of booleans to configure the test components like
callsShouldUpdateOnMount
orimplementsAccessibility
. Instead of keeping the configuration flags as booleans we could have them as bit flags.Code pointers
https://github.com/facebook/litho/blob/master/litho-testing/src/main/java/com/facebook/litho/testing/TestDrawableComponent.java
Point of contact: @mihaelao
The text was updated successfully, but these errors were encountered: