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
Summary:
**Motivation**
Remove duplicated lines in objc-test-ios.sh and objc-test-tvos.sh
**Test plan**
Travis CI should continue to work as before.
Closes https://github.com/facebook/react-native/pull/13173
Differential Revision: D4812177
Pulled By: hramos
fbshipit-source-id: 40afe0beab896d741f607f4841df7e9b42f4c17d
Summary:
Hi, the docs make it seem like `geo:${latitude},${longitude}` is the cross-platform way to link locations on Google/Apple Maps. This is Android-only though.
I did no changes to code.
I noticed that the Appetize.io embed tries to run the [Linking example](https://facebook.github.io/react-native/docs/linking.html) code on iOS, although the example uses Android location scheme. This results in errors. I'd like to fix this as well, but I have no idea how to tell the demo to run on Android.
Closes https://github.com/facebook/react-native/pull/13220
Differential Revision: D4804123
Pulled By: hramos
fbshipit-source-id: 2de85d56476933ec54ea423d76a0fe98ed5132d3
Summary:
Android instrumentation tests keep failing due to `java.lang.RuntimeException: java.lang.RuntimeException: Timed out waiting for JS thread`.
An [earlier job](https://circleci.com/gh/facebook/react-native/17064) based off commit [c31a65](c31a65669e) finished successfully, yet [this job](https://circleci.com/gh/facebook/react-native/17070), triggered by the very [next commit](e82c2fbbe5), failed Android instrumentation tests even though that commit touches no Android code.
You can see from the [Circle history](https://circleci.com/gh/facebook/react-native/tree/master) that this test has been consistently failing for the same time out reason.
I am disabling Android instrumentation tests as they are not providing any useful signal a this point in time.
Debug and fix instrumentation tests, and re-enable them.
Closes https://github.com/facebook/react-native/pull/13239
Differential Revision: D4810775
Pulled By: hramos
fbshipit-source-id: 8866f9208ec3b5ac5f0ed2f6c2cf58c5b5825830
Summary:
Remove redundant `\`` mark
Thanks for submitting a PR! Please read these instructions carefully:
- [x] Explain the **motivation** for making this change.
- [x] Provide a **test plan** demonstrating that the code is solid.
- [x] Match the **code formatting** of the rest of the codebase.
- [x] Target the `master` branch, NOT a "stable" branch.
This PR fixes Documentation typo.
No need for test.
Closes https://github.com/facebook/react-native/pull/13228
Differential Revision: D4810457
Pulled By: hramos
fbshipit-source-id: 5c475a5d8b51d4a926e0fc737e2a12805e3bf70b
Summary:
This PR depends on #13172
Packager events are mostly logged through the TerminalReporter by default (#13172 makes this configurable). But there are a few things that aren't passed through TerminalReporter.
- We [log a banner with some information about the port and what's going on](8c7b32d5f1/local-cli/server/server.js (L22-L32))
- Also [a message about looking for JS files](8c7b32d5f1/local-cli/server/server.js (L34-L38)) (not sure what that is for / if it is useful beyond telling the user what directory root they started the packager in, but that's another thing).
- If the packager fails to start, then [we log an error message](8c7b32d5f1/local-cli/server/server.js (L41-L61)).
This pull request changes those log messages to be handled by TerminalReporter. I tri
Closes https://github.com/facebook/react-native/pull/13209
Differential Revision: D4809759
Pulled By: davidaurelio
fbshipit-source-id: 2c427ec0c1accaf54bf6b2d1da882cd6bfaa7829
Summary:
In Expo tools such as XDE, exp we listen listen to stdout from the packager process and print it in our own buffer. In the case of XDE, an electron app, our log pane is DOM-based, and before printing each log chunk we need to remove special tty characters and sometimes parse it to get information that we need (eg: progress bar). By using a custom reporter, we can take the raw events and pass them along in a format that is easy to consume by XDE and exp. This same motivation applies to create-react-native-app, where we currently don't show a progress bar in the terminal, but we can with this change.
Create `LogReporter.js` in the root of a project with the CLI changes included in this PR.
```
class LogReporter {
update(event) {
console.log(JSON.stringify(event));
}
}
module.exports = LogReporter;
```
Now, run `react-native start --customLogReporterPath=LogReporter.js` -- all of the raw events will be output as JSON (while the logs
Closes https://github.com/facebook/react-native/pull/13172
Differential Revision: D4795760
Pulled By: hramos
fbshipit-source-id: 80164b2f30e33a3f9965f4865a8404f8640a52c1
Summary:
This should resolve the following npm deprecation warning:
```
WARN deprecated node-uuid@1.4.7: Use uuid module instead
```
Existing tests should cover this already.
Closes https://github.com/facebook/react-native/pull/13194
Differential Revision: D4796723
Pulled By: javache
fbshipit-source-id: 2783f5d04c696b887de2ab2d32805e4661484a83
Summary:
> Explain the **motivation** for making this change. What existing problem does the pull request solve?
Of the three dependencies I have that rely on `glob`, react-native is the only one not on 7.x. If react-native can upgrade, then npm can deduplicate the glob dependency.
```console
$ npm ls glob
├─┬ eslint@3.13.1
│ └── glob@7.1.1
├─┬ jest@18.1.0
│ └─┬ jest-cli@18.1.0
│ └─┬ istanbul-api@1.1.0
│ ├─┬ fileset@2.0.3
│ │ └── glob@7.1.1
│ ├─┬ istanbul-lib-report@1.0.0-alpha.3
│ │ └─┬ rimraf@2.5.4
│ │ └── glob@7.1.1
│ └─┬ istanbul-lib-source-maps@1.1.0
│ └─┬ rimraf@2.5.4
│ └── glob@7.1.1
└─┬ react-native@0.39.2
├── glob@5.0.15
└─┬ rimraf@2.5.4
└── glob@7.1.1
```
**Test plan (required)**
> Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull req
Closes https://github.com/facebook/react-native/pull/11893
Differential Revision: D4796721
Pulled By: javache
fbshipit-source-id: 6e7424dd731329f982c2f6c05b40dec8febf2e57
Summary:
Thanks for submitting a PR! Please read these instructions carefully:
- [ ] Explain the **motivation** for making this change.
- [ ] Provide a **test plan** demonstrating that the code is solid.
- [ ] Match the **code formatting** of the rest of the codebase.
- [ ] Target the `master` branch, NOT a "stable" branch.
At the moment, if you uncomment the react specific code in `build.gradle` you'll get a compilation error. Adding a comma prevents this error.
No tests are necessary. This is a simple fix.
Sign the [CLA][2], if you haven't already.
Small pull requests are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.
Make sure all **tests pass** on both [Travis][3] and [Circle CI][4]. PRs that break tests are unlikely to be merged.
For more info, see the ["Pull Requests"][5] section of our "Contributing" guidelines.
[1]: https://medium.com/martink
Closes https://github.com/facebook/react-native/pull/13212
Differential Revision: D4802065
Pulled By: javache
fbshipit-source-id: 0ddfe16241381d7e4ac0e48be1bada21d9df2068