Slider flexbox layout#1698
Conversation
|
Can you resolve the conflicts? |
Codecov Report
@@ Coverage Diff @@
## next #1698 +/- ##
==========================================
+ Coverage 87.74% 94.91% +7.16%
==========================================
Files 33 33
Lines 555 570 +15
Branches 68 73 +5
==========================================
+ Hits 487 541 +54
+ Misses 57 25 -32
+ Partials 11 4 -7
Continue to review full report at Codecov.
|
|
@armenbadalyan changes make sense to me. Thanks for taking the time to fix it and submit a PR! 💯 I see you wrote additional tests for it as well. Great job! Although have you tested the vertical orientation of the slider. Usually it helps to include a screenshot of the change/component so we can visualize what it looks like. I tried your code locally and I wasn't able to get the vertical slider to work. Here's what I did: Horizontal slider:Then I changed the Let me know if I might have missed something or did something wrong. Also it would help if you can include a code snippet that shows horizontal/vertical so anyone can just c/p it and try it out. |
|
@Monte9 , thank you for taking the time to review my PR. In horizontal orientation, since the width in your example was not specified explicitly, according to react-native layout rules it takes 100% of the parent container width. In vertical orientation one should specify the height either explicitly or using flexbox layout. In other words it behaves just like a regular View. |
|
Also appreciate you submitting the PR! We use OpenCollective to give back to contributors like yourself so I'd be happy to send $20 your way for your efforts. Let me know if this sounds good to you and I can tell you how to submit your expense. |
|
Are we waiting on the change to the docs ? |
|
Thanks again @armenbadalyan 💯 |
|
Thank you guys, it was my pleasure :) |



Slider component is relying on
transform: [{ rotate: '90deg' }]style to implement vertical orientation. This seems to cause issues similar to the ones described in #1281. This PR refactors the Slider component to use flexbox layout thus making Slider size and position more predictable in both vertical and horizontal orientations.