-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
Expose additional private modules #3308
Conversation
@facebook-github-bot shipit |
Thanks for importing. If you are an FB employee go to https://our.intern.facebook.com/intern/opensource/github/pull_request/182740555392881/int_phab to review. |
@@ -225,6 +225,7 @@ var apis = [ | |||
'../Libraries/Storage/AsyncStorage.ios.js', | |||
'../Libraries/Utilities/BackAndroid.android.js', | |||
'../Libraries/CameraRoll/CameraRoll.js', | |||
'../Libraries/Utilities/Dimensions.js', |
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.
mind doing a different pull request for this file, it only lives in open source
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.
Sure thing
@vjeux - amended this PR to exclude the website change |
@facebook-github-bot shipit |
Thanks for importing. If you are an FB employee go to https://our.intern.facebook.com/intern/opensource/github/pull_request/182740555392881/int_phab to review. |
There's a flow error 1 Flow error detected in root "Libraries/FBReactKit/js"!
=====Flow error #0====
Libraries/FBReactKit/js/react-native-github/Libraries/StyleSheet/StyleSheet.js line 74 col 1-18: assignment of property `flatten`
Libraries/FBReactKit/js/react-native-github/Libraries/StyleSheet/StyleSheet.js line 74 col 12-18: property `flatten`
Libraries/FBReactKit/js/react-native-github/Libraries/StyleSheet/StyleSheet.js line 62 col 7-16: statics of StyleSheet |
@vjeux - fixed, although I'm not entirely sure what the type definition should look like here on |
@@ -59,6 +60,8 @@ var StyleSheetValidation = require('StyleSheetValidation'); | |||
* subsequent uses are going to refer an id (not implemented yet). | |||
*/ | |||
class StyleSheet { | |||
static flatten:Function; |
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.
space after colon likethe other type decls? also if you wanted to take this further you could maybe write: static flatten: typeof flattenStyle
http://flowtype.org/docs/typeof.html
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.
Yup, space after : please
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.
ah that's fantastic thanks @ide :)
Have you tested art from npm, does it work? |
@vjeux - it should work -- before adding art to dependencies we could not require ReactNativeART in |
I could go either way. I lean towards keeping it separate because art is a separate npm package. |
@ide - in this diff I've included art as a dependency for React Native because otherwise we can't add ReactNativeART to the public interface (it can't be required) |
ok. We need the packager to perform better static analysis of imports and cull dead code. |
@facebook-github-bot shipit |
Thanks for importing. If you are an FB employee go to https://our.intern.facebook.com/intern/opensource/github/pull_request/182740555392881/int_phab to review. |
@brentvatne Could you rebase this change? Right now it won't merge cleanly. |
@brentvatne updated the pull request. |
@javache - rebased on top of master, should be good to go |
@facebook-github-bot shipit |
Thanks for importing. If you are an FB employee go to https://our.intern.facebook.com/intern/opensource/github/pull_request/182740555392881/int_phab to review. |
@@ -69,4 +72,7 @@ class StyleSheet { | |||
} | |||
} | |||
|
|||
/* TODO(brentvatne) docs are needed for this */ | |||
StyleSheet.flatten = flattenStyle; |
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.
I would like to move this logic to React and decouple this from styles. The refactoring I've done has decoupled this logic from the style
prop.
This is similar to the React.Children.toArray
helper so something like that on React
might make sense.
It doesn't really hurt to have it here too for now but I don't think it ultimately belongs here.
@brentvatne updated the pull request. |
Summary: - TextInputState as TextInput.State - Touchable - flattenStyle as StyleSheet.flatten - ReactNativeART as ART Original discussion in facebook#1821 Closes facebook#3308 Reviewed By: sebmarkbage Differential Revision: D2527152 Pulled By: javache fb-gh-sync-id: 19d4ef9d4c0e6587b9f0793e1ca624aebb034f3b
Summary: - TextInputState as TextInput.State - Touchable - flattenStyle as StyleSheet.flatten - ReactNativeART as ART Original discussion in facebook#1821 Closes facebook#3308 Reviewed By: sebmarkbage Differential Revision: D2527152 Pulled By: javache fb-gh-sync-id: 19d4ef9d4c0e6587b9f0793e1ca624aebb034f3b
Original discussion in #1821