Summary:
This allows the `NavigationCard` style to be extended, the default `backgroundColor` style of the `NavigationCard` is not applicable to all apps.
Fixes issue #8116. PR #8115 was already made for this but didn't pass CI checks.
**Test plan**
When rendering a NavigationCardStack, add
```
const { CardStack } = NavigationExperimental;
...
<CardStack cardStyle={{ backgroundColor: 'purple' }} />
```
to see that the `NavigationCard` background has changed to purple.
Closes https://github.com/facebook/react-native/pull/8471
Differential Revision: D3508849
Pulled By: javache
fbshipit-source-id: 65703cccf3d01def9f2060256f0ff564bbdc47d3
Summary:
Currently, DevTools only work under ios (although this is undocumented!),
because the JavaScriptEngine initialization process skips setupDevTools() on
android.
DevTools work fine with Android, as tested on 0.26, 0.27, and 0.28 using
Nuclide's inspector.
For reference, the relevant issue on react-devtools.
Closes https://github.com/facebook/react-native/pull/8095
Reviewed By: bestander
Differential Revision: D3492788
Pulled By: andreicoman11
fbshipit-source-id: 1eda9196d7125da19a8d7baaab22b61b744ca629
Summary:
Found a couple of places where we were copy-pasting the logic `ResourceDrawableIdHelper` had. This class was only available on the image module and it had package visibility. I moved it to its own module so that we can easily use it from others.
This diff is pretty simillar to 54ed44628d but it fixes a bug due to which we had to revert it.
Reviewed By: andreicoman11
Differential Revision: D3499062
fbshipit-source-id: f912f57e5ac21a9f30fe42067c784f49fa46ed48
Summary:
**Motivation**
The prop validation was run on every render, even in prod which seems odd to me. This adds a dev check to make sure prod build skips the validation.
**Test plan (required)**
There are no changes to the ui.
Closes https://github.com/facebook/react-native/pull/8499
Differential Revision: D3508805
Pulled By: javache
fbshipit-source-id: 68c6a1224e33997f9df93481426daff790ef5bcd
Summary:
ReactTextView occasionally crashes when `setText` is called. Doing some cursory research, it looks like this could be a bug in Android. We also suspect it might be related to removeClippedSubviews though.
The LayoutParams don't actually matter because RN controls layout, but on occasion (haven't narrowed down what this is...) `mLayout` is non-null and triggers relayout during `setText`, which fails because the LayoutParams are null. jesseruder came up with this fix and it appears to be working well.
Stack trace: http://pastebin.com/P8VbxvPz
Closes https://github.com/facebook/react-native/pull/7011
Differential Revision: D3508097
fbshipit-source-id: 12b4aa11e42112c8ba19a1af325e3ee9a232d08f
Summary:
Its a minor Bug fix for rendering Title in NavigationHeader
Closes https://github.com/facebook/react-native/pull/8437
Differential Revision: D3507319
Pulled By: ericvicenti
fbshipit-source-id: ff4aa36be3c4991be11aabecbaad952c015a60e2
Summary:
(I swear this was working before...)
Right now, when passing an empty map to `toBundle` it returns null:
- It feels counter-intuitive to have the data modified without any good reason;
- It is different from what iOS does
This PR fixes this behavior by returning an empty `Bundle` instead of `null`.
It is a breaking change though, and I'm not sure where it goes with the new bridge.
Closes https://github.com/facebook/react-native/pull/7847
Differential Revision: D3504024
fbshipit-source-id: 97ca19259fdf3219e8237e44a313645503a695fd
Summary:
Add "Copy" and "Dismiss" button when the RN Android redbox is shown, consistent with that in RN iOS.
- "Copy" button copies all the messages shown in the redbox to the host system clipboard, the solution is posting redbox messages to packager and the the packager copies the messages onto the host clipboard.
- "Dismiss" button always exits the redbox dialog.
- Add shortcut as "Dismiss (ESC)" and "Reload (R, R).
Notice: Copy button is only supported on Mac OS by now (warning in packager on other platforms), because it's not easy for us to test on Windows or Linux. Will put the codes for other platforms on Github issues, hoping anyone could help test and add this feature, then send us a pull request.
Redbox Dialog in RN Android before:
{F61310489}
Redbox Dialog in RN Android now:
{F61659189}
Follow-up:
- We can adjust the button styles in redboxes.
- We can consider to add shortcut for "Copy" button.
Reviewed By: foghina
Differential Revision: D3392155
fbshipit-source-id: fc5dc2186718cac8706fb3c17d336160e61e3f4e
Summary: Make the behavior on a WebView allow pinch to zoom. This matches what iOS has by default. We may want to at some point put this behind a property but right now just make it work on Android.
Reviewed By: andreicoman11
Differential Revision: D3503429
fbshipit-source-id: adb2bb2c3de099aca08700786be7a132557a5e2a
Summary:
Currently the algorithm for calculating frames will not always have an correct value for the endframe making some natively driven animations stuck almost at the end. This PR ensures the animation ends at `1`.
**Test plan**
Tested with the code in `NativeAnimationsExample.js`.
Closes https://github.com/facebook/react-native/pull/8489
Differential Revision: D3502973
fbshipit-source-id: b9b114d3982341571ac6ff315620d3d2292d9266
Summary:
* Next version of Jest doesn't allow non test files in __tests__ folders.
* I'm trying to switch all tests off of jsdom on react-native. This should save 500ms of time when running a single test because jsdom is slow to load and react-native is also not supposed to run in a DOM environment, so let's not pretend we are providing the DOM in tests.
* Make the bridge config configurable so that when we disable automocking and we reset the registry we can redefine the value.
Oh also, stop using lodash in Server.js. First off, lodash 3 doesn't work in Jest's node env because it does some crazy stuff, second because we don't need to load all of lodash for debounce.
Reviewed By: davidaurelio
Differential Revision: D3502886
fbshipit-source-id: 1da1cfba9ed12264d81945b702e7a429d5f84424
Summary:
**Motivation**
This PR adds a subspec for the `NativeAnimation` iOS library which so one can use it with CocoaPods.
**Test plan (required)**
Tested with the code in `NativeAnimationsExample.js` and this:
```
pod 'React', :subspecs => ['Core', 'RCTAnimation'], :path => 'node_modules/react-native'
```
Closes https://github.com/facebook/react-native/pull/8487
Differential Revision: D3502970
fbshipit-source-id: 0958acdbe088da8b50a1e5e3661f27b64db329c1
Summary:
This follows up the PR https://github.com/facebook/react-native/pull/8306
= Changes
1. Provides the TransitionProps (current and previous) to the function
`configureTransition`.
2. Adds a new member `timing` to `NavigationTransitionSpec`.
= Why
1. Helps people to customize the animation between transitions
2. Helps people to migrate from the deprecated `applyAnimation` prop.
Reviewed By: ericvicenti
Differential Revision: D3470802
fbshipit-source-id: be49becccd53aed7bc57093da1c7dae20153febd
Summary:
Add an example for Pager built with NavigationTransitioner & Animated.View
This example demostrates how to apply pre-defined gesture handling and
animation styles to the <Animated.View /> to build a Pager navigator.
Reviewed By: ericvicenti
Differential Revision: D3495807
fbshipit-source-id: 08e275010888925bc9fd1840e7052f975c95ad63
Summary: In older versions of android, the main thread is given the same priority as all other threads (default). Instead, it should have a higher priority (DISPLAY) which will make sure it's scheduled instead of the background JS/native modules threads.
Reviewed By: majak
Differential Revision: D3497244
fbshipit-source-id: 15ab09f4ebcad2692ae1261f15aa2c6c39f72ee9
Summary:
Arrow functions do not have their own arguments. Fix EventEmitter#once to pass the correct arguments to the listener callback.
Closes https://github.com/facebook/react-native/pull/8479
Differential Revision: D3495086
Pulled By: javache
fbshipit-source-id: 4492d13bfb2cc255afdc41d39fbf2f35da6b7094
Summary: Add support inlining images into text inputs. For now this is only available on Android.
Reviewed By: andreicoman11
Differential Revision: D3470805
fbshipit-source-id: 14db05ec4d5af549bf314b903654314f39bf73ea
Summary: Found a couple of places where we were copy-pasting the logic `ResourceDrawableIdHelper` had. This class was only available on the image module and it had package visibility. I moved it to its own module so that we can easily use it from others.
Reviewed By: andreicoman11
Differential Revision: D3463697
fbshipit-source-id: 708058c5f2445e27b151d8a6f3b47fd23485bc88
Summary:
JS codes sometimes report exceptions with `null` details about stack traces, resulting in native `NullPointerException` crashes when parsing the stack traces.
Added null checking for the stack traces in `ExceptionsManager.js`, ensuring that we never call `updateExceptionMessage` with a null stack
Reviewed By: foghina
Differential Revision: D3455783
fbshipit-source-id: 027969afd8a5d6015e97fce0a26626730cfc83a4
Summary:
This updates the documentation for the `Text` component itself and the embedded `Text.md` that goes with it.
- React Native Web Player
- Document all props
- NOTE: I actually added a new prop to `Text` called `accessible` since it was set by default and thus shown in the Props list
in the original documentation (but with an empty description).
- Stylistic fixes
Closes https://github.com/facebook/react-native/pull/8445
Differential Revision: D3493112
Pulled By: JoelMarcey
fbshipit-source-id: b428d4eb09065db5c6cb1ae5524ad22084fd2a82