Uh oh!
There was an error while loading. Please reload this page.
Update opacity when disabled prop is changed - #17106
Conversation
facebook-github-bot
commented
Dec 7, 2017
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 |
facebook-github-bot
commented
Dec 7, 2017
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
maxkomarychev
commented
Dec 25, 2017
Hi @hramos, when do you think this PR can be reviewed? Thanks. |
facebook-github-bot
commented
Jan 6, 2018
@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. |
fixesreact#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
3b2469dComparemaxkomarychev
commented
Jan 6, 2018
@dlowder-salesforce @lwinkyawmyat@levsero, could you please review or suggest who can do that? thanks. |
maxkomarychev
commented
Jan 8, 2018
jctf
commented
Jan 15, 2018
Anyone reviewing this?? |
tobiastornros
commented
Jan 21, 2018
Anyone reviewing this? |
danilobuerger
commented
Jan 26, 2018
This again, valid patch, nobody reviewing... :( |
douglowder
commented
Jan 26, 2018
I can review it, but I can't merge it.... maybe you can add release notes? @shergin might be the right person for this.... |
maxkomarychev
commented
Jan 26, 2018
@dlowder-salesforce updated release notes, appreciate your feedback! thanks! |
hramos
commented
Jan 26, 2018
@danilobuerger there's over a hundred PRs that have been filed ahead of this one. Please be patient! |
danilobuerger
commented
Jan 26, 2018
@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). |
hramos
commented
Jan 26, 2018
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. |
danilobuerger
commented
Jan 26, 2018
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. |
facebook-github-bot
commented
Feb 6, 2018
@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. |
oferRounds
commented
Feb 12, 2018
+1 |
douglowder
commented
Mar 4, 2018
@maxkomarychev I'm going to review and test this PR.... I'm curious, does |
douglowder
left a comment
There was a problem hiding this comment.
Tested the fix, works well on both iOS and tvOS.
douglowder
commented
Mar 5, 2018
@facebook-github-bot shipit |
facebook-github-bot
commented
Mar 5, 2018
Something went wrong executing that command, @hramos could you take a look? |
facebook-github-bot
left a comment
There was a problem hiding this comment.
@dlowder-salesforce is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
maxkomarychev
commented
Mar 6, 2018
Thanks a lot @dlowder-salesforce . |
ssuchanowski
commented
Nov 9, 2018
has this been merged yet? |
fixes#17105
If you render
and then
The content of
TouchableOpacitywill still have opacity = 0.5 because realopacity is controlled by animated property which should be properly updated
when
disabledprop changes.Motivation
Usually when a button or other UI component is built with
TouchableOpacityyou 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 ofdisabledflag.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
opacityupon change indisabledprop.