754 Commits

Author SHA1 Message Date
James Ide
b8bf4d0957 [Loader] Post a notification when the JS fails to load
Summary:
This provides a way to get notified when a bridge fails to load JS, allowing apps to handle the error.

Closes https://github.com/facebook/react-native/pull/1085
Github Author: James Ide <ide@jameside.com>

Test Plan: run the UIExplorer app with the packager server not running, and verify that the notification is posted.
2015-05-07 04:26:24 -08:00
Nick Lockwood
205c22b915 Fixed dev menu loop 2015-05-07 03:55:43 -08:00
Nick Lockwood
47164baaec Fixed redbox error loop when camera access is disabled 2015-05-06 17:21:10 -08:00
Tadeu Zagallo
8d83b7ff63 [ReactNative] RCTWebViewExecutor - Fix string containing script tag support 2015-05-06 17:08:33 -08:00
Alex Kotliarskyi
cad5cdef42 Updates from Wed 6 May 2015-05-06 16:08:10 -07:00
Nick Lockwood
790cee6e26 Fixed broken listview header alignment 2015-05-06 10:48:24 -08:00
Tadeu Zagallo
ea470408e2 [ReactNative] Allow JSON fragments on RCTJSONStringify 2015-05-06 05:44:40 -08:00
Nick Lockwood
88a83084e4 Fixed UIExplorer in Catalyst shell 2015-05-06 00:08:08 -08:00
Nick Lockwood
54974d6333 +[RCTConvert UIFont:] tests 2015-05-05 17:37:59 -08:00
Alex Kotliarskyi
5df5602f1a Updates from Tue 5 May 2015-05-05 14:15:51 -07:00
Iragne
88715e5c93 Update RCTNavigator.m
Summary:
Related to this issue
I created the PR.
Feel free to talk about it.

https://github.com/facebook/react-native/issues/65#issuecomment-93240332

Thanks
Closes https://github.com/facebook/react-native/pull/1131
Github Author: Iragne <adelskott@gmail.com>

Test Plan: Open NavigatorIOS example in UIExplorer, push recurse navigation several times. Press back and observe that it no longer breaks.
2015-05-05 08:32:14 -08:00
Tadeu Zagallo
3ab4d32538 [ReactNative] Fix DevMenu crash when launching the app with WebView executor 2015-05-05 07:30:55 -08:00
Alex Akers
08246b77df [React Native] Fix immediate animation crash 2015-05-05 07:21:43 -08:00
Nick Lockwood
acafa7e921 [ReactNative] Properly transition RCTTouchHandler state
Summary:
When touches end or cancel, update self.state in
RCTTouchHandler to let iOS know that we are in an ended/canceled state.
This way we won't eat other touches because it still thinks we're in a
began/changed state.

@public

Test Plan:
Scrolling in the back swipe area no longer busts gesture
recognition in Wilde.
2015-05-05 06:21:55 -08:00
Alex Akers
5eca2e1d3c [React Native] Added RCTSettings 2015-05-05 05:46:52 -08:00
Tadeu Zagallo
65a3da3003 [ReactNative] Fix chrome debugger 2015-05-05 05:36:05 -08:00
Tadeu Zagallo
d713a711c4 [ReactNative] Fix packager assets 2015-05-05 02:54:51 -08:00
Andrew Rasmussen
af921542b5 [ReactNative] update Layout
Summary:
I made some changes to css-layout that changes how layout is
computed for absolutely positioned nodes inside absolutely positioned
parents that have borders/padding. There were also some other changes
made to css-layout that haven't been merged in yet.

@public

Test Plan:
Made a node as described above, saw that the layout is
computed differently than in the browser, updated Layout, saw that the
Layout is not computed correctly.
2015-05-04 20:08:49 -08:00
Tadeu Zagallo
132a9170f1 [ReactNative] Create private underlying bridge to prevent retain cycles 2015-05-04 10:36:20 -08:00
Nick Lockwood
c5a6ec5b53 Disable React Native dev menu in release mode 2015-05-03 15:57:26 -08:00
Nick Lockwood
d29a0c6768 Fix for nil array crash 2015-05-02 18:40:04 -08:00
Tadeu Zagallo
09460cf21b [ReactNative] Use explicit doubles on RCTLocationOptions to avoid NSInvocation bug 2015-05-02 14:19:56 -08:00
Tadeu Zagallo
17262db5a9 [ReactNative] Fix JS calls being lost 2015-05-02 13:14:19 -08:00
Nick Lockwood
ba501a1bf5 Upgraded dev menu 2015-05-01 06:36:49 -08:00
Tadeu Zagallo
67196b36bb [ReactNative] Fix WebView executor 2015-05-01 06:11:36 -08:00
Kevin Gozali
b6646d1c4c [ReactNative] Honor fontWeight once again 2015-04-30 11:33:36 -08:00
Nick Lockwood
eb0476074f Improved debug and fixed macros 2015-04-30 09:59:16 -08:00
Alex Akers
d82aaa7fb3 [React Native] Remove RKCustomTabBarController
Summary:
@public
Closes GitHub issue #1064

Test Plan: @nicklockwood approves.
2015-04-30 07:59:59 -08:00
Ben Alpert
d8ab648fce Updates from Wed 29 Apr 2015-04-29 18:55:07 -07:00
Tadeu Zagallo
483077d4da [ReactNative] Don't log invalid utf8 strings 2015-04-29 12:24:52 -08:00
Clay Allsopp
11f204748d Add SegmentedControlIOS
Summary:
Fixes #534:

![screen shot 2015-03-31 at 7 52 10 pm](https://cloud.githubusercontent.com/assets/153704/6934038/742ddd34-d7e3-11e4-8f55-3eb7d9d3f1cd.png)

```jsx
<SegmentedControlIOS
  tintColor="#ff0000"
  values={['One', 'Two', 'Three', 'Four']}
  selectedtIndex={0}
  momentary={false}
  enabled={true}
  onValueChange={ (value) => console.log(value) } />
```

This only supports string-based segments, not images. Also doesn't support full customization (no separator images etc); I figure this is a good MVP to lock-down a basic API

I also included a snapshot test case, but the images keep coming out funky. When I look at the sim, I see that the text labels show up for the selected segment, but the snapshot keeps coming out with no text on those segments. I tried forcing a delay, but same result. Is that explainable?

Obviously happy to change anything about the API, code-style nitpicks, etc
Closes https://github.com/facebook/react-native/pull/564
Github Author: Clay Allsopp <clay.allsopp@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-29 08:08:45 -08:00
Brent Vatne
c09bdebcd5 Add support for multiline TextInput via UITextView
Summary:
@nicklockwood - Could I get a review of this?

Just took `RCTTextField` and ported it from `UITextField` to `UITextView` as you mentioned in another discussion, and removed any `UITextField` specific attributes.

- How do you think this should behave when there are subviews?
- Do you know how we can respond to the `UIControlEventEditingDidEndOnExit` event to respond to submit? Because `UITextView` isn't a `UIControl` we can't just use `addTarget` with `UIControlEventEditingDidEndOnExit`.
- Any other feedback?

Still going to look over the `UITextView` docs in more detail and make sure we expose all important options, and add it to the UIExplorer example, just putting this out here for feedback.

![multiline](https://cloud.githubusercontent.com/assets/90494/7310854/32174d6a-e9e8-11e4-919e-71e54cf3c739.gif)

Closes https://github.com/facebook/react-native/pull/991
Github Author: Brent Vatne <brent.vatne@madriska.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-29 01:33:58 -08:00
Tadeu Zagallo
2f4430cf51 [ReactNative] Fix bridge event dedupe 2015-04-28 07:58:35 -08:00
Alex Akers
f7276b0ae4 [React Native] Fix borderWidth setter bug 2015-04-28 07:53:28 -08:00
Nick Lockwood
bc24be8584 Fixed nil object insertion crash due to incorrectly encoded HTTP response body data 2015-04-28 04:48:32 -08:00
Ben Alpert
dd56ccb9c7 [react-native] Fix capitalization of "REact" 2015-04-27 13:52:57 -08:00
Maksim Bunkow
bae4e44c60 Added placeholderTextColor property for TextInput class
Summary:
Closes https://github.com/facebook/react-native/pull/997
Github Author: Maksim Bunkow <bimawa@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-27 10:43:10 -08:00
Alex Akers
826b56a41b [React Native] Update RCTView border implementation 2015-04-27 04:10:43 -08:00
Tadeu Zagallo
136431cc2f [ReactNative] Fix struct args on exported methods 2015-04-27 04:01:37 -08:00
Tadeu Zagallo
8aeb33d44c [ReactNative] Make so each RCTContextExecutor has its own thread 2015-04-27 03:46:27 -08:00
Nick Lockwood
77e38b26c5 Improved RCTActivityIndicatorView and fixed some flow errors 2015-04-26 02:17:13 -08:00
Tadeu Zagallo
dd6bce78e1 [ReactNative] Allow bridge modules to run on the JavaScript thread 2015-04-25 19:29:00 -08:00
Nick Lockwood
8a3b0fa9e8 Fix edge cases and add tests for +[RCTConvert NSURL:] 2015-04-25 15:11:23 -08:00
Tadeu Zagallo
bd5736414a [ReactNative] Fix error when reload during profile 2015-04-25 13:23:09 -08:00
Spencer Ahrens
1cc0c96508 [React Native] Bring back console.error redboxes with disable flag 2015-04-24 17:54:16 -08:00
Spencer Ahrens
21b4b5b352 Updates from Fri 24 Apr 2015-04-24 11:46:18 -07:00
Tadeu Zagallo
d293bed5ab [ReactNative] Fix analyze errors on oss 2015-04-24 08:28:35 -08:00
Kevin Gozali
34a5aa1d0a [ReactNative][madman] Revert D2001353 2015-04-23 13:39:56 -08:00
Philipp von Weitershausen
e88ba1a6a3 [ReactNative] Back out D2014163 entirely 2015-04-23 12:02:47 -08:00
Herman Schaaf
4242bd9c83 Replace percent escapes in file URL before using as path
Summary:
This is to fix a bug that prevents bundling of projects that contain spaces (or other special characters) in their names.

#### Reproduction steps before the fix
 1. Create a project with a space in the name:
    ![screen shot 2015-04-16 at 17 23 46](https://cloud.githubusercontent.com/assets/1121616/7176887/63af36de-e45d-11e4-9aa9-40586560b716.png)

 2. Follow the steps in `OPTION 2` for running from a bundled file, i.e. create the `main.bundle` file, add it to the project if is not there already, and uncomment `jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];`
 3. Run the application. This is what happens:

![screen shot 2015-04-16 at 17 27 48](https://cloud.githubusercontent.com/assets/1121616/7176955/f139764a-e45d-11e4-8dc8-3c13aab70828.png)

To prove that it has to do with a space in the name, refactor the project name to not contain a space:

![screen shot 2015-04-16 at 17 28 27](https://cloud.githubusercontent.com/assets/1121616/7176966/056b6c9a
Closes https://github.com/facebook/react-native/pull/876
Github Author: Herman Schaaf <hermanschaaf@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-23 11:01:18 -08:00