-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
React Native <0.43 support #1555
Conversation
a03f19d
to
8923341
Compare
Codecov Report
@@ Coverage Diff @@
## master #1555 +/- ##
==========================================
- Coverage 20.46% 20.14% -0.33%
==========================================
Files 241 244 +3
Lines 5243 5327 +84
Branches 649 660 +11
==========================================
Hits 1073 1073
- Misses 3678 3744 +66
- Partials 492 510 +18
Continue to review full report at Codecov.
|
This looks good to me. I personally dislike having to "go backwards" but I understand the need. |
I just realized I hand't audited other components. Verifying |
I should pull this into my |
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.
LGTM! Tested (but not on old RN)
Testing RN 0.27 right now. Will report back shortly |
- StyleSheet.absoluteFillObject polyfill - Polyfill for min/max width/height style rules through a component
Ran into two additional backward incompatibilities. For ease of use moving forward, I added a
|
Made additional changes
38ef3f6 moves the polyfill implementations into |
d5af172
to
38ef3f6
Compare
👍 How far back do we want to support? I understand we want to make sure that we support older versions of React Native but there has to be a limit to how far back we go. |
It's all about finding the proper balance. Storybook itself doesn't require much UI, so with minimal effort we're able to keep folks on earlier versions supported. If there's any drawback, I think it'll be on the contributor and reviewer side to keep those requirements communicated and enforced. We currently support I don't think this is the proper thread to make a formal decision, but it is something to consider moving forward with the compatibility support in, and observe how things go in future reviews. |
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.
LGTM and tested
Issue: Builds were broken for React Native versions
<0.43
. (#1553)What I did
Swapped out
SectionList
forListView
. This will be deprecated in the future (I don't believe anytime soon/immediate), so ideally we may want to export a List component that interfaces with whichever underlyingListView
/SectionList
implementation is supported. For now, this simply unbreaks<0.43
builds.There are two additional regressions:
StyleSheet.absoluteFillObject
and the use ofmaxWidth
in a style. For ease of use moving forward, I added apolyfills/
directory to address these head on.StyleSheet.absoluteFillObject
This is only supported in recent versions. It's simply a preset style for a full screen absolutely positioned element.
MinMaxViewPolyfill
The min/max width/height features of styles are not available on earlier versions of React Native. This adds a Higher Order Component that can declaratively (through props) apply these bounding rules to any child component.
How to test
Run the
react-native-vanilla
project and verify all continues to work.Proof
Closes #1553