Summary:
1. Make "Remote JS Debug" and "Start/Stop Profile" options persist across app restarts.
2. Check and confirm:
- All options in the Android dev menu are persisted now.
- The behavior is the same on Android and iOS now.
Reviewed By: mkonicek
Differential Revision: D3340097
fbshipit-source-id: 4087b6605031c650e164282244cedb006f8f6fd3
Summary:
As for symbolicated stack trace in the red box in Android, make column number not shown if it's zero.
Format Before:
{F61180667}
Format After:
{F61180666}
Reviewed By: mkonicek
Differential Revision: D3358317
fbshipit-source-id: 87981e678e22ab9f483727002175c8835941ceee
Summary: The view update cycle in UIManager was relying on a bunch of boolean values boxes as NSNumbers in parallel arrays. This diff packs those values into a struct, which is more efficient and easier to maintain.
Reviewed By: javache
Differential Revision: D3253073
fbshipit-source-id: 3e1520c27b88bc1b44ddffcaae3218d7681b2cd2
Summary:
When the activity hosting a Modal goes away, we should dismiss the dialog from the stack and then reconstitute it when the activity comes back. This means that if an activity is paused because another activity is placed on top of it but our ui operation was delayed, it will not blow up finding no window since it is gone.
Also fixes a place where we should remove a listener for lifecycle events which we were not doing.
Reviewed By: halfjuice
Differential Revision: D3357286
fbshipit-source-id: c5c6dd8e5ef299762ed9aa15a6910ce9c0b111dc
Summary:
NavigationState is composed of many things such as `index`, `routes`.
The only way to effectively compare navigation states is to assume their immutability
and simply compare their references.
That said, `navigationState.key` does not really serves anything useful. The key does
not make a navigation state more unique or comparable.
This diff makes `navigationState.key` irrelevant thus we could make NavigationState
simpler.
Reviewed By: ericvicenti
Differential Revision: D3351915
fbshipit-source-id: 75d5fa432d2a693f999a91b11e3bff1fdd42e61d
Summary:
The API for `ActivityIndiatorIOS` and `ProgressBarAndroid` is very similar and can be merged in a cross platform component that displays a circular indeterminate loading indicator.
This deprecates `ActivityIndiatorIOS` and non-horizontal `ProgressBarAndroid` in favor of this new component.
**Test plan (required)**
Tested with the ActivityIndicator example in UIExplorer on android and ios. Also made sure that `ActivityIndicatorIOS` still works and displays a deprecation warning. Also tested that `ProgressBarAndroid` with `indeterminate == true` and `styleAttr != 'Horizontal'` displays a deprecation warning.
Closes https://github.com/facebook/react-native/pull/6897
Differential Revision: D3351607
Pulled By: dmmiller
fbshipit-source-id: b107ce99d966359003e8b3118cd97b90fa1d3d7d
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:
Fixing a bug detailed in Issue #7526 where Android app was crashing when using a binary number.
**Test plan:**
- Build & Run UIExplorer
- Build & Run UIExplorer with `const binaryNumber = 0b101010` inserted into UIExplorerApp.android.js
- Use `react-native init` to create a new blank project, then replace files in node_modules and insert `const binaryNumber = 0b101010` into index.android.js.
Closes https://github.com/facebook/react-native/pull/7730
Reviewed By: avaly
Differential Revision: D3353119
Pulled By: bestander
fbshipit-source-id: 098442da32a29c369f5932b7a4004e8d7f4cb91f
Summary:
- TestIdTestModule instrumentation tests is responsible for too many occasional crashes, e.g. https://circleci.com/gh/facebook/react-native/7054.
This should fix the problem (will monitor over next week)
- Made file naming more consistent
- 5 retries don't make e2e tests more stable, reduced back to 3 but I need to investigate how to make it more reliable
Closes https://github.com/facebook/react-native/pull/7784
Differential Revision: D3354444
fbshipit-source-id: d058362edbec09522a4828998e01988a82a74487
Summary:
Update mapWithSeparator so that Flow can reason about the arguments and return
type. For simplicity, it is expected that the type of the separator will be the
same as that of the mapped item.
Reviewed By: vjeux
Differential Revision: D3323557
fbshipit-source-id: 75b59e928d4e8c309b5933499a14744370ee5660
Summary:
Autocorrect was broken for controlled TextInput components by a change to batch event handling in React Native:
9f11f8c263
For example, a TextInput like this would be affected by this bug:
```javascript
<TextInput
autoCorrect={true}
style={{height: 26, width: 100}}
onChangeText={(text) => this.setState({ text })}
value={this.state.text}
/>
```
This fix uses the same approach as
0cd2904b23
The problem is that TextInput's _onChange handler relied on this.props.value being updated synchronously when calling this.props.onChangeText(text). However, this assumption was broken when React Native event handling started being batched.
The fix is to move the code that relies on this.props.value being up-to-date to componentDidUpdate.
**Test plan (required)**
Tested autocorrect now works on iOS in a small app and a large app. Also tested t
Closes https://github.com/facebook/react-native/pull/7676
Differential Revision: D3346221
Pulled By: nicklockwood
fbshipit-source-id: 715df3e8a03aa58cb0a462de4add02289d42782f
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:
(You can skip this if you're fixing a typo or adding an app to the Showcase.)
Explain the **motivation** for making this change. What existing problem does the pull request solve?
Prefer **small pull requests**. These are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.
**Test plan (required)**
Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.
Make sure tests pass on both Travis and Circle CI.
**Code formatting**
Look around. Match the style of the rest of the codebase. See also the simple [style guide](https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#style-guide).
For more info, see the ["Pull Requests" section of our "Contributing" guidelines](https://github.com/facebook/react-native/blob/mas
Closes https://github.com/facebook/react-native/pull/7770
Differential Revision: D3352007
fbshipit-source-id: eedb964d245445b61fed79245380f0803473c455
Summary:
Adding my application Readzi to the showcase.
Closes https://github.com/facebook/react-native/pull/7721
Differential Revision: D3349649
fbshipit-source-id: 8d21943e71163e545d7e1bb683e0733250290c01
Summary:
Skipping eveything in the contribution guide because adding an app to the Showcase
Closes https://github.com/facebook/react-native/pull/7627
Differential Revision: D3348782
fbshipit-source-id: 0994fd64be5ec132c70090b0852b00b6da0177ee
Summary:
This is for issue #7670. I consider this a typo, but maybe you don't.
In order to see the problem, you need to have the packager search for the configuration in a place that doesn't have one and the default configuration can't be provided. It's likely that no one is doing this and also why this probably wasn't seen.
Closes https://github.com/facebook/react-native/pull/7671
Differential Revision: D3350412
fbshipit-source-id: 5f9b520f7d5cbc749e2b898e7bbf2cd84d81ace0
Summary:
Based on https://github.com/facebook/react-native/pull/7470, fixing the case when an existing Android app uses React Native as well as 3rd-party React Native modules.
With this PR Gradle should always pick up React Native binaries from node_modules rather than fetching old binaries from JCenter.
Closes https://github.com/facebook/react-native/pull/7759
Differential Revision: D3348640
fbshipit-source-id: 7509eb54bba6e59cf7f4a116bf444fc4983d2d33
Summary:
- Address the issues reported at 7db7f78dc7 (commitcomment-17575647)
- Fix the logic that reduces the scenes.
- Fix the logic that computes the active scene for `renderOverlay`.
Reviewed By: ericvicenti
Differential Revision: D3344716
fbshipit-source-id: 3fce517ff1de212f412a77936012695bd2dcfc3c
Summary: The decoded image cache was previously static, meaning that cached images could persist beyond the lifetime of the module. This resulted in some flakiness in the RCTImageLoaderTests due to the loader returning cached image instanced from previous tests instead of the correct instance.
Reviewed By: bestander
Differential Revision: D3346329
fbshipit-source-id: 375af8894cef1c5b6303c6cdfd7eb57ebcfe3251
Summary:
This allows React Native apps to instrument their own code via Systrace.measureMethod() and the like.
**Test Plan:** Used require('react-native').Systrace in my own app successfully to instrument my own code.
Closes https://github.com/facebook/react-native/pull/7734
Differential Revision: D3346222
Pulled By: javache
fbshipit-source-id: 08ffc781a1187db89c6e9a0714d644dbc485724c
Summary: Updated networking and geolocation to use the new events system.
Reviewed By: bestander
Differential Revision: D3346129
fbshipit-source-id: 957716e54d7af8c4a6783f684098e92e92f19654
Summary:
Currently XHR also supports Android platform, so document should include this information.
Closes https://github.com/facebook/react-native/pull/7729
Differential Revision: D3345168
fbshipit-source-id: 8dee7d573a47aede5dc5be97640fc711747df65c
Summary: Updated networking and geolocation to use the new events system.
Reviewed By: javache
Differential Revision: D3339945
fbshipit-source-id: 01d307cf8a0aea3a404c87c6205132c42290abb1
Summary: When we're profiling, we want to load Systrace immediately and profile all the startup and initial render code. The code here used to load Systrace during startup only if `__DEV__` but would always start profiling once Systrace was otherwise required. That seems pretty hard to reason about, so I'm switching to always requiring Systrace during the startup path and enabling profiling if appropriate. In actual production that'll always be false, of course.
Reviewed By: javache
Differential Revision: D3338216
fbshipit-source-id: f173e82f34e110d83e7ff04f11af9b302a54b859
Summary:
When packager is running, visiting localhost:8081 produces ugly 404 "GET / not found"
This diff adds a simple index.html page that has a title and link to documentation.
It's a super tiny detail, but I hope it makes things a little nicer. Improvements are welcome.
Maybe we could include an offline copy of React Native's docs website?
Reviewed By: vjeux
Differential Revision: D3341242
fbshipit-source-id: c8cd4b647e69eb520ea8bc978bea070551225912