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(ListItem): left & right content width onRelease in Swipeable #3534

Merged

Conversation

louislatreille
Copy link
Contributor

Motivation

The width for the left and right content are inverted in the ListItem.Swipeable. The right width on release was set to the left width and vice-versa.

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Jest Unit Test
  • Checked with example app

I've modified the example app slightly with the following change, adding leftWidth={ScreenWidth / 5} to the ListItem.Swipeable component.

Screenshots before my fix:
Screenshot_20220519-142626_Expo Go
Screenshot_20220519-142621_Expo Go

Screenshots after my fix:
Screenshot_20220519-142637_Expo Go
Screenshot_20220519-142644_Expo Go

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • [ ] I have commented my code, particularly in hard-to-understand areas Not needed
  • [ ] I have made corresponding changes to the documentation using yarn docs-build-api not needed
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Additional context

The width for the left and right content were inverted. The right width on release was set to the left width and vice-versa.
@codecov
Copy link

codecov bot commented May 19, 2022

Codecov Report

Merging #3534 (5944b68) into next (8ab30ed) will not change coverage.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##             next    #3534   +/-   ##
=======================================
  Coverage   79.18%   79.18%           
=======================================
  Files          87       87           
  Lines        1806     1806           
  Branches      810      793   -17     
=======================================
  Hits         1430     1430           
  Misses        369      369           
  Partials        7        7           
Impacted Files Coverage Δ
packages/base/src/ListItem/ListItem.Swipeable.tsx 6.52% <0.00%> (ø)

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@arpitBhalla arpitBhalla changed the title fix(ListItem.Swipeable): Proper left and right content width onRelease fix(ListItem): Proper left and right content width onRelease in Swipeable May 19, 2022
@arpitBhalla arpitBhalla changed the title fix(ListItem): Proper left and right content width onRelease in Swipeable fix(ListItem): left & right content width onRelease in Swipeable May 19, 2022
@arpitBhalla arpitBhalla merged commit 7816555 into react-native-elements:next May 19, 2022
@arpitBhalla
Copy link
Member

Thanks for the contribution 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants