Commit Graph

5192 Commits

Author SHA1 Message Date
Thomas Goldenberg c7d0a9b54f Update showcase.js 2016-02-02 17:36:09 -05:00
Thomas Goldenberg 422bb263b6 Update showcase.js 2016-02-02 16:36:22 -05:00
Dave Miller d1e9fc0737 Fix SourceMap loading on Android
Reviewed By: martinbigio

Differential Revision: D2891405

fb-gh-sync-id: 8fa38e530952c6e7fda48557ea6386b4b456efb0
2016-02-02 12:21:34 -08:00
Chirag 656e992fa6 Merge pull request #5709 from anishakd4/feature/CaratLaneAppShowcase
Adding CaratLane app to react-native showcase
2016-02-02 14:44:49 -05:00
AnishKumar Dubey cc231cde73 Adding CaratLane app to react-native showcase 2016-02-03 00:51:10 +05:30
AnishKumar Dubey ba89d9bb7e Adding CaratLane app to react-native showcase 2016-02-03 00:35:33 +05:30
Richard Lai 5c705264aa Remove AppState from Known Issues page
Summary:
Closes https://github.com/facebook/react-native/issues/5682.
Closes https://github.com/facebook/react-native/pull/5704

Reviewed By: svcscm

Differential Revision: D2890937

Pulled By: androidtrunkagent

fb-gh-sync-id: 75760220640a836947ea91e8dc554734dff790b8
2016-02-02 10:20:36 -08:00
Adam Miskiewicz fb29a95e01 Fix import of LinkingIOS on Android
Summary:
We need to check the existence of RCTLinkingManager (which doesn't exist on Android) because this code is called on require.
Closes https://github.com/facebook/react-native/pull/5680

Reviewed By: svcscm

Differential Revision: D2887260

Pulled By: androidtrunkagent

fb-gh-sync-id: 4a5843ea6a5898d0f2810ad9ddb5b2078054e9f1
2016-02-02 09:25:36 -08:00
Dave Miller 804b23811b Fix lint for D2880851
Reviewed By: andreicoman11

Differential Revision: D2890474

fb-gh-sync-id: 2d6b2a9a5caa1964646706ba75a5fae8350d0ee5
2016-02-02 08:44:33 -08:00
Janic Duplessis 2633f10588 Fix a crash when logging a JS exception that has no source file
Summary:
This error occurs primarily when starting the app and the packager is not running.

`source` can be null when the evaluated code does not come from a source file so it just crashes with a SIGSEGV when passing it to `String::adopt`. This restores the beloved 'Can't find variable __fbBatchedBridge' redbox error :)

Seems to be introduced in 17e1ceb543.

cc davidaurelio
Closes https://github.com/facebook/react-native/pull/5689

Reviewed By: svcscm

Differential Revision: D2890634

Pulled By: astreet

fb-gh-sync-id: b96bbe8e26c9ac580b1aa17222d2f59376832560
2016-02-02 08:30:30 -08:00
Kudo Chien 6d65a90017 Allow customized refreshControl in ScrollView for Android
Summary:
Original Android's refreshControl in ScrollView is tightly coupled with AndroidSwipeRefreshLayout. If someone use `ref=` for RefreshControl in ScrollView, it does nothing since RefreshControl in Android return null.

This change allows customized  RefreshControl especially for `ref=` as well as making ScrollView's code clearer.
Closes https://github.com/facebook/react-native/pull/5623

Reviewed By: svcscm

Differential Revision: D2890072

Pulled By: nicklockwood

fb-gh-sync-id: a8fc7746bcc050a6e46fedf3583979f4cb9021b6
2016-02-02 07:12:32 -08:00
Konstantin Raev a0bed63f13 Migrating RN unit tests to robolectric 3 for opensourcing
Reviewed By: foghina

Differential Revision: D2887376

fb-gh-sync-id: 719942bb18a5aba27eeb9d30766084d636b3d2b5
2016-02-02 05:22:32 -08:00
Aleksei Androsov 65b0913210 TextInput should call blur and focus methods of selectionState
Summary:
DocumentSelectionState returns anchor and focus offsets only in focused state. So TextInput should set proper state to selectionState when blur and focus.
Closes https://github.com/facebook/react-native/pull/5354

Reviewed By: svcscm

Differential Revision: D2890277

Pulled By: andreicoman11

fb-gh-sync-id: 84f96504e218cf7c70d7e24865ab074d882f3bea
2016-02-02 05:22:08 -08:00
Andrei-Ovidiu Coman eebea51b7c Merge pull request #5701 from facebook/revert-5354-textinput-selectionstate-focus-blur
Revert "TextInput should call blur and focus methods of selectionState"
2016-02-02 13:20:58 +00:00
Andrei-Ovidiu Coman 729c04b58b Revert "TextInput should call blur and focus methods of selectionState" 2016-02-02 13:19:58 +00:00
Andrei-Ovidiu Coman f3ffafb756 Merge pull request #5354 from doochik/textinput-selectionstate-focus-blur
TextInput should call blur and focus methods of selectionState
2016-02-02 10:39:56 +00:00
Dave Miller fa4a5afe35 Fix Keyboard handling to allow all characters on Soft Input Panel and hardware keyboard
Summary:
public
This diff fixes two issues:
1) Makes it so that when a keyboard is displayed, all keys in that keyboard actually can be set as text.  Previously you could display a Numeric keyboard and it would only allow entering numbers despite the keyboard having other keys like comma, plus, space, etc.
 a) This also allows any key entered on a physical keyboard to go through to the view even if not present on the Soft Input keyboard
2) Makes more robust our Filter setting in setMaxLength so that we only affect the InputFilter.LengthFilter if present instead of all.

This works by creating a new KeyListener which will respond to getInputType as the KeyListener it is replacing (like a DigitsKeyListener for a numeric keyboard) but allow all characters when actually entering text.

Reviewed By: andreicoman11

Differential Revision: D2880851

fb-gh-sync-id: fa5eb549a849d8f30c592d7eac48054ca6a75544
2016-02-02 00:02:30 -08:00
Jan Kassens 80e1ca870b move Relay sources to unsigned directory
Reviewed By: yungsters

Differential Revision: D2887448

fb-gh-sync-id: 53e71be7fa875b3495991f2bf941c5eeb6ae1534
2016-02-01 20:12:19 -08:00
Christoph Pojer 361f3f30d3 Fix shallow dependency resolution
Summary:
The feature added in D2862850 only adds the module that requests shallow dependency resolution to the dependencies of a module. The reason why this is happens is because `collect` calls `response.addDependency` but if `recursive` is set to `false`, dependencies don't call `collect` and therefore don't get added to the resolution response. This fixes it by adding dependencies outside of the `collect` call.

public

Reviewed By: davidaurelio

Differential Revision: D2885152

fb-gh-sync-id: 8ab3b6c6b7cd45d59615a99ac87984a41b5d7025
2016-02-01 19:08:36 -08:00
Christoph Pojer db275dd49f Updates from GitHub
Summary:
This syncs a couple of changes from GitHub that are necessary for jest:

* Expose `set` on Cache
* Add a function to `getAllModules` from the graph
* Explicitly dontMock `graceful-fs` in the fastfs test. node-haste2 has this manual mock which is still used in automocked tests (ugh!).

public

Reviewed By: davidaurelio

Differential Revision: D2885112

fb-gh-sync-id: b2060d5474ebee5aa13e6ba2bdf5879b46f3fd5f
2016-02-01 18:27:36 -08:00
Nick Lockwood 46106f756a Ported `source` prop over to iOS WebView
Summary:
public
https://github.com/facebook/react-native/pull/5494 added a new `source` property to WebView on Android that provides a better API, as well as allowing for request headers to be set.

This diff ports that functionality over to iOS, so we can have a consistent API cross-platform.

I've also extended the API to include `method` (GET or POST) and `body` when setting the WebView content with a URI, and `baseUrl` when setting static HTML.

Reviewed By: javache

Differential Revision: D2884643

fb-gh-sync-id: 83f24494bdbb4e1408aa8f3b7428fee33888ae3a
2016-02-01 18:01:35 -08:00
glevi@fb.com 5ec1d354c2 Deploy v0.21.0
Reviewed By: jeffmo

Differential Revision: D2888689

fb-gh-sync-id: fe94e50c7872b9a1344a054acccab365d385f6ed
2016-02-01 17:13:35 -08:00
Christoph Pojer 700b848826 Expose fastfs on the DepencenyGraph instance.
Summary:
The FS as seen by an instance of a dependency graph is useful for clients of node-haste. This provides an accessor to fastfs so that the partial view of the filesystem can be queried. I was thinking of splitting out the fastfs creation to outside the constructor but the necessary refactoring doesn't seem worth it. The fastfs is intrinsically tied to the dependency graph and the `DependencyGraph` instance is meant to be a base-class for clients anyway. Both in react-packager and jest we are wrapping it with higher-level client specific containers, Resolver and HasteResolver respectively.

public

Reviewed By: davidaurelio

Differential Revision: D2885217

fb-gh-sync-id: 47a408b2682516bee9d6a4e6c61b9063817aaf22
2016-02-01 17:00:38 -08:00
Gaëtan Renaudeau 9506e5afc7 add animated param in ListView#scrollTo
Summary:
Since scrollTo(x,y,**animated**) params has been introduced, it was not backported to ListView scrollTo method.
Closes https://github.com/facebook/react-native/pull/5661

Reviewed By: svcscm

Differential Revision: D2886049

Pulled By: nicklockwood

fb-gh-sync-id: 016e92beadc7f397be77b8c58dc572119f873556
2016-02-01 14:53:11 -08:00
Jelle van den Hooff debcac59d0 iOS websocket: include cookies with request
Summary:
This PR modifies the Websocket implementation on iOS to pass cookies to the server. Sending cookies is useful for clients that wish to access protected Websocket endpoints without creating a new authentication protocol.
Closes https://github.com/facebook/react-native/pull/5630

Reviewed By: svcscm

Differential Revision: D2881815

Pulled By: martinbigio

fb-gh-sync-id: 31c1640626cd15447bdb4f2058ae4e34dfa52f88
2016-02-01 14:19:32 -08:00
Konstantin Raev 6ecfb61147 fixes gradle dependencies for compile and test
Summary: Closes https://github.com/facebook/react-native/pull/5676

Reviewed By: svcscm

Differential Revision: D2886944

Pulled By: androidtrunkagent

fb-gh-sync-id: 9cb68883cd38c31e588222bc746b5e296962c845
2016-02-01 13:23:36 -08:00
Chirag 5029a7af9b Merge pull request #5679 from ilanasufrin/add-thisam-showcase
Adds Thisam to Showcase
2016-02-01 16:04:10 -05:00
Ilana Sufrin dd759aa78d adds thisam to showcase 2016-02-01 15:55:56 -05:00
Christopher Chedeau 1491668b35 ColorPropTypes support for isRequired and more precise description
Summary:
The previous implementation of ColorPropType was very hacky as it used `ReactPropTypes.oneOfType([colorValidator, ReactPropTypes.number])`. It turns out that oneOfType also accepts arbitrary functions instead of a type, but doesn't display any of the error message.

In this diff I properly implement isRequired (sadly we don't export `createChainableTypeChecker` in ReactPropTypes) and provide a lot more context that we have. I copy and pasted the way we displayed this context from the existing checkers.

**Test Plan**

When doing .isRequired and do not provide the value:

![simulator screen shot feb 1 2016 9 56 00 am](https://cloud.githubusercontent.com/assets/197597/12726239/61243f88-c8cb-11e5-889b-6594ffd85973.png)

When providing a bad value:

![simulator screen shot feb 1 2016 10 01 25 am](https://cloud.githubusercontent.com/assets/197597/12726244/6e80aa36-c8cb-11e5-9bd3-a8637de75496.png)
Closes https://github.com/facebook/react-native/pull/5671

Reviewed By: svcscm

Differential Revision: D2886760

Pulled By: vjeux

fb-gh-sync-id: d6be42b5768fca5463fe80fe4b144506d21b0832
2016-02-01 12:47:32 -08:00
Martín Bigio 36efbc341d Hot Loading Indicators
Summary:
public

Introduce a header bar similar to the one shown when loading the bundle to indicate that the packager server is processing an HMR update. Hook into HMR events to show this bar when appropriate.

Reviewed By: javache

Differential Revision: D2873521

fb-gh-sync-id: a77cbb2368b75b045aa8c6ababce2f731baf514b
2016-02-01 12:42:33 -08:00
Nick Lockwood 180ead05e9 Fixed ScrollView.scrollTo() on iOS
Summary:
public
My refactor to unify the scrollTo() apis on iOS + Android broke iOS. Oops.

Reviewed By: jingc

Differential Revision: D2886305

fb-gh-sync-id: de287cba8df7cf14c8049d91621cd7f86aa4e92c
2016-02-01 11:05:36 -08:00
Konstantin Raev 3e0631af7f limiting BUCK's memory for CI
Summary: Closes https://github.com/facebook/react-native/pull/5666

Reviewed By: svcscm

Differential Revision: D2885968

Pulled By: androidtrunkagent

fb-gh-sync-id: 59614f89c18f8db96210e5c93f599055575330fa
2016-02-01 10:49:33 -08:00
Brent Vatne cb2eeb484d Add defaultSource example
Summary: Closes https://github.com/facebook/react-native/pull/5074

Reviewed By: svcscm

Differential Revision: D2798023

Pulled By: nicklockwood

fb-gh-sync-id: d8aa87bf8dcbecf53b341d5914bbe3354cc753aa
2016-02-01 10:20:35 -08:00
Michael Tostenson 80a2f5d50f Add headers prop to Android WebViews
Summary:
Related to [issue #5418](https://github.com/facebook/react-native/issues/5418)

This is a follow-up to [this previous pull request.](https://github.com/facebook/react-native/pull/5419)

~~Adds a new ReactProp 'urlWithHeaders' to Android WebViews that takes an object with a 'url' string and a 'headers' map.~~

[Update] Adds a new prop 'source' to Android WebViews
```
{
   html: string,
   url: string,
   headers: map<string, string>,
}
```

Update: resolves TODO 8495359
Closes https://github.com/facebook/react-native/pull/5494

Reviewed By: svcscm

Differential Revision: D2881313

Pulled By: nicklockwood

fb-gh-sync-id: 7cad8490d4932d0a7ef559165f3ec279d873c537
2016-02-01 10:06:35 -08:00
David Aurelio f04882f8e4 Fix problems with graceful-fs bug
Summary:
public
This fixes the problem that graceful-fs exposes an unpatched `close()` method, that will never trigger retries.
This behavior deadlocks the packager when trying to use graceful-fs’s `open()`/`read()`/`close()` methods.

See: isaacs/node-graceful-fs#56

Reviewed By: cpojer

Differential Revision: D2885512

fb-gh-sync-id: 71112d2488929bf1775fe9f8566fa03fd66b6bea
2016-02-01 10:00:40 -08:00
Konstantin Raev f6187565ac fixed gradle deps
Summary: Closes https://github.com/facebook/react-native/pull/5670

Reviewed By: svcscm

Differential Revision: D2885815

Pulled By: androidtrunkagent

fb-gh-sync-id: 670f731b0b12ca2f1b31f0a982f109ce4f736836
2016-02-01 09:42:29 -08:00
Jack Hsu 8e603940e3 Use `getRealMetrics` for display metrics. Closes #4934
Summary:
Fixes https://github.com/facebook/react-native/issues/4934.

Since API level 17, there has a `Display.getRealMetrics` method. This allows us to get the actual sizes of the screen (including soft menu bar and other system decor elements).

See: http://developer.android.com/reference/android/view/Display.html#getRealMetrics(android.util.DisplayMetrics)

I'm not sure if there is a good way to write unit or integration tests for this. Please let me know if there are any suggestions or concerns.
Closes https://github.com/facebook/react-native/pull/4935

Reviewed By: svcscm

Differential Revision: D2811091

Pulled By: bestander

fb-gh-sync-id: fed4e357db7eb36d638eebabd8ced4bdffd766a4
2016-02-01 09:09:34 -08:00
Pieter De Baets bb5a6be9dd Only execute update block once
Summary:
We were executing all the updateBlocks for every frame that was updated in the UI flush. This would quickly give you an explosive number of block calls when loading complex views.

This update block is only really used by text to propagate padding, even though the actual insets are mostly just 0.

public

Reviewed By: nicklockwood

Differential Revision: D2848968

fb-gh-sync-id: e43c529c2bb9729e2b779bf4abefeed58775cc2e
2016-02-01 07:51:35 -08:00
Shane Rogers 97723e4d7e Typo
Summary:
Tiny typo :)

🐝 🍻
Closes https://github.com/facebook/react-native/pull/5665

Reviewed By: svcscm

Differential Revision: D2885581

Pulled By: androidtrunkagent

fb-gh-sync-id: 4f442a95ea05e2f58c47c664644210c99e256943
2016-02-01 07:43:33 -08:00
Konstantin Raev 8cfed9d6a9 Merge pull request #5640 from janicduplessis/buck
Add buck build folders to gitignore
2016-02-01 15:40:57 +00:00
Konstantin Raev 33e8a03ada Open sourced view tests
Reviewed By: mkonicek

Differential Revision: D2881830

fb-gh-sync-id: fef9176964892c5aa40633c177f1d5d8e3aed499
2016-02-01 05:34:18 -08:00
Nick Lockwood ee30433b76 Update Android's ScrollView.scrollTo API to match JS/iOS
Summary:
public
We recently updated the `ScrollResponder.scrollResponderScrollTo` method to accept an `animated` argument, and deprecated the `scrollResponderScrollWithoutAnimationTo` method. This change was reflected in the native iOS implementation, but not on Android.

This diff updates the Android ScrollViewManager implementation to match the JS API, and removes the platform-specific fork in the JS code.

Reviewed By: dmmiller

Differential Revision: D2883515

fb-gh-sync-id: e5a0e1cf470e21af837b2311cf1048162ac3aff5
2016-02-01 04:04:35 -08:00
Christoph Pojer 9308f89c1c Add per-field cache invalidation
Summary:
Jest needs this for efficient caching of resolution responses.

public

Reviewed By: voideanvalue

Differential Revision: D2873291

fb-gh-sync-id: fee27d2ffdfe64bd68fdb4d9e4259e721b33631f
2016-01-31 23:25:32 -08:00
Christopher Chedeau bee6988f94 Temporarily allow decimals on rgb() and rgba()
Summary:
Animating colors using Animated is currently interpolating rgb and rgba and doesn't round the intermediate values. We need to fix it there but it's not a straightforward change so reverting to the lax version here until we fix it inside of Animated (which is needed to work on web anyway).
Closes https://github.com/facebook/react-native/pull/5654

Reviewed By: svcscm

Differential Revision: D2885051

Pulled By: vjeux

fb-gh-sync-id: dab69b1da11131c9fab2fd08c434c73ec93d59d2
2016-01-31 22:46:38 -08:00
Ahmed Abbas 5afb74027f Update 3rd-party modules website to Js.coach
Summary:
This section was outdated with older website : https://facebook.github.io/react-native/docs/known-issues.html#using-3rd-party-native-modules
Closes https://github.com/facebook/react-native/pull/5650

Reviewed By: svcscm

Differential Revision: D2884630

Pulled By: androidtrunkagent

fb-gh-sync-id: afe35817421e055e343233a1db863954d6f75f01
2016-01-31 16:38:31 -08:00
Sam Neubardt 23412459b2 Handle spaces in $REACT_NATIVE_DIR
Summary:
`react-native-xcode.sh` can fail to execute if `$REACT_NATIVE_DIR` contains spaces.

E.g. if `$REACT_NATIVE_DIR` was `/Users/samn/src/Xcode Projects/AwesomeReact` then `react-native-xcode.sh` would fail with the following error:

```
node /Users/samn/src/Xcode Projects/ReactNativeBeaconTest/node_modules/react-native/local-cli/cli.js bundle .... (elided)

module.js:341
    throw err;
    ^

Error: Cannot find module '/Users/samn/src/Xcode'
    at Function.Module._resolveFilename (module.js:339:15)
    at Function.Module._load (module.js:290:25)
    at Function.Module.runMain (module.js:447:10)
    at startup (node.js:139:18)
    at node.js:999:3
Command /bin/sh failed with exit code 1
```

This change properly handles paths with spaces in them by quoting `$REACT_NATIVE_DIR`
Closes https://github.com/facebook/react-native/pull/5651

Reviewed By: svcscm

Differential Revision: D2884600

Pulled By: androidtrunkagent

fb-gh-sync-id: 3784d8f4e16c0c2cadac738c5f085a5023b5ecf7
2016-01-31 15:51:36 -08:00
Dotan J. Nahum 5712e0c3eb Typo: Change WebWiew to WebView
Summary: Closes https://github.com/facebook/react-native/pull/5648

Reviewed By: svcscm

Differential Revision: D2884296

Pulled By: androidtrunkagent

fb-gh-sync-id: 50340c0fc06926fbb3dc41c3078aa985ff48ccd3
2016-01-31 08:41:33 -08:00
Austin Kuo d3a1d27aaa Improve the error message when the packager can't find a module
Summary: Closes https://github.com/facebook/react-native/pull/5647

Reviewed By: svcscm

Differential Revision: D2884241

Pulled By: androidtrunkagent

fb-gh-sync-id: 115491270c8f84d45f67a1a477543d9ace76f447
2016-01-31 06:45:35 -08:00
Christopher Chedeau 670f9afaa1 Document Linking
Summary:
Both LinkingIOS and IntentAndroid are deprecated in favor of Linking but it was not in the website documentation.
Closes https://github.com/facebook/react-native/pull/5642

Reviewed By: svcscm

Differential Revision: D2883999

Pulled By: androidtrunkagent

fb-gh-sync-id: cd2ce6192f84fffef7ab7d4e56f87eb55fb30901
2016-01-31 00:53:33 -08:00
Christopher Chedeau 3fbd46c6d9 Cleanup Edit with GitHub
Summary:
- Now using a table layout. While having the link inside of the header worked well in the browser, the search API would put "Edit in GitHub" as part of the title -_-
- Instead of putting the link inside of every section like Props, put it on the page header. This makes it less repetetitive and also works on API pages where the link was absent before
- Remove "Run this example" link as there's a giant Run this example sidebar already.
Closes https://github.com/facebook/react-native/pull/5643

Reviewed By: svcscm

Differential Revision: D2883989

Pulled By: vjeux

fb-gh-sync-id: e810e1677d5130692997dd301d6d59cfe04b948f
2016-01-30 23:02:36 -08:00