Commit Graph

1570 Commits

Author SHA1 Message Date
Tadeu Zagallo 6e24a71d3d Updates from Mon 1 Jun 2015-06-01 12:51:34 +01:00
Tadeu Zagallo b03446e27e [ReactNative] Stop traversing the whole view hierarchy every frame
Summary:
@public

`RCTUIManager` would traverse the whole view hierarchy every time there was any
call from JS to Native to call `reactBridgeDidFinishTransaction` on the views
that would respond to it. This is a deprecated method that is only implemented
by 3 classes, so for now we keep track of these views as they're created and
just iterate through them on updates.

Test Plan:
> NOTE: I tested this on UIExplorer, since the internally none of the classes are used

I tried to keep it simple, so I added the following to the old code:
```
__block NSUInteger count = 0;
UIView *rootView = _viewRegistry[rootViewTag];
RCTTraverseViewNodes(rootView, ^(id<RCTViewNodeProtocol> view) {
  count ++;
  if ([view respondsToSelector:@selector(reactBridgeDidFinishTransaction)]) {
    [view reactBridgeDidFinishTransaction];
  }
});
NSLog(@"Views iterated: %zd", count);
```
The output after scrolling 20 sections of the `<ListView> - Paging` example was

```
2015-06-01 00:47:07.351 UIExplorer[67675:1709506] Views iterated: 1549
```

*every frame*

After the change

```
for (id<RCTViewNodeProtocol> node in _bridgeTransactionListeners) {
  [node reactBridgeDidFinishTransaction];
}
NSLog(@"Views iterated: %zd", _bridgeTransactionListeners.count);
```

```
2015-06-01 00:51:23.715 UIExplorer[70355:1716465] Views iterated: 3
```

No matter how many pages are loaded, the output is always 3.
2015-06-01 03:14:14 -08:00
Jiajie Zhu df58789f22 [RN] fix duplicate observe 2015-05-31 14:46:38 -08:00
Peter Cottle 595eae8b67 [ErrorMessage] Change error message when app is not registered
Summary:
So when I first started porting JS files over from LearnGitBranching into a react native project, I some had require errors (for whatever reason) and I hit this error message a decent amount. I eventually understood it had nothing to do with failing to register the component (which btw sounds like some sign-up process, not actually an internal concept) but I figured we could expand on this message and describe why it might be happening.

I'm not 100% sure on what the second half should be, but open to feedback on this
Closes https://github.com/facebook/react-native/pull/826
Github Author: Peter Cottle <pcottle@fb.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-31 13:14:02 -08:00
Ben Alpert c37509727f Set constructor properly in createReactNativeComponentClass
Summary:
Without this, the displayName property wasn't found when looking at
`.constructor` on a component instance. Fixes facebook/react-devtools#92.
Closes https://github.com/facebook/react-native/pull/1471
Github Author: Ben Alpert <balpert@fb.com>

Test Plan:
Used devtools on MoviesApp and saw RCTView instead of Unknown:

{F22491590}
2015-05-31 12:59:53 -08:00
Nick Lockwood 09cef03cd3 revert D2087892 2015-05-31 11:35:55 -08:00
Brent Vatne 62fef10755 Revert "[SampleApp] Remove $(SRCROOT) from INFOPLIST_FILE to fix agvtool"
This reverts commit 13316ef380.
2015-05-31 10:08:48 -07:00
Brent Vatne 53a7e070b8 Merge branch 'babel-documentation' 2015-05-31 10:08:16 -07:00
Brent Vatne 13316ef380 [SampleApp] Remove $(SRCROOT) from INFOPLIST_FILE to fix agvtool 2015-05-31 10:08:05 -07:00
Brent Vatne d6ac633de5 [Docs] Tweak wording of JavaScriptEnvironment docs 2015-05-31 10:07:42 -07:00
James Ide 69ce448de9 Merge pull request #1457 from christopherdro/timer-doc-fix
[Docs] Grammatical change / Timer
2015-05-30 18:22:05 -07:00
Christopher Dro 597f9d94fd Changes based on @brentvatne revision 2015-05-30 18:00:34 -07:00
Brent Vatne e65eff8df6 [Docs] Add supported iOS version to getting started 2015-05-30 15:09:32 -07:00
Christopher Dro 47e56d778a Re-wording 2015-05-30 14:47:24 -07:00
Tadeu Zagallo 1c692e2eb6 [ReactNative] Use JSValueIsUndefined instead of comparing with JSValueMakeUndefined
Summary:
@public

Use JSValueIsUndefined instead of caching an JSValueMakeUndefined to compare with
as suggested in https://github.com/facebook/react-native/pull/1432#commitcomment-11437434

Test Plan: Run the RCTContextExecutor tests
2015-05-30 13:32:11 -08:00
Brent Vatne 39b2342ab9 [Docs] Add note about Chrome extensions interacting with debugger 2015-05-30 13:24:53 -07:00
Christopher Dro 5918be2325 Typo Fix
Oddly enough, adding `work` was the first change I wanted to do. :)
2015-05-30 00:46:30 -07:00
Christopher 2429324e79 [Docs] Gramatical change / Timer 2015-05-30 00:14:22 -07:00
Tadeu Zagallo c60c1c0415 Merge pull request #1446 from tadeuzagallo/Update_Fri_29_May
Update fri 29 may
2015-05-30 02:35:08 +01:00
Tadeu Zagallo 8976a05fe1 [ReactNative][Travis] Use nvm with node v0.10 2015-05-30 02:16:51 +01:00
Tadeu Zagallo 3b6ed00ace [ReactNative] Remove AnimationUtils tests 2015-05-30 00:27:11 +01:00
Tadeu Zagallo f8b3c98bc6 [ReactNative] Remove AnimationUtils tests 2015-05-29 15:24:47 -08:00
Christopher Chedeau b9a47062a6 [ReactNative] Unbreak flow errors 2015-05-29 23:52:02 +01:00
Tadeu Zagallo 74c337f770 [ReactNative] Use Travis' Xcode 6.3 beta 2015-05-29 23:42:03 +01:00
Christopher Chedeau 6bffa6c8a8 [ReactNative] Unbreak flow errors 2015-05-29 14:24:00 -08:00
Tadeu Zagallo 1567e8224a Updates from Fri 29 May 2015-05-29 23:18:30 +01:00
Tadeu Zagallo ef4f143ae0 [ReactNative] Update objc-test to run on iOS 8.3 2015-05-29 23:17:59 +01:00
Tadeu Zagallo bb7ae59a12 [ReactNative] Update OSS screenshort tests 2015-05-29 13:59:18 -08:00
Joshua Sierles f9b3f9121f update JS environment documentation for Babel, and explain what a transpiler does. 2015-05-29 22:50:03 +02:00
Krzysztof Magiera e2dc2db9dc [react_native] JS files from D2091817: Support nested text nodes in TextInput. 2015-05-29 12:39:47 -08:00
Krzysztof Magiera ff48f78742 [react_native] JS files from D2091792: Introduce vitual text node and adapt TextViewManager to shadowview-less design. 2015-05-29 12:37:55 -08:00
Brent Vatne 1a4f270931 Merge branch 'debugging-docs' 2015-05-29 13:04:54 -07:00
Brent Vatne ee8ba19ab1 [Docs] Tweak debugging docs to be more concise 2015-05-29 13:04:25 -07:00
Flip Stewart 1a3ee99365 [Docs] Clean up debugging docs 2015-05-29 13:03:33 -07:00
Alex Kotliarskyi 228dc5f936 [MAdMan] Possibly fix "Cannot find breadcrumb interpolators for -1" 2015-05-29 11:23:40 -08:00
Nick Lockwood 36c33b4a60 Fixed delayed text layout bug 2015-05-29 10:43:13 -08:00
Alex Akers 4097459dc9 [React Native] Remove layout-only nodes from RCTText in RN OSS 2015-05-29 06:22:45 -08:00
Alex Akers 40da2c7e08 [React Native] Add E2E tests for Catalyst that test login, app launcher, and opening UIExplorer, MAdMan, Groups 2015-05-29 05:30:09 -08:00
Brent Vatne 1efd2c87c8 Merge pull request #1237 from nickhudkins/patch-1
[Docs] Correct homepage code examples
2015-05-28 16:36:21 -07:00
Brent Vatne 18a3d715ce [Docs] Remove indentation from codeblocks 2015-05-28 16:33:52 -07:00
Nick Lockwood 03889780b9 [WIP] Added loadingView property to RCTRootView 2015-05-28 13:20:46 -08:00
Leonardo YongUk Kim 7e0064f097 Add the license field on package.json
Summary:
Add the license field on package.json
Closes https://github.com/facebook/react-native/pull/1409
Github Author: Leonardo YongUk Kim <dalinaum@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-28 12:00:46 -08:00
Christopher Chedeau 3c1eaf7a6e [ReactNative] Fix inspect element crash 2015-05-28 10:03:06 -08:00
Bill Fisher 474ac651d5 [ReactNative] Allow decomposedMatrix style property to go to native view 2015-05-28 09:32:50 -08:00
Nick Lockwood 45c1dc1c65 Fixed text background color
Summary:
@public

This fixes an issue with the containerBackgroundColor property of `<Text>` nodes, where containerBackgroundColor was being overridden by the backgroundColor. I also fixed up the example so that it demonstrates the feature more clearly.

Test Plan:
* Check UIExplorer text example
* Run Catalyst snapshot tests and check MAdMan, Groups
2015-05-28 09:31:57 -08:00
Jason Prado 656c5e4e27 Revert "[ReactNative] Add completionBlock to -[RCTBridge enqueueJSCall:args:]"
Test plan: broke catalyst apps

Summary: This reverts commit 9fba6a360dc5f8bf.

fbobjc/Tools/revert

Reverter: jprado

@build-break

commit 9fba6a360dc5f8bf014f3d3c584c545b16da5100
Author:     Tadeu Zagallo <tadeuzagallo@fb.com>
AuthorDate: Thu May 28 08:29:19 2015 -0700
Commit:     Service User <svcscm@fb.com>
CommitDate: Thu May 28 09:53:53 2015 -0700

    [ReactNative] Add completionBlock to -[RCTBridge enqueueJSCall:args:]

    Summary:
    @public

    Allow to pass an optional completion block to the bridge JS calls.

    The block will be called from the JS thread, after the javascript has finished
    running and the returned calls have been processed/dispatched to the native modules.

    Test Plan: Added `testCallbackIsCalledOnTheRightTime` to `RKBatchedBridgeTests`
2015-05-28 09:30:51 -08:00
Nick Lockwood ff49d86aed Implemented fast path for same borders/radii 2015-05-28 09:16:44 -08:00
Tadeu Zagallo 3b24f52a20 [ReactNative] Add completionBlock to -[RCTBridge enqueueJSCall:args:]
Summary:
@public

Allow to pass an optional completion block to the bridge JS calls.

The block will be called from the JS thread, after the javascript has finished
running and the returned calls have been processed/dispatched to the native modules.

Test Plan: Added `testCallbackIsCalledOnTheRightTime` to `RKBatchedBridgeTests`
2015-05-28 08:53:53 -08:00
Tadeu Zagallo 41859e594d Merge pull request #1432 from tadeuzagallo/Update_Thu_28_May
Updates from Thu 28 May
2015-05-28 16:52:55 +01:00
Tadeu Zagallo 9d1960948c Updates from Thu 28 May 2015-05-28 16:17:37 +01:00