-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
fix: change opacity logic from random to decrement by -0.20 #46830
Conversation
Hi @sarthak-d11! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
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 @sarthak-d11 for taking a stance at that. However, I don't think that the current implementation is working as we expect. Can you check the comment I left, please?
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 for the PR and thanks for the patience. I'd update the function name as it could be misleading. But looks good, aside for this.
@@ -85,6 +85,14 @@ function getTextFor(measureStruct: MeasureStruct): string { | |||
measureStruct.height, | |||
)}`; | |||
} | |||
const opacityDecrementCounter = 0.2; | |||
|
|||
function getOpacity(opacity: number): number { |
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.
function getOpacity(opacity: number): number { | |
function computeNextOpacity(opacity: number): number { |
Can we change the name of the function to make clearer what's its purpose? Otherwise it looks like it should return the opacity value, but it is actually doing much more.
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.
I have updated the function name as you said. Please review
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.
Amazing job, thank you so much
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@cipolleschi merged this pull request in af49070. |
This pull request was successfully merged by @sarthak-d11 in af49070 When will my fix make it into a release? | How to file a pick request? |
Summary:
Part of this: #46757
Solves:
ME2E0003
Changelog:
[ Internal ] [ Changed ] - The opacity logic is changed from random to decrement the opacity by -0.2
For more details, see:
Test Plan:
yarn e2e-test-ios
yarn e2e-test-android