-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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 SwipeableActionButton styling. #23113
Conversation
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.
Code analysis results:
flow
found some issues.
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.
@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Thanks for the PR! You are right, this looks like an unintentional bug that was introduced recently. |
@varungupta85 merged commit ad52f52 into |
Summary: Thank you for sending the PR! We appreciate you spending the time to work on these changes. Help us understand your motivation by explaining why you decided to make this change: Changelog: ---------- Help reviewers and the release process by writing your own changelog entry. See http://facebook.github.io/react-native/docs/contributing#changelog for an example. [General] [Fixed] - Same style was applied twice to SwipeableQuickActionButton in a recent commit causing problems with the buttons layout. Pull Request resolved: facebook#23113 Differential Revision: D13781896 Pulled By: cpojer fbshipit-source-id: 659ddaed32b6a1e90080344ea3b0b42088fd9783
Thank you for sending the PR! We appreciate you spending the time to work on these changes.
Help us understand your motivation by explaining why you decided to make this change:
Changelog:
Help reviewers and the release process by writing your own changelog entry. See http://facebook.github.io/react-native/docs/contributing#changelog for an example.
[General] [Fixed] - Same style was applied twice to SwipeableQuickActionButton in a recent commit causing problems with the buttons layout.
Test Plan:
I have tested the changes locally in my app. The swipeable action buttons got messed up after I upgraded to latest react native. I found that a recent commit 886d705#diff-46bd7d6f94be9729ed39ea900705327e has added support for a custom view but in the process, we are applying the passed in style twice to the buttons. Also, I don't see the point of applying passed in style to a custom view when a user can just apply it themselves while passing it.
Below is how the quick action buttons appeared after the upgrade. They are supposed to take up equal space.
This is how they appeared after the fix. This is exactly how they appeared before I upgraded react-native also.
To test it, I am using a swipeable flat list where each item is a swipeable row. The swipeable actions are given equal space among each by using a
flex: 1
.