Граф коммитов

8226 Коммитов

Автор SHA1 Сообщение Дата
Lord Daniel Zautner 95b1fc42b7 Emit `willfocus` from immediatelyResetRouteStack
Summary:
The Navigator component inconsistently emits the `willfocus` event.

While it is emitted in `Navigator#resetTo`, `Navigator#push`, `Navigator#pop` and event `Navigator#replaceAtIndex` it is not emitted from `Navigator#immediatelyResetRouteStack`. This leads to surprising inconsistencies when working with these events.

With the PR I suggest to emit the `willfocus` event before resetting the route stack.
Closes https://github.com/facebook/react-native/pull/10125

Differential Revision: D3931284

fbshipit-source-id: 6e4f45c6d38426bcd0acc8f8c39478524032a03a
2016-09-27 11:43:32 -07:00
Emil Sjolander b32a857d60 Fix bug introduced by D3886866
Reviewed By: lucasr

Differential Revision: D3923635

fbshipit-source-id: bfeb175bb40393be63cafb6a995b22701b87ffec
2016-09-27 10:14:35 -07:00
Aaron Chiu d22a85211e remove CompositeLazyReactPackage in favor of ReactInstanceManager.Builder's existing ReactPackage list
Reviewed By: andreicoman11

Differential Revision: D3928330

fbshipit-source-id: aee8a7c31d80f5500744029676b9f2b8c87aa98a
2016-09-27 09:58:30 -07:00
Aaron Chiu 1f27dd6643 log into QPL time to create module for lazy native modules
Reviewed By: andreicoman11

Differential Revision: D3928797

fbshipit-source-id: d1c6c024c4994b237155f16e6a915b16f216d56d
2016-09-27 09:43:30 -07:00
Dan Caspi dfcfb90baa Fix [JSValue ...] & [JSContext ...] access with custom JSC
Reviewed By: bnham

Differential Revision: D3859956

fbshipit-source-id: 966aba9a267371eb553b8be574fa247b21930d1c
2016-09-27 09:43:30 -07:00
Konstantin Raev 449c195941 Temporarily disabled CatalystUIManagerTestCase.testFlexWithTextViews test
Summary:
After D3876927 this test started failing on CI.
Locally we can't reproduce it, and it will take some time to understand what this test is intended for so that we could remove the variable part.
More investigation will follow, t13583009

Reviewed By: emilsjolander

Differential Revision: D3930334

fbshipit-source-id: 279f67eb5a77b5d4250afd48c8b94c828da6925c
2016-09-27 07:13:30 -07:00
Douglas Lowder d368ebfab2 Apple TV support 1: existing Objective C code should compile for tvOS
Summary:
First commit for Apple TV support: changes to existing Objective-C code so that it will compile correctly for tvOS.
Closes https://github.com/facebook/react-native/pull/9649

Differential Revision: D3916021

Pulled By: javache

fbshipit-source-id: 34acc9daf3efff835ffe38c43ba5d4098a02c830
2016-09-27 06:28:33 -07:00
Pieter De Baets 339531065f Fix some linter warnings
Reviewed By: majak

Differential Revision: D3930059

fbshipit-source-id: dbbf67f287c46535f9c5947cd7ac101c5c91615e
2016-09-27 06:13:31 -07:00
Andrei Coman 30989dd24a Fix ReactSwipeRefreshLayout
Summary:
`ReactSwipeRefreshLayout` extends `SwipeRefreshLayout` which does not play nice with Android's touch handling system.
There are two problems:
1. `SwipeRefreshLayout` overrides and swallows `requestDisallowInterceptTouchEvent`, which means that Views underneath the `SwipeRefreshLayout` will not interact correctly with parent Views of
`SwipeRefreshLayout`. We've seen this in practice by H-ScrollViews having their touches intercepted by an enclosing ViewPager. This is fixed by passing `requestDisallowInterceptTouchEvent` up to the parents of `SwipeRefreshLayout`.
2. `SwipeRefreshLayout` overrides `onInterceptTouchEvent` and never calls `super.onInterceptTouchEvent`, therefore ignoring the value of `disallowIntercept`. That means that it will intercept some touches when it
shouldn't. One such case is again the H-ScrollView, which should receive all horizontal scrolls and stop `SwipeRefreshLayout` from intercepting any touch events after scrolling. Currently, after the H-ScrollView starts scrolling, it is still possible to get the `SwipeRefreshLayout` to detect and emit refresh events. This is fixed by checking and blocking on horizontal scrolls.

Reviewed By: foghina

Differential Revision: D3929893

fbshipit-source-id: e6f8050fb554e53318a7ca564c49c20cb5137df9
2016-09-27 04:28:34 -07:00
Martin Kralik cfae3e376d fixed crash when setting custom shadow props to null
Reviewed By: emilsjolander

Differential Revision: D3923634

fbshipit-source-id: 005e316e70fa280960c796375b2e94f9967a089d
2016-09-27 03:43:34 -07:00
Kevin Gozali 0a0dd30c6a Introduced AnimatedDivision
Summary:
Combining 2 animated values via addition, multiplication, and modulo are already supported, and this adds another one: division.
There are some cases where an animated value needs to invert (1 / x) another animated value for calculation. An example is inverting a scale (2x --> 0.5x), e.g.:

```
const a = Animated.Value(1);
const b = Animated.divide(1, a);

Animated.spring(a, {
  toValue: 2,
}).start();
```

`b` will then follow `a`'s spring animation and produce the value of `1 / a`.

The basic usage is like this:

```
<Animated.View style={{transform: [{scale: a}]}}>
  <Animated.Image style={{transform: [{scale: b}]}} />
<Animated.View>
```

In this example, the inner image won't get stretched at all because the parent's scaling gets cancelled out.

Also added this to native animated implementation.

Reviewed By: foghina, mmmulani

Differential Revision: D3922891

fbshipit-source-id: 32508956c4b65b2deb7574d50a10c85b4809b961
2016-09-26 16:43:51 -07:00
Héctor Ramos 9af620bc33 Split up releases by type
Summary:
The documentation archive page gets a lot of traffic relative to other docs, yet the current version does not provide much context on each release.

This PR attempts to clarify the purpose for each type of release, making it clear that users should mostly only care about the latest stable version.

![screencapture-localhost-8079-react-native-versions-html-1474917898998](https://cloud.githubusercontent.com/assets/165856/18848683/57cf20e0-83e4-11e6-961e-b93ab1c5fde5.png)
Closes https://github.com/facebook/react-native/pull/10118

Differential Revision: D3927320

Pulled By: JoelMarcey

fbshipit-source-id: c713e3ee65ad1a1fc23f112ec93f277fe981a5fa
2016-09-26 16:14:11 -07:00
Marc Horowitz 97e3c091f8 Sync support for new ios bridge
Reviewed By: javache

Differential Revision: D3897528

fbshipit-source-id: f30d2b1c490c1a9f7fc1f136858e6c7a146b9ca2
2016-09-26 16:14:11 -07:00
Marc Horowitz d7a2d3a957 Add API for sync function calls
Reviewed By: javache

Differential Revision: D3897526

fbshipit-source-id: cadead316996ca7c1dd2b0d60d87945f5452640c
2016-09-26 16:14:11 -07:00
Marc Horowitz 6071e8ca2c Support sync loading of the initial bundle/source
Reviewed By: javache

Differential Revision: D3897521

fbshipit-source-id: a4f234c7003a5f4be952d315eb62f382836e24dc
2016-09-26 16:14:11 -07:00
Marc Horowitz 51df83d7d5 Move batchedbridge start out of init
Reviewed By: javache

Differential Revision: D3913304

fbshipit-source-id: 7d9b5b352d95dd770757cc99dddcce510cdd4909
2016-09-26 16:14:11 -07:00
Marc Horowitz 971cda8794 Move thread jump for js loading into NativeToJSBridge, out of platform code
Reviewed By: javache

Differential Revision: D3906009

fbshipit-source-id: b9782a6c209e3c1626899dac7fd50233cdef87f3
2016-09-26 16:14:10 -07:00
Antti Moilanen 72e203bf95 Fix ScrollView's snap index when scrolling forward and user taps the screen again while still scrolling
Summary:
Currently when snapping is used with ScrollView it calculates wrong snap index if user taps the screen second time while ScrollView is still scrolling. This happens because the code only adds 1 to the snap index when translationAlongAxis is smaller than zero. When user taps screen second time the translationAlongAxis is 0 and snap index ends up being one less than it should. This causes the ScrollView to scroll one step backwards.

Bug can be reproduced with the new examples I added to UIExplorer's ScrollView in [scrollview-snap-bug-example branch](https://github.com/anttimo/react-native/tree/scrollview-snap-bug-example).

Fix can be verified by running the same examples with the ScrollView fix in [scrollview-snap-bug-example-with-fix branch](https://github.com/anttimo/react-native/tree/scrollview-snap-bug-example-with-fix).

![scrollview-bug](https://cloud.githubusercontent.com/assets/150881/14427555/10d59d1e-fffe-11
Closes https://github.com/facebook/react-native/pull/6906

Differential Revision: D3927123

Pulled By: majak

fbshipit-source-id: 38828cc60a02a754bdc3ec72fb98d8777917f15e
2016-09-26 16:14:10 -07:00
Mehdi Mulani 0ce2bbdd64 Fix Modal to handle in-call status bar
Summary: Changing the Modal's presentation style ensures that UIKit correctly adjusts its bounds when entering/exiting the in-call status bar.

Reviewed By: fkgozali

Differential Revision: D3916167

fbshipit-source-id: a0bea60751744ac082ba6ec38177fb093a8f2be5
2016-09-26 15:58:29 -07:00
Emil Sjolander b644b426af Fix RN instrumentation tests
Reviewed By: bestander

Differential Revision: D3924964

fbshipit-source-id: 8f925d4239ea3471bc3984ea05d48a5cd1b96f5a
2016-09-26 11:58:35 -07:00
Ryan Gomba 9462a73189 Value offsets
Summary:
This diff adds support for value offsets on iOS. It separates out code originally submitted in #9048.

Test plan (required)

Set up an animation with an offset, and `useNativeModule: true`. Compare results with `useNativeModule: false`.
Closes https://github.com/facebook/react-native/pull/9627

Differential Revision: D3924410

fbshipit-source-id: 8177a25a5f6b9e33f00ea66143c782aeea24507d
2016-09-26 10:28:35 -07:00
David Aurelio 7a02b400be Update `source-map` to v0.5.6
Summary: The newer versions of `source-map` fixed some bugs related to decoding mappings.

Reviewed By: bestander

Differential Revision: D3923727

fbshipit-source-id: cc1c87bbadeb128316965823d81ef5ca46a6845c
2016-09-26 09:13:33 -07:00
Jean Bertrand 251f65263c Fix documentations to build application in production
Summary:
The Xcode menu where you can `Edit Scheme` is called `Product` and not `Project`.

![capture d ecran 2016-09-26 a 12 20 30](https://cloud.githubusercontent.com/assets/1385737/18830997/a385fbfe-83e3-11e6-9a03-ef542b3da00d.png)
Closes https://github.com/facebook/react-native/pull/10111

Differential Revision: D3924147

Pulled By: hramos

fbshipit-source-id: 6e1f642524c91c80fcd1cd393d117c770cfae40e
2016-09-26 08:43:47 -07:00
Emil Sjolander 0a9b6bedb3 BREAKING - Fix unconstraint sizing in main axis
Summary:
This fixes measuring of items in the main axis of a container. Previously items were in a lot of cases measured with UNSPECIFIED instead of AT_MOST. This was to support scrolling containers. The correct way to handle scrolling containers is to instead provide them with their own overflow value to activate this behavior. This is also similar to how the web works.

This is a breaking change. Most of your layouts will continue to function as before however some of them might not. Typically this is due to having a `flex: 1` style where it is currently a no-op due to being measured with an undefined size but after this change it may collapse your component to take zero size due to the implicit `flexBasis: 0` now being correctly treated. Removing the bad `flex: 1` style or changing it to `flexGrow: 1` should solve most if not all layout issues your see after this diff.

Reviewed By: majak

Differential Revision: D3876927

fbshipit-source-id: 81ea1c9d6574dd4564a3333f1b3617cf84b4022f
2016-09-26 06:13:56 -07:00
Matej Matiasko 295ee16430 Fix View documentation typo
Summary:
Fix typo in View component documentation.
Closes https://github.com/facebook/react-native/pull/10097

Differential Revision: D3923619

Pulled By: davidaurelio

fbshipit-source-id: ebe63eec8ebdb36cfa7e3f501a214b9e11b17aef
2016-09-26 06:13:55 -07:00
Andrei Coman 0abaaeead0 Modal: move style to xml
Summary:
The styles that get applied to the Dialogs that are created in RN are set in
`themes.xml`, so I'm moving `windowTranslucentStatus` there as well so that we
have all of them collocated.

Reviewed By: astreet

Differential Revision: D3913402

fbshipit-source-id: 8f23e84fb017c8810634ffe8279171061292b351
2016-09-26 03:59:09 -07:00
leeight 7fd9e77837 Remove duplicate call delegate->moduleNames()
Summary: Closes https://github.com/facebook/react-native/pull/9962

Differential Revision: D3923050

fbshipit-source-id: 59e05e673835beb7409512195170c9a1e20a9ea1
2016-09-26 01:43:41 -07:00
Lord Daniel Zautner 9584480261 Remove unnecessary double test in Navigator
Summary:
_renderScene would unnecessary test if `this.state.transitionFromIndex != null` twice.

The left side and right side of the 'or' statement would always be the same.

For cleaner code I suggest to remove it.
Closes https://github.com/facebook/react-native/pull/10042

Differential Revision: D3923058

fbshipit-source-id: 7466c1f0f24eac3f9f296debd9a5e9f5320aea28
2016-09-26 01:43:41 -07:00
Guilherme Bruzzi 8adf78ffc9 FIX #9617 - Correct find local IP address when running on iOS device
Summary:
React native's reload javascript option doesn't always work on iOS devices since version 0.29, as described in https://github.com/facebook/react-native/issues/9617

It only doesn't work when you have a mac on a wireless connection, because react-native-xcode.sh can't find your IP address correctly in this case and will just fallback to use the pre-bundling option on your app.

This small change in react-native-xcode.sh fixed this issue for our project and should fix this issue for all mac users that use wireless connection and that will run a debug version of the app on a real iOS device.
Closes https://github.com/facebook/react-native/pull/9964

Differential Revision: D3923035

fbshipit-source-id: 436cfa2103e10221270034233552ce34720505d3
2016-09-26 01:28:21 -07:00
Li Zheng 2289909374 Fix ENOENT when react-native init with --verbose on Windows
Summary:
As PR #5171 was reverted in 521bd03f0a for breaking reason, ENOENT again in issues #5169 , this commit fix it ref to https://github.com/nodejs/node-v0.x-archive/issues/2318#issuecomment-249355505 , and this is the smallest change in file to fix such Windows platform specific bug tdzl2003 mkonicek snowdream sunnylqm
Closes https://github.com/facebook/react-native/pull/10086

Differential Revision: D3919761

Pulled By: bestander

fbshipit-source-id: b878bbade8142a87bd6703d485e501eb28761af5
2016-09-24 17:58:31 -07:00
Héctor Ramos 9f792c2bae Fix footer background issues in the blog index.
Summary:
Fixes #10091.

Some now unused CSS is removed here as well.
Closes https://github.com/facebook/react-native/pull/10092

Differential Revision: D3919399

Pulled By: hramos

fbshipit-source-id: ed29c4a3e1ba01d930013db04862bce3fa4c5cbb
2016-09-24 13:50:19 -07:00
KG32 100a31412f Update Upgrading.md
Summary:
Docs upgrading section - changed 0.31 to 0.34.
Closes https://github.com/facebook/react-native/pull/10085

Differential Revision: D3919253

fbshipit-source-id: b0dc34ba8d5f97dca8de2def15c7059d40eadc37
2016-09-24 11:28:31 -07:00
Konstantin Raev 3a2bb3dbc5 Disabled jest tests in e2e
Summary:
Currently too much noise is coming because of broken tests
Closes https://github.com/facebook/react-native/pull/10083

Differential Revision: D3919029

Pulled By: davidaurelio

fbshipit-source-id: e75bb38d4be1c8427dfa0c3f6df60d04582ddb2c
2016-09-24 06:13:35 -07:00
Héctor Ramos b2821c3345 Add footer
Summary:
Add footer to all pages in the website.

Preview:
![screencapture-localhost-8079-react-native-docs-network-html-1474655915887](https://cloud.githubusercontent.com/assets/165856/18797357/76a92e48-8182-11e6-8db7-74f241a9fa2c.png)
Closes https://github.com/facebook/react-native/pull/10075

Differential Revision: D3917827

Pulled By: lacker

fbshipit-source-id: f8a38feed616c4a05c29c9efef31d40ce93b5fd5
2016-09-23 19:58:32 -07:00
Aaron Chiu 1b2d9a858b add perf marker for create module
Reviewed By: andreicoman11

Differential Revision: D3910533

fbshipit-source-id: 645da63ac9fb0721f13eba05f52ae2c37a868f60
2016-09-23 16:58:30 -07:00
Erik Arvidsson 24c72f513e XMLHttpRequest.getAllResponseHeaders should use CRLF
Summary:
XMLHttpRequest.prototype.getAllResponseHeaders was previously joining
the headers with `\n`. The spec at:

https://xhr.spec.whatwg.org/#the-getallresponseheaders()-method

step 3.2, requires the headers to be joined using `\r\n`.
Closes https://github.com/facebook/react-native/pull/10034

Differential Revision: D3917020

fbshipit-source-id: f4e920f6bebacc3aa5c52c84348157d2b530480f
2016-09-23 16:28:56 -07:00
Erik Arvidsson 1142d9d059 Remove unused/invalid Flow suppression
Summary:
The suppression comment was not formatted correctly and thus not
used.
Closes https://github.com/facebook/react-native/pull/10076

Differential Revision: D3917036

fbshipit-source-id: 92927993fb7223dc131d82096ca92017aea5f1aa
2016-09-23 16:28:56 -07:00
Ian Levesque 0cfc38a59f Ignore another autogenerated folder.
Summary:
This folder contains only autogenerated files but was missing from the gitignore.
Closes https://github.com/facebook/react-native/pull/10022

Differential Revision: D3917014

fbshipit-source-id: 0a5ab629a327d6800703e1e1a5494bdfa3464c43
2016-09-23 15:58:46 -07:00
Aaron Chiu 797ca6c219 Add ability to lazy load Native Java Modules
Summary: Utilizes the build time annotation processor ReactModuleSpecProcessor that creates ReactModuleInfos for modules annotated with ReactModule and listed in the ReactModuleList annotation of LazyReactPackages. This way we don't have to instantiate the native modules to get the name, canOverrideExistingModule, and supportsWebWorkers values of the native modules. In the NativeModuleRegistry, we either store these ReactModuleInfos inside of a ModuleHolder or if we can't get the ReactModuleInfo for a specific module we instantiate that module to get the values (as we previously did) to store in a LegacyModuleInfo.

Reviewed By: astreet

Differential Revision: D3796561

fbshipit-source-id: f8fb9b4993f59b51ce595eb2f2c3425129b28ce5
2016-09-23 15:58:46 -07:00
Michał Ordon 1f9b765f81 Remove rnpm references in favour of react-native
Summary:
No need for the references now that rnpm is baked into core.
Closes https://github.com/facebook/react-native/pull/10069

Differential Revision: D3914945

fbshipit-source-id: bdf9aac03a6544bec1f18b9a80f26638ee508e16
2016-09-23 11:58:39 -07:00
Héctor Ramos 7dff5d2e30 Load React Native Web Player from MaxCDN.
Summary:
unpkg (nee npmcdn) will [no longer serve HTML content with the text/html Content-Type](https://twitter.com/mjackson/status/779147399528718336). We need to switch to another provider to continue supporting the RN Web Player.
Closes https://github.com/facebook/react-native/pull/10072

Differential Revision: D3914585

Pulled By: lacker

fbshipit-source-id: 69833c157775f2b255f1cd11c5b52140d12a27be
2016-09-23 11:28:33 -07:00
Pieter De Baets 76c54847bb Extract native module logic from BatchedBridge
Reviewed By: lexs

Differential Revision: D3901630

fbshipit-source-id: c119ffe54a4d1e716e6ae98895e5a3a48b16cf43
2016-09-23 11:14:11 -07:00
Pieter De Baets 31b158c9fe Export native modules without RCT or RK prefix
Reviewed By: mmmulani

Differential Revision: D3901600

fbshipit-source-id: 7d4a027f0f2478e2a9ac9916326b91279bec3cb3
2016-09-23 11:14:11 -07:00
Pieter De Baets ff79224d37 Simplify ModuleConfig array format
Reviewed By: lexs, mhorowitz

Differential Revision: D3901563

fbshipit-source-id: 70aea19db1b01170be57b74ccfa1a306dfa1f362
2016-09-23 11:14:10 -07:00
Pieter De Baets acdd08aef7 Add flow-typing to MessageQueue
Reviewed By: majak

Differential Revision: D3901545

fbshipit-source-id: a9ccc3d11794830e21c778df0ae7100d79f7ee73
2016-09-23 11:14:10 -07:00
Joel Marcey 53c9dbabaf Remove survey banner.
Summary:
We have gathered enough data to determine whether our docs direction
was the right approach.
Closes https://github.com/facebook/react-native/pull/10071

Differential Revision: D3914445

Pulled By: hramos

fbshipit-source-id: 64bd507d3ac6dda5dd1b5c1be611c7a71a278ffd
2016-09-23 11:14:10 -07:00
Fred Liu 4c2fa7e4ee Remove unused state variable
Reviewed By: furdei

Differential Revision: D3909633

fbshipit-source-id: 9e4376ce3eb3e49d0330a625b44fa62a96c9ba91
2016-09-23 10:28:40 -07:00
Mike Grabowski db06fc6814 Better release script
Summary: Automatically tags and publish them upstream, less steps required in order to do the release rather than just `bump-oss-version.js`

Differential Revision: D3913826

Pulled By: bestander

fbshipit-source-id: 6e023e7ab7b486ff6e6cc8e946f19e10a7ceeef8
2016-09-23 08:28:35 -07:00
Ovidiu Viorel Iepure 23d84c8df8 Remove platform blacklists
Summary: File platform identifiers (`fileName.<platform>.js`) are no longer part of the blacklist regular expression. This allows the upcoming `jest-haste-map` to include all files for all platforms, therefore enabling Packager to build bundles for different platforms using the same `HasteMap`(jest-haste-map) instance.

Reviewed By: davidaurelio

Differential Revision: D3907508

fbshipit-source-id: d7d7f3bd93287a634a1ef0590a736d021be2aaa5
2016-09-23 08:13:46 -07:00
Don Yu 17219720e4 Add support for image onLoad, onLoadEnd, onError events for IgReactImageView
Summary: Create separate buck library for image events so you can depend on that without depending on all of fresco

Reviewed By: brosenfeld

Differential Revision: D3907894

fbshipit-source-id: dca7a00d38b8b8bb5bab05b6883f6933fff3fa76
2016-09-23 04:43:54 -07:00