Commit Graph

3972 Commits

Author SHA1 Message Date
Tadeu Zagallo 0b46a0c13b Add a naive WPO implementation
Summary: public

RFC: The minifier haven't been stripping dead-code, and it also can't kill unused
modules, so as a temporary solution this inlines `__DEV__`, kill dead branches
and kill dead modules. For now I'm just white-listing the dev variable, but we
could definitely do better than that, but as a temporary fix this should be
helpful.

I also intend to kill some dead variables, so we can kill unused requires,
although inline-requires can also fix it.

Reviewed By: vjeux

Differential Revision: D2605454

fb-gh-sync-id: 50acb9dcbded07a43080b93ac826a5ceda695936
2015-11-17 03:39:28 -08:00
Krzysztof Magiera bd1885b5d4 Cleanup native view hierarchy when view is dropped.
Differential Revision: D2659738

fb-gh-sync-id: 1c14b8c3c6fabbd0e580777bb94221df6dd98f71
2015-11-17 02:06:28 -08:00
James Ide 0f590d1233 Merge pull request #4167 from mosch/patch-3
added WOOP App
2015-11-16 23:40:11 -08:00
Moritz Schwörer 3bd6efe7ed added WOOP App
yay, first react-native app is done.
2015-11-17 08:23:21 +01:00
Christoph Pojer 5b4244d755 Sync new haste features from upstream
Reviewed By: amasad

Differential Revision: D2644383

fb-gh-sync-id: 5225e6afb8e5b835865473b2880a77235e6bd6eb
2015-11-16 22:50:30 -08:00
Chris Kwan 7a98aeae18 Add git clone step to READMEs 2015-11-16 22:55:45 -05:00
Martin Konicek 7cfd38a093 Update LinuxWindowsSupport.md 2015-11-16 22:19:46 +00:00
Nick Lockwood 7aa789ad57 Fix onSelectionChange "this" binding
Reviewed By: tadeuzagallo

Differential Revision: D2660071

fb-gh-sync-id: 3fc50c0af8566dd7db5a56b220df979625673d07
2015-11-16 14:09:23 -08:00
olivier notteghem e4f0971a55 Re-land D2656590 in iOS repo which is the source of truth
Reviewed By: newobj

Differential Revision: D2660019

fb-gh-sync-id: 7cc183888f88d9971f59b23f45a86b5aa0391909
2015-11-16 13:54:30 -08:00
James Ide f331d2a844 Expose the touch-retention offset as a prop
Summary: The touch-retention offset defines a rect around a touchable component in which the touch is retained. Easiest way to see this is to touch a button in a real navigation bar and slide your finger out of the range and back in. This diff exposes the offset as a prop (I thought touchRetentionOffset was a more informative name than pressRectOffset)

Fixes #198
Closes https://github.com/facebook/react-native/pull/713

Reviewed By: svcscm

Differential Revision: D2115370

Pulled By: shayne

fb-gh-sync-id: c3f57940dfa3806f9c88df03a01d4d65bb58cf32
2015-11-16 13:53:31 -08:00
olivier notteghem 5217c8273f enabling progressive Jpeg rendering (part 2/2)
Reviewed By: nspaun

Differential Revision: D2658991

fb-gh-sync-id: 13a103458c30ea3e8f0cb37456d09f70f4e76e4a
2015-11-16 11:43:27 -08:00
sunnylqm 29c8d46ea1 fix a markdown format typo
Summary: fix a markdown format typo
Closes https://github.com/facebook/react-native/pull/4149

Reviewed By: svcscm

Differential Revision: D2658880

Pulled By: ericvicenti

fb-gh-sync-id: 7feced63f875e96780b0d8d52aa1470bb149ebf8
2015-11-16 11:37:45 -08:00
Nick Lockwood 8b81bb7be5 Fixed issue with alert not being presented when modal window is hidden
Reviewed By: ryanolsonk

Differential Revision: D2658537

fb-gh-sync-id: 94bb311142005cfacc7b7612c17309835eeb980a
2015-11-16 10:24:23 -08:00
Tadeu Zagallo 136d79f4d6 Fix set log block in template
Summary: public

The log register function was updated, but the test example wasn't.

Reviewed By: javache

Differential Revision: D2658417

fb-gh-sync-id: 9ad27ec02eb437e0262e71897ff1a58a97e88b6d
2015-11-16 10:08:08 -08:00
Mike Armstrong 619da521f3 Enable javascript systrace markers via js module
Differential Revision: D2658662

fb-gh-sync-id: 042377551f9dacc0a9d12728edfa54a57c617cf4
2015-11-16 09:46:34 -08:00
Mike Armstrong 2f9e7be04b fix output leaving bad characters in systrace output buffer due to overstepping bytes written
Differential Revision: D2658628

fb-gh-sync-id: e4c9dc66746177d371331d79972f1322239b4ea7
2015-11-16 09:39:31 -08:00
Nick Lockwood b7f5062128 Fixed nil insert crash in shadowViewRegistry
Summary: public

In iOS < 9, inserting a nil object into NSMutableDictionary crashes. It is valid for come components to return a nil shadowView (e.g. ART nodes), and this was crashing on iOS 8.

Reviewed By: jspahrsummers

Differential Revision: D2658309

fb-gh-sync-id: 7abf9273708cc03c3b6307b69ba11c016b471fbe
2015-11-16 09:19:24 -08:00
Martin Konicek d63d2071f9 Update KnownIssues.md 2015-11-16 14:12:46 +00:00
Tadeu Zagallo 8d347d6add Bump babel-core to 6.1.20
Reviewed By: davidaurelio

Differential Revision: D2656437

fb-gh-sync-id: 237b3c285ab83cae2099a1ca043e22e7e5afc691
2015-11-16 04:04:21 -08:00
Tadeu Zagallo 02b2e23663 Add suport for JSC profiling on iOS 9
Summary: public

Make the makefile more flexible and add support for iOS9

Reviewed By: jspahrsummers

Differential Revision: D2656510

fb-gh-sync-id: 0a8a6f137e68b50afedbc6d32266618ad79381e0
2015-11-16 03:38:11 -08:00
Tadeu Zagallo 905a8a4ce0 Reenable JS profiler after reload
Summary: public

Call `nativeProfilerStart` after reloading the bridge.

Reviewed By: jspahrsummers

Differential Revision: D2656507

fb-gh-sync-id: 651ff078ae289cb9701663f5f8ef164db1b42d74
2015-11-16 03:35:27 -08:00
Nick Lockwood 6dd171b8c2 RCTImagePicker now uses main thread
Summary: public

RCTImagePicker (aka ImagePickerIOS) was previously displaying UI from a random thread, which is unsafe. This diff forces it to execute on the main thread instead.

Reviewed By: jspahrsummers

Differential Revision: D2657465

fb-gh-sync-id: 3c0fa6935061ccaa3e6ce649b4e3e8ad8c701384
2015-11-16 03:17:29 -08:00
Tadeu Zagallo 2fb03be046 Fix babelHelpers.extend
Summary: public

The recent change to move babelhelpers out of the module broke the extends method.

Reviewed By: spicyj

Differential Revision: D2656448

fb-gh-sync-id: 633433deea00ecb140afbb732bff0599e67b4d41
2015-11-14 13:51:25 -08:00
Martin Konicek e171d67c55 Update Troubleshooting.md 2015-11-14 19:32:45 +00:00
Martin Konicek 358c2360da Update KnownIssues.md
Turns out it was already documented in Troubleshooting
2015-11-14 19:31:13 +00:00
Martin Konicek c7985e0c87 Document the Firebase issue 2015-11-14 19:26:33 +00:00
Nick Lockwood fa0b45c58b Replaced RCTSparseArray with NSDictionary
Reviewed By: jspahrsummers

Differential Revision: D2651920

fb-gh-sync-id: 953e2ea33abfc7a3a553da95b13e9ab2bccc5a1c
2015-11-14 10:28:28 -08:00
Nick Lockwood 5a34a097f2 Open sourced the onSelectionChange event
Summary: public

Open-sourced the onSelectionChange event for RCTTextView, and also added onSelectionChange support for RCTTextField.

Reviewed By: javache

Differential Revision: D2647541

fb-gh-sync-id: ab0ab37f5f087e708a199461ffc33231a47d2133
2015-11-14 09:44:30 -08:00
Nick Lockwood 397791fcea Added in-memory cache for AsyncLocalStorage
Reviewed By: tadeuzagallo

Differential Revision: D2641705

fb-gh-sync-id: 40b96b3084b82779e16f8845f9faeb0e3638d189
2015-11-14 09:20:30 -08:00
James Ide 90c8f37c39 Mark `-[init]` w RCT_NOT_IMPLEMENTED
Summary: ARTBrush.m doesn't defined init but Clang wants it.

Fix #2590
Closes https://github.com/facebook/react-native/pull/2592

Reviewed By: svcscm

Differential Revision: D2656454

Pulled By: nicklockwood

fb-gh-sync-id: c386adfadc30c5a0b642b60d3b7e1991481f1fb9
2015-11-14 06:29:27 -08:00
David Aurelio 21bae9b294 Unbreak jest tests (and travis e2e tests)
Reviewed By: mkonicek

Differential Revision: D2652002

fb-gh-sync-id: 8aab8da47dd737acc4ee9acddc484bd3bbdf1184
2015-11-14 03:26:24 -08:00
Nathan Spaun 39ec693866 revert D2631410
Differential Revision: D2655673

fb-gh-sync-id: 115247373767690e63a0d6ce812a578d26b47289
2015-11-13 17:51:30 -08:00
Martin Konicek e406dccaf9 Update docs for Animated - remove precomputeStyle 2015-11-13 22:19:26 +00:00
James Ide e6ad27b417 Merge pull request #4119 from corbt/documentation_native_android
Import PropTypes in Native UI Android Docs
2015-11-13 13:11:39 -08:00
Dave Miller a0268a7bfc Initial checkin for Image within Text nodes
Summary: This adds the basic support for embedding an image in a TextView.

Implementation details :

We create a ReactTextInlineImageShadowNode whenever an Image is embedded within a Text context.
That uses the same parsing code as ReactImageView (copied, not shared) to parse the source property to figure out the Uri where the resource is.

In ReactTextShadowNode we now look for the ReactTextInlineImageShadowNode and place a TextInlineImageSpan so that we can layout appropriately

Later at the time we go to setText on the TextView, we update that TextInlineImageSpan so that the proper Drawable (downloaded via Fresco) can be shown

public

Reviewed By: mkonicek

Differential Revision: D2652667

fb-gh-sync-id: 8f24924d204f78b8bc4d5d67835cc73b3c1859dd
2015-11-13 11:16:27 -08:00
Giampaolo Bellavite 492412f177 Fix typo in console.error
Summary: Closes https://github.com/facebook/react-native/pull/4116

Reviewed By: svcscm

Differential Revision: D2652595

Pulled By: cpojer

fb-gh-sync-id: a46a19dcbb119b4e14df2e4418787ea232c32606
2015-11-13 11:02:42 -08:00
Kyle Corbitt e3543e08f5 bugfix native ui android docs 2015-11-13 19:01:03 +00:00
Pawel Sienkowski 3a42661b47 Custom logic blocks for RCTTestRunner's runTest: method
Reviewed By: majak

Differential Revision: D2626497

fb-gh-sync-id: c78e3b47be4ee192e899594bd05b13521af7172e
2015-11-13 08:38:31 -08:00
Pawel Sienkowski 760a2fc79a Prevent RCTRootView delegate call
Reviewed By: javache

Differential Revision: D2631582

fb-gh-sync-id: 409d439eb1dc8c7723892477dfaf58aa85c664b5
2015-11-13 08:28:28 -08:00
Qiao Liang 993f15d2fe Ensure row key uniqueness for listview with sections
Summary: I encounter issues when using ListView with multiple Sections.
```
...
var ds = new ListView.DataSource({
  rowHasChanged           : (row1, row2) => row1 !== row2,
  sectionHeaderHasChanged : (s1, s2) => s1 !== s2
});
...
  getInitialState: function() {

    var sectionIDs = [0,1,2]
    var rowIDs = [
        [0,1,2],
        [0,1,2],
        [0,1,2]
    ]

    var dataBlob = [
        [blob0,blob1,blob2],
        [blob3,blob4,blob5],
        [blob6,blob7,blob8],
    ]

    return {
      dataSource : ds.cloneWithRowsAndSections(dataBlob, sectionIDs, rowIDs),
    };

```

the code above would throw error because of duplicate key, as ''sectionID0 + rowID0 === sectionID1 + rowID1'. And I have to do:
```
...
sectionIDs.map((id)=>{
  return id+'';
});

rowIDs.map((sec)=>{
  return sec,map((id)=>{
    return id+'';
  });
});
...
```

ListView with sections does not seem to be documented yet, so I am not sure if this is the intended behaviour or am I missing anything. Co
Closes https://github.com/facebook/react-native/pull/4082

Reviewed By: svcscm

Differential Revision: D2652028

Pulled By: mkonicek

fb-gh-sync-id: a9933bac1a1ae2d6cbc73a11ef6aefde6fcdb35f
2015-11-13 08:15:59 -08:00
Brent Vatne 50b8b00768 Add setPageWithoutAnimation
Summary: In some cases it's desirable to set the page in the ViewPager without animating it -- we have this in ScrollView with `scrollWithoutAnimationTo`. This PR adds `setPageWithoutAnimation` on ViewPager.

cc ide kmagiera
Closes https://github.com/facebook/react-native/pull/3621

Reviewed By: svcscm

Differential Revision: D2652056

Pulled By: mkonicek

fb-gh-sync-id: 6f1f38558c41ffdd863c0ebb2f046c75b5c0392c
2015-11-13 08:05:27 -08:00
James Ide 88a92f8f52 Add back projectRoots option to packager CLI command
Summary: Adding this to the CLI again (like: 8e7cfcd053 (diff-75e3fc051b7c5100b4681e8a8f62615bL45))

Fix #2390
Closes https://github.com/facebook/react-native/pull/4065

Reviewed By: svcscm

Differential Revision: D2652032

Pulled By: mkonicek

fb-gh-sync-id: 7162983c24f6e08ecc8f7f410e9b756471d88631
2015-11-13 08:00:29 -08:00
Alexander Blom 4d4c48d32b Send HEADERS_RECEIVED and LOADING events on Android
Summary: Send part of the response body every 100 ms if the client has set onreadystatechange. This
is done by using the same events as the iOS code and removing the callback that Android previously
used.

Reconsolidate iOS and Android implementations.

Closes #3772

public

Reviewed By: mkonicek

Differential Revision: D2647005

fb-gh-sync-id: d006e566867fa47d5f8dff71219cb390bcb8e15a
2015-11-13 07:28:28 -08:00
Martin Konicek a99fabdfea Merge pull request #4102 from mkotsbak/patch-1
Add license and source info for react-native-cli
2015-11-13 15:21:58 +00:00
Martin Konicek a5357846d7 Merge pull request #4112 from abalone0204/patch-1
Correct the file name to preprocessor
2015-11-13 15:02:19 +00:00
Spencer Ahrens a94c2aea37 revert onEndReached change to investigate perf regression
Differential Revision: D2651998

fb-gh-sync-id: 81ef96bbd79a282b5d82b8cc9b0654e7163fbdfb
2015-11-13 06:21:58 -08:00
Tsung Chen Ku ade9645ae8 Correct the file name to preprocessor
Since the `scriptPreprocessor.js` is removed since 14.0,
we use `preprocessor.js` instead, 
but the doc doesn't update yet.
So I do it :)
2015-11-13 21:23:30 +08:00
Tim Yung c47116273d JS: Remove Throwing Collection Checks (rFBOBJC)
Reviewed By: sebmarkbage

Differential Revision: D2650824

fb-gh-sync-id: eb944a2086f1efff05215c9f6bd332d0a832606e
2015-11-12 19:38:31 -08:00
Eric Vicenti 5041171b78 Fix ScrollResponder scrollResponderScrollNativeHandleToKeyboard when kb is offscreen
Summary: public

`scrollResponderScrollNativeHandleToKeyboard` would fail silently if there is no keyboard present. This makes sure to do the correct scrolling behavior, by assuming the screen height is where the keyboard would be located.

This still might not work properly in landscape apps, but it should not make the situation worse

Also fix an issue wehre `scrollResponderKeyboardDidHide` would swallow the event

Reviewed By: vjeux

Differential Revision: D2643477

fb-gh-sync-id: f917390f4709361cc47bcd553b214833422ec05d
2015-11-12 19:17:28 -08:00
James Ide 235405091d Merge pull request #4108 from puf/master
Added section on modules that require WebSocket
2015-11-12 19:05:47 -08:00