Skip to content

fix: change opacity logic from random to decrement by -0.20#46830

Closed
sarthak-d11 wants to merge 2 commits into
facebook:mainfrom
dream-horizon-org:fix/issue-ME2E0003
Closed

fix: change opacity logic from random to decrement by -0.20#46830
sarthak-d11 wants to merge 2 commits into
facebook:mainfrom
dream-horizon-org:fix/issue-ME2E0003

Conversation

@sarthak-d11
Copy link
Copy Markdown
Collaborator

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

@facebook-github-bot
Copy link
Copy Markdown
Contributor

Hi @sarthak-d11!

Thank you for your pull request and welcome to our community.

Action Required

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

Process

In 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 CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@sarthak-d11 sarthak-d11 closed this Oct 4, 2024
@sarthak-d11 sarthak-d11 reopened this Oct 4, 2024
@facebook-github-bot
Copy link
Copy Markdown
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@facebook-github-bot facebook-github-bot added 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. labels Oct 4, 2024
Copy link
Copy Markdown
Contributor

@cipolleschi cipolleschi left a 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?

Comment thread packages/rn-tester/NativeComponentExample/js/MyNativeView.js
Copy link
Copy Markdown
Contributor

@cipolleschi cipolleschi left a 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.

Comment thread packages/rn-tester/NativeComponentExample/js/MyNativeView.js
}
const opacityDecrementCounter = 0.2;

function getOpacity(opacity: number): number {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Collaborator Author

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

Copy link
Copy Markdown
Contributor

@cipolleschi cipolleschi left a 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

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@cipolleschi 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 Oct 10, 2024
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@cipolleschi merged this pull request in af49070.

@react-native-bot
Copy link
Copy Markdown
Collaborator

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?

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.

4 participants