-
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
Update opacity when disabled
prop is changed
#17106
Update opacity when disabled
prop is changed
#17106
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up 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 the corporate CLA signed. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
@facebook-github-bot label Android Generated by 🚫 dangerJS |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Hi @hramos, when do you think this PR can be reviewed? Thanks. |
@maxkomarychev I tried to find reviewers for this pull request and wanted to ping them to take another look. However, based on the blame information for the files in this pull request I couldn't find any reviewers. This sometimes happens when the files in the pull request are new or don't exist on master anymore. Is this pull request still relevant? If yes could you please rebase? In case you know who has context on this code feel free to mention them in a comment (one person is fine). Thanks for reading and hope you will continue contributing to the project. |
fixes facebook#17105 If you render ``` <TouchableOpacity disabled={true} style={{opacity: 0.5}} > ... </TouchableOpacity> ``` and then ``` <TouchableOpacity disabled={false} style={{opacity: 1}} > ... </TouchableOpacity> ``` The content of `TouchableOpacity` will still have opacity = 0.5 because real opacity is controlled by animated property which should be properly updated when `disabled` prop changes.
ff94f25
to
3b2469d
Compare
@dlowder-salesforce @lwinkyawmyat @levsero, could you please review or suggest who can do that? thanks. |
Anyone reviewing this?? |
Anyone reviewing this? |
This again, valid patch, nobody reviewing... :( |
I can review it, but I can't merge it.... maybe you can add release notes? @shergin might be the right person for this.... |
@dlowder-salesforce updated release notes, appreciate your feedback! thanks! |
@danilobuerger there's over a hundred PRs that have been filed ahead of this one. Please be patient! |
@hramos Instead of being patient, maybe RN just needs more maintainers. Waiting for months to get something reviewed has a chilling effect on contributors. (Disclaimer: I know, this is open source, everybody is doing this on their free time. My point is: RN needs more maintainers). |
Please consider the chilling effect you could have on existing maintainers as well. Fortunately, we do provide a path to contributing back to the repo: How to Contribute. |
So I shouldn't speak up if I think something isn't right? How would things ever change if we all had to be quiet and tiptoe around each other?
I know how to contribute, but that's not the issue when having > 100 PRs. It's missing maintainers. |
@maxkomarychev I tried to find reviewers for this pull request and wanted to ping them to take another look. However, based on the blame information for the files in this pull request I couldn't find any reviewers. This sometimes happens when the files in the pull request are new or don't exist on master anymore. Is this pull request still relevant? If yes could you please rebase? In case you know who has context on this code feel free to mention them in a comment (one person is fine). Thanks for reading and hope you will continue contributing to the project. |
+1 |
@maxkomarychev I'm going to review and test this PR.... I'm curious, does |
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.
Tested the fix, works well on both iOS and tvOS.
@facebook-github-bot shipit |
Something went wrong executing that command, @hramos could you take a look? |
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.
@dlowder-salesforce is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Thanks a lot @dlowder-salesforce . |
has this been merged yet? |
fixes #17105
If you render
and then
The content of
TouchableOpacity
will still have opacity = 0.5 because realopacity is controlled by animated property which should be properly updated
when
disabled
prop changes.Motivation
Usually when a button or other UI component is built with
TouchableOpacity
you may want to change it's opacity if state of component is changed (enabled/disabled). Opacity provided in props is overridden with internally-managed animated value. Add extra check when component is updated to trigger opacity animation upon change ofdisabled
flag.Test Plan
You can use code from #17105.
Related PRs
(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/react-native-website, and link to your PR here.)
Release Notes
[GENERAL][BUGFIX][TouchableOpacity] - trigger animation on
opacity
upon change indisabled
prop.