Summary:
The current docs (iOS) for promises make use of the `RCT_REMAP_METHOD` macro but it's not clear about the proper usage for the macro. Specifically, it points to a selector of `resolver:rejector:` and makes it seem like `findEvents` is assumed as both the alias and method name.
This has led to some confusion (#9070) on how to use `RCT_REMAP_METHOD`.
No tests needed since this is just a small docs update.
Closes https://github.com/facebook/react-native/pull/13302
Differential Revision: D4831755
Pulled By: javache
fbshipit-source-id: e842c16ade27088eafdac7509373cdf7780f9ece
Summary:
I noticed I didn't get type defs anymore for react-native. Looks like it is broken since we removed the .flow file in 3e153b2a5b. To fix it we can now enable flow in react-native-implementation since it now supports properties.
**Test plan**
Tested that I get type hints when using imports from react-native in a project.
Closes https://github.com/facebook/react-native/pull/12917
Differential Revision: D4704753
Pulled By: ericvicenti
fbshipit-source-id: cf882588d7f371931de8d7861a1a6d50f6c425dc
Summary:
Use `getChildDrawingOrder` instead of reordering views. The old implementation didn't work properly when `removeClippedSubviews` was enabled and this one should have better performance since we don't play with the view hierarchy at all.
This fixes weird bugs with sticky headers in `SectionList` and allows removing the hack that disabled `removeClippedSubviews` when using sticky section headers.
**Test plan**
Tested using the SectionList and ListViewPaging examples that use sticky headers which uses z-index.
Closes https://github.com/facebook/react-native/pull/13105
Reviewed By: sahrens
Differential Revision: D4765869
Pulled By: achen1
fbshipit-source-id: be3c824658a3ce965b6e7324ad95c77cbd8a86ae
Summary:
[We changed the name from Sketch to Snack](https://blog.expo.io/expo-sketch-expo-snack-a444f8dec72b)
It's just some text in the issue template :)
- Make it clear on the Snack website which version of react-native you are using. Right now we make it possible to pick SDK versions but it's not at all obvious which react-native version that maps to.
Closes https://github.com/facebook/react-native/pull/13304
Differential Revision: D4833399
Pulled By: ericvicenti
fbshipit-source-id: 25b1fe8b4b1ac7db6737e1ba8f611ad4d8dc3804
Summary:
Motivation
Currently react-native run-android instals and starts your app, but if you have more than one variant, it doesn't know which one to start. This allows developers to pass in the suffix specified in build.gradle, so that the correct app is started.
Test Plan
verify that `react-native run-android` runs properly
verify that `react-native run-android --appIdSuffix validSuffix` runs properly
Closes https://github.com/facebook/react-native/pull/13169
Differential Revision: D4823391
Pulled By: ericvicenti
fbshipit-source-id: 31ed35fd79403804b4781e81eb49f1c4627d7f8e
Summary:
This fixes the website build because docgen was unable to parse this `*`
Closes https://github.com/facebook/react-native/pull/13300
Differential Revision: D4828837
Pulled By: ericvicenti
fbshipit-source-id: 7ebc04241742f7bb5a871e7e438fb23af90a70bd
Summary: View tags are currently used for end-to-end test IDs. We'd like to overload the tag field with other information such as nativeID (for native refs) and transitionID (for shared element transitions) in the future. Added a key for testID's tag
Reviewed By: AaaChiuuu
Differential Revision: D4770368
fbshipit-source-id: b76c53a20520aac1b25d435b6d5eb809e8833675
Summary:
Adds UberEATS technical blog post, https://eng.uber.com/ubereats-react-native/, to the showcase.
This is not an ideal entry, as the app in question, the UberEATS Restaurant Dashboard, is not widely available in the app stores for people to download and try out. I still think it's worth adding this to the showcase as a good example of a large, known company leveraging React Native to build a new experience.
Test Plan
=======
Built website and verified everything rendered correctly in the Showcase.
Closes https://github.com/facebook/react-native/pull/13274
Differential Revision: D4823507
Pulled By: ericvicenti
fbshipit-source-id: 7929124dfc17254d1bc5970a20ba393a54e34409
Summary:
**Motivation** Fix the Apple TV build, which is broken after a recent commit.
**Test plan** Travis tvOS test script should succeed.
Closes https://github.com/facebook/react-native/pull/13284
Differential Revision: D4827053
Pulled By: ericvicenti
fbshipit-source-id: 380e8f1b32adfeea844bedc11326e5a6a755066a
Summary:
One of my changeset broke the "ModuleGraph" code without warning earlier because we are using `any`, that equivalent to having no typing at all. This changeset fixes the types so that `ResolutionRequest` is exactly what it actually is: a class usable for any `Module`-looking class, including the normal one, and the "ModuleGraph" one used for Buck builds. That way, the ModuleGraph's `Module` is typechecked against `Moduleish`.
Concretely this change mostly migrates the `Module` to its generic parameter counterpart `TModule` inside `ResolutionRequest`.
Reviewed By: kentaromiura
Differential Revision: D4826256
fbshipit-source-id: fcd7ca08ac6c35e4e9ca983e2aab260e352bcb4e
Summary:
Basic functionality that takes `itemIndex` and `sectionIndex`
**TestPlan**
Added this to onChangeText:
this._listRef.getNode().scrollToLocation({itemIndex: 6, sectionIndex: 3, viewOffset: 25});
and saw it scroll to the correct position right under the sticky header.
Reviewed By: bvaughn
Differential Revision: D4821714
fbshipit-source-id: 261e373f9c4af384db5a363df5b0fd9274b1bdfe
Summary:
so users can call `setNativeProps` and do more compositing.
**Test Plan:**
Added this to `onPress` of `SectionListExample` and `FlatListExample`:
this._listRef.getNode().getScrollResponder().setNativeProps({scrollEnabled: false});
and saw scroll get disabled. Note the call to `getNode` because we are using the `Animated.createComponent` wrapper.
Reviewed By: achen1, bvaughn
Differential Revision: D4821711
fbshipit-source-id: 8d1f3dd7ccc646524f154721c5c7036620d57132
Summary:
Should key separators with their cells.
**Test Plan**
before/after in this video: https://youtu.be/vid1w5x8-58
Reviewed By: achen1
Differential Revision: D4821708
fbshipit-source-id: 261f1bac34dfa9001297a24a44f11128f338e62b
Summary:
Pair `reactWillMakeFirstResponder` and `reactDidMakeFirstResponder` was replaced with just `reactFocus` method
which is supposed to incapsulate all "focus" and "focus-later-if-needed" functionality.
Reviewed By: mmmulani
Differential Revision: D4664626
fbshipit-source-id: 8d3b7935ca26d32ba1d1826a585cce0396fcc885
Summary:
This PR fixes a CI issue that came up on #11304 after merging master into the pr branch.
That created a merge commit with over 1000 changed files. That might have created irrelevant comments, but the github commit api is limited to 300 files, with only the first 294 having the expected diffs included.
I can't think of any reasonable scenario where a merge would have changes that aren't either on master or another commit in the PR, so I've updated it to treat merge commits as having no changes.
Closes https://github.com/facebook/react-native/pull/13260
Differential Revision: D4819805
Pulled By: ericvicenti
fbshipit-source-id: 7b6b51b18bb36503a719a3ba5c9163cd6ef00e17
Summary: Adapts mocked / duplicated functionality from `node-haste` to match the new synchronous return types in the original.
Reviewed By: jeanlauliac
Differential Revision: D4819137
fbshipit-source-id: 183316adc3fae161ad9999bf72bccb8218ef8941
Summary:
See facebook/yoga#453. Optimizes the node log print by generating some enum text via ```enum.py``` and moving printing to new functions to reduce boilerplate code.
Changes the log output to format the nodes in html to be able to copy paste it into browsers for quick debugging.
Hides all default values.
Closes https://github.com/facebook/yoga/pull/479
Reviewed By: gkassabli
Differential Revision: D4802184
Pulled By: emilsjolander
fbshipit-source-id: 143bd63cbc31fb0755d711062cb4e6a448049ba3
Summary:
Follow up to #13248 for iOS.
This pull request allows changing the default path to `cli` when running from Xcode environment. That is especially useful when debugging from a different location or... running `Haul`.
Set `export CLI_PATH=./node_modules/react-native/local-cli/cli.js` and run. Should use new path provided.
Closes https://github.com/facebook/react-native/pull/13264
Differential Revision: D4819059
Pulled By: ericvicenti
fbshipit-source-id: 4a6241823c0bc8f1fa16869bc872bdbe04df510f
Summary:
See facebook/yoga#483. We should not transfer the layout if the layout didn't change. (using ```hasNewLayout```). This also changes that the lock on the java node is only aquired if needed, and it holds the lock only for the time the values are set and not for the time all it's children are set.
Closes https://github.com/facebook/yoga/pull/484
Reviewed By: astreet
Differential Revision: D4802966
Pulled By: emilsjolander
fbshipit-source-id: e8a8f2280ad6b25b98fc68b07eac68e0ec80fe3e
Summary:
…th RCTSharedApplication()
Thanks for submitting a PR! Please read these instructions carefully:
- [ ] Explain the **motivation** for making this change.
Using React Native latest version with Cocoapods 1.2.0 causes the following error inside iOS app extensions
> /react-native/React/Modules/RCTAccessibilityManager.m:67:70: ‘sharedApplication’ is unavailable: not available on iOS (App Extension) — Use view controller based solutions where appropriate instead.
Moving the use of [UIApplication sharedApplication] to RCTSharedApplication() which is safe on app extension
- [ ] Provide a **test plan** demonstrating that the code is solid.
I am not sure how to test such that all the features which touch the modified code are tested.
- [ ] Match the **code formatting** of the rest of the codebase.
- [ ] Target the `master` branch, NOT a "stable" branch.
What existing problem does the pull request solve?
Using React Native latest v
Closes https://github.com/facebook/react-native/pull/13227
Differential Revision: D4816338
Pulled By: javache
fbshipit-source-id: e3e3c77882990ad1817b0b633521cff52571ecd0
Summary:
Motivation: When logging to RCTRedBox, if any of the stack frames lacks a line number or a column, the application will crash with `[NSNull integerValue]: unrecognized selector sent to instance`.
Closes https://github.com/facebook/react-native/pull/13242
Differential Revision: D4812185
Pulled By: hramos
fbshipit-source-id: 4b1c3c38f67cf59034a383c95d4280d1b6380300