Skip to content
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

Closed

Conversation

varungupta85
Copy link
Contributor

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.
screenshot 2019-01-23 at 10 55 08 am

This is how they appeared after the fix. This is exactly how they appeared before I upgraded react-native also.

screenshot 2019-01-23 at 10 54 29 am

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.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 23, 2019
Copy link

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

@facebook-github-bot facebook-github-bot added the Import Started This pull request has been imported. This does not imply the PR has been approved. label Jan 23, 2019
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a 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.

@cpojer
Copy link
Contributor

cpojer commented Jan 23, 2019

Thanks for the PR! You are right, this looks like an unintentional bug that was introduced recently.

@react-native-bot
Copy link
Collaborator

@varungupta85 merged commit ad52f52 into facebook:master.

@facebook facebook locked as resolved and limited conversation to collaborators Jan 23, 2019
@react-native-bot react-native-bot added the Merged This PR has been merged. label Jan 23, 2019
@hramos hramos removed Import Started This pull request has been imported. This does not imply the PR has been approved. labels Feb 6, 2019
matt-oakes pushed a commit to matt-oakes/react-native that referenced this pull request Feb 7, 2019
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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Component: Button Merged This PR has been merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants