Commit Graph

520 Commits

Author SHA1 Message Date
Eric Vicenti 1a68585990 [ReactNative] Navigator fix rapid gesture breakage
Summary:
When gesturing rapidly between scenes, the navigator can get into an unresponsive state. A few minor fixes can avoid that case

@public

Test Plan: Rapid gestures on iOS device and simulator can no longer get into bad state
2015-05-13 13:24:36 -07:00
Gabe Levi 184bb1151a [Flow] v0.11.0 cleaning - Part 14 (react-native-github) 2015-05-13 13:24:36 -07:00
Martin Konicek 92fc92835f [ReactNative] Resolve assets on Android 2015-05-13 13:24:36 -07:00
Krzysztof Magiera 369e30f685 [ReactNative] Rename files after ReactIOS codemod so that filename matches name exported with @providesModule. 2015-05-13 13:24:36 -07:00
Vladimir Kurchatkin a142ed50ff Add `letterSpacing` style property for `Text`
Summary:
Fixes #457
Closes https://github.com/facebook/react-native/pull/482
Github Author: Vladimir Kurchatkin <vladimir.kurchatkin@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-13 13:24:36 -07:00
Eric Vicenti 02d875869a [ReactNative] Fix Navigator empty scene issue
Summary:
In some situations, when quickly swiping back to a scene we are transitioning from, the scene is blank/missing. This is fixed by adding a check for the active gesture when we hide the scenes.

@public

Test Plan: Can no longer reproduce on simulator when quickly swiping back to the scene we are transitioning from
2015-05-13 13:24:36 -07:00
Tadeu Zagallo ef339250b5 [ReactNative] Add prompt to AlertIOS
Summary:
Add `AlertIOS.prompt`

It's compatible with the js spec, with the exception that I had to add
a callback param since it's async. Also supports the same button configuration
as `AlertIOS.alert`.

@public

Test Plan:
I've updated the `AlertIOS` example on UIExplorer with every
valid combination of
parameters, so just going through it should be fine.
2015-05-13 13:24:36 -07:00
Nick Lockwood cfeae15c1f Fixed thread safety for RCTImageLoader 2015-05-13 13:24:36 -07:00
Nick Lockwood 5e160f168d Added support for local image to RCTImageLoader 2015-05-13 13:24:35 -07:00
Eric Vicenti aa19232609 [ReactNative] Fix case where scenes are not reset on gesture detaching
Summary:
Sometimes, when quicly backing out of a gesture, the scene isn't fully reset to the middle position and remains offset by a few pixels. This makes sure that never happens.

@public

Test Plan: Tested on iOS and I can no longer see the scenes stop when backing out of a gesture
2015-05-13 13:24:35 -07:00
Eric Vicenti a852227279 [ReactNative] Improve Navigator start gesture logic
Summary:
Previously it was possible for a gesture to be granted initiated if the start direction is not respected before the gesture detection distance gets reached, if the gesture direction is met eventually. This change ensures the gesture gets started in the right direction, otherwise the gesture action will set the responder.

@public

Test Plan: Fixes left-right swiping issue in AdsManager when a vertical swipe is intended.
2015-05-13 13:24:35 -07:00
Krzysztof Magiera ff00e1496c [ReactNative] Rename ReactIOS JS module (and relatives) to ReactNative. 2015-05-13 13:24:35 -07:00
Alex Kotliarskyi 320208f4f7 Updates from Fri 8 May 2015-05-08 10:29:59 -07:00
Ben Alpert 5e51fac8d5 [react-native] In TouchableOpacity, access .props on element, not component 2015-05-08 08:31:04 -08:00
Eric Vicenti 61bd008ea0 [ReactNative] Fix TouchableOpacity crash when child props are missing 2015-05-07 18:04:19 -08:00
Alex Kotliarskyi c76fb40ec4 [ReactNative] Register assets with AssetRegistry 2015-05-07 17:27:42 -08:00
Brent Vatne 7141948a05 Bump fetch and add exports/globals for Headers, Request and Response
Summary:
Now on fetch 0.8.1, the latest tagged release. Previous version used was 0.7.0. See #1162 cc @vjeux @jtremback
Closes https://github.com/facebook/react-native/pull/1192
Github Author: Brent Vatne <brent.vatne@madriska.com>

Test Plan: I arc patched and ran movies demo and storyline, they work fine
2015-05-07 13:24:16 -08:00
Spencer Ahrens 1ef4e00fba [ReactNative] Introduce onLayout events
Summary:
Simply add an `onLayout` callback to a native view component, and the callback
will be invoked with the current layout information when the view is mounted and
whenever the layout changes.

The only limitation is that scroll position and other stuff the layout system
isn't aware of is not taken into account.  This is because onLayout events
wouldn't be triggered for these changes and if they are desired they should be
tracked separately (e.g. with `onScroll`) and combined.

Also fixes some bugs with LayoutAnimation callbacks.

@public

Test Plan:
- Run new LayoutEventsExample in UIExplorer and see it work correctly.
- New integration test passes internally (IntegrationTest project seems busted).
- New jest test case passes.

{F22318433}

```
2015-05-06 15:45:05.848 [info][tid:com.facebook.React.JavaScript] "Running application "UIExplorerApp" with appParams: {"rootTag":1,"initialProps":{}}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF"
2015-05-06 15:45:05.881 [info][tid:com.facebook.React.JavaScript] "received text layout event
", {"target":27,"layout":{"y":123,"x":12.5,"width":140.5,"height":18}}
2015-05-06 15:45:05.882 [info][tid:com.facebook.React.JavaScript] "received image layout event
", {"target":23,"layout":{"y":12.5,"x":122,"width":50,"height":50}}
2015-05-06 15:45:05.883 [info][tid:com.facebook.React.JavaScript] "received view layout event
", {"target":22,"layout":{"y":70.5,"x":20,"width":294,"height":204}}
2015-05-06 15:45:05.897 [info][tid:com.facebook.React.JavaScript] "received text layout event
", {"target":27,"layout":{"y":206.5,"x":12.5,"width":140.5,"height":18}}
2015-05-06 15:45:05.897 [info][tid:com.facebook.React.JavaScript] "received view layout event
", {"target":22,"layout":{"y":70.5,"x":20,"width":294,"height":287.5}}
2015-05-06 15:45:09.847 [info][tid:com.facebook.React.JavaScript] "layout animation done."
2015-05-06 15:45:09.847 [info][tid:com.facebook.React.JavaScript] "received image layout event
", {"target":23,"layout":{"y":12.5,"x":82,"width":50,"height":50}}
2015-05-06 15:45:09.848 [info][tid:com.facebook.React.JavaScript] "received view layout event
", {"target":22,"layout":{"y":110.5,"x":60,"width":214,"height":287.5}}
2015-05-06 15:45:09.862 [info][tid:com.facebook.React.JavaScript] "received text layout event
", {"target":27,"layout":{"y":206.5,"x":12.5,"width":120,"height":68}}
2015-05-06 15:45:09.863 [info][tid:com.facebook.React.JavaScript] "received image layout event
", {"target":23,"layout":{"y":12.5,"x":55,"width":50,"height":50}}
2015-05-06 15:45:09.863 [info][tid:com.facebook.React.JavaScript] "received view layout event
", {"target":22,"layout":{"y":128,"x":60,"width":160,"height":337.5}}
```
2015-05-07 12:27:44 -08:00
Brent Vatne 1c90a2dbcc Move updated propTypes into new TransformPropTypes 2015-05-07 12:14:15 -07:00
Brent Vatne 0bccc33dff Change rotation to rotate 2015-05-07 11:56:42 -07:00
Brent Vatne f878be84e6 Clarify transform for ViewStyleProps, generate union docs properly 2015-05-07 11:56:42 -07:00
James Ide b97ce93cea [Nav] Add support for bar button icons and left buttons
Summary:
NavigatorIOS supports four new properties:

  - **rightButtonImageSource:** The source of an image to display in the top right. This must be a static image since UINavigationController only supports UIImages. Adding support for UIImageViews (or arbitrary views) is more complicated because custom views do not fade on touch and do not have hit slop the same way that UIImage buttons do. Usage: `rightButtonImageSource: ix('ImageName')`
  - **backButtonImageSource:** Use a custom image for the back button. This does not replace the back caret (`<`) but instead replaces the text next to it.
  - **leftButtonTitle**: Text for the left nav button, which supersedes the previous nav item's back button when specified. The main use case for this is your initial screen/UIVC which has nothing to go back to (since it is the first VC on the stack) but need to display a left button. This does hide the back button if there would have been one otherwise.
  - **leftButtonImageSource:** Image source for the left button, super
Closes https://github.com/facebook/react-native/pull/263
Github Author: James Ide <ide@jameside.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-07 08:03:21 -08:00
Brent Vatne f05494c96f Fix scrollview doc type - canimprove -> can improve
Summary:
Simple one character change - add a missing space
Closes https://github.com/facebook/react-native/pull/1112
Github Author: Brent Vatne <brent.vatne@madriska.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-06 21:19:25 -08:00
Tadeu Zagallo 8d1fcfd615 Merge pull request #1112 from brentvatne/fix-scrollview-doc-typo
Fix scrollview doc type - canimprove -> can improve
2015-05-07 02:57:44 +01:00
Brent Vatne 0b844feedb [TouchableOpacity] Reset opacity to the inactiveValue rather than always 1.0
Summary:
As per #941 - fixes bug with `TouchabeOpacity` always reseting child opacity to `1.0` after press.

A note about the code: we could probably use a general `getNativeProp(propName, callback)` function rather than `getOpacity` but just used that as it was simpler for this specific PR, perhaps that refactor could be left to another - or maybe there is a way to do this already that I missed.

Before:
![bug](https://cloud.githubusercontent.com/assets/90494/7287207/52d6a686-e907-11e4-8e16-04b2ddd0582c.gif)

After:
![after](https://cloud.githubusercontent.com/assets/90494/7287689/5aca4776-e90c-11e4-8c40-aa6bd3e822d8.gif)

Example code:
```javascript
'use strict';

var React = require('react-native');
var {
  AppRegistry,
  StyleSheet,
  Text,
  View,
  TouchableOpacity,
} = React;

var TestIt = React.createClass({
  render() {
    return (
      <View style={styles.container}>
        <TouchableOpacity activeOpacity={0.3}>
          <View style={styles.searchButton}>
            <Text>
Closes https://github.com/facebook/react-native/pull/977
Github Author: Brent Vatne <brent.vatne@madriska.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-06 17:27:12 -08:00
Alex Kotliarskyi d3c0029cef [ReactNative] Do not throw when Image.source is null 2015-05-06 16:16:49 -08:00
Alex Kotliarskyi cad5cdef42 Updates from Wed 6 May 2015-05-06 16:08:10 -07:00
Alex Kotliarskyi ee449301b6 [ReactNative] Fail faster in OSS tests 2015-05-06 14:28:30 -08:00
Peter Zich d177a45bdc [ReactNative] Pull transform properties out into TransformPropTypes 2015-05-06 14:24:10 -08:00
Eric Vicenti 40e3f6ea8c [ReactNative] Navigator initialRoute default change
Summary:
The default initialRoute was the first route, but it makes more sense for the default initialRoute to be the last route in the initialRouteStack.

Updated the docs to reflect that.

@public

Test Plan: Updated call sites and checked that they work. Not many places use initialRouteStack yet.
2015-05-06 11:18:55 -08:00
Alex Kotliarskyi 735f67337a [ReactNative] Fail faster in OSS tests 2015-05-06 09:33:20 -07:00
Nick Lockwood 88a83084e4 Fixed UIExplorer in Catalyst shell 2015-05-06 00:08:08 -08:00
Eric Vicenti 86cfcbc77e [ReactNative] Navigator fix opacity reset for presented scene
Summary:
jumpN will call enableScene for the dest scene, which makes sure the scene can be made visible, but we need to avoid resetting the opacity for it when it is already the presented scene. There is already a check to make sure we don't reset opacity for the transitioningFrom scene.

@public

Test Plan: Fixes the issue on Android device when jumping to a scene that is already presented
2015-05-05 14:30:29 -08:00
Ryan Pastorelle 8a74a9f7c3 Force `responseHeaders` to lower case to respect case-insensitivity
Summary:
`XMLHttpRequest.getResponseHeader` is case-insensitive, therefor the React-Native implementation needs to mimic this behavior as to not break libraries that are dependent on this.

There is a corresponding issue in `superagent` but this is the root cause (https://github.com/visionmedia/superagent/issues/636).
Closes https://github.com/facebook/react-native/pull/1138
Github Author: Ryan Pastorelle <rpastorelle@yahoo.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-05 14:09:40 -08:00
Alex Kotliarskyi 5df5602f1a Updates from Tue 5 May 2015-05-05 14:15:51 -07:00
Alex Akers 08246b77df [React Native] Fix immediate animation crash 2015-05-05 07:21:43 -08:00
jmstout 929b2999c4 Fix a bug in the Navigator's gesture.edgeHitWidth implementation
Summary:
Should resolve #1081

cc @ericvicenti
Closes https://github.com/facebook/react-native/pull/1082
Github Author: jmstout <git@jmstout.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.

Revert Plan: This seems legit, but I'm not qualified to review.
2015-05-05 06:26:51 -08:00
Alex Akers 1a17cceb17 [React Native] Save UIExplorer search state 2015-05-05 05:46:53 -08:00
Alex Akers 5eca2e1d3c [React Native] Added RCTSettings 2015-05-05 05:46:52 -08:00
Krzysztof Magiera 4402c4c885 [react_native] JS files from D2038965: Extract view specific commands from UIManager. 2015-05-05 02:58:05 -08:00
Spencer Ahrens 66d2f600dd [ReactNative] improve console logging a little bit 2015-05-04 18:57:03 -08:00
Eric Vicenti 50de4a67b0 [ReactNative] Navigator use flattenStyle
Summary:
A hack was implemented in Navigator to do this manually, but there is a proper function to get these styles for setting native props

@public

Test Plan: Testing Navigator behavior on iOS and Android
2015-05-04 14:33:25 -08:00
Tadeu Zagallo 132a9170f1 [ReactNative] Create private underlying bridge to prevent retain cycles 2015-05-04 10:36:20 -08:00
Eric Vicenti 548a0a6a4f [ReactNative] Fix Navigator scene hiding logic
Summary:
Scenes with 0 opacity are being rendered on top of other scenes with full absolute positioning. On iOS this is fine, because the platform will not send touch events to a view with no opacity. On Android is poses a problem because the view on top, even with no opacity, is catching the touch events for the presented scene below.

This change enhances the scene enabling and hiding logic, has better naming, and improves the documentation of it.

@public

Test Plan: Tested transitions and gestures in slow motion on iOS and Android
2015-05-04 08:54:19 -08:00
Brent Vatne 2f9cc9723f Fix scrollview doc type - canimprove -> can improve 2015-05-02 19:51:18 -07:00
Tadeu Zagallo 09460cf21b [ReactNative] Use explicit doubles on RCTLocationOptions to avoid NSInvocation bug 2015-05-02 14:19:56 -08:00
Ben Alpert 8c2f44d640 [react-native] Don't mutate props in TouchableBounce 2015-05-02 10:23:24 -08:00
Spencer Ahrens 59997df1c1 [ReactNative] Fix warnings w/h => width/height 2015-05-02 10:22:59 -08:00
Spencer Ahrens 5e110d2776 [ReactNative] Fix Text Updating Crash
Summary:
@public

{D1953613} added an optimization that allowed for shadow nodes that are not
backed by views, but didn't actually work robustly in the remove case because
the indices can get out of sync.  That diff also started returning nil for raw
text nodes, which triggered this bug and broke "see more" functionality in the
`FBTextWithEntities` and `ExpandingText` components, leading to crashes in the
Groups app.

This diff fixes the issue by simply returning `UIView` placeholders again.
Slight perf/ memory cost but no more crashes and there should be no other
adverse affects.

We'll need to think up something more clever in order to properly support `nil`
views in the future, probably something that uses the shadow hierarchy to build
the View hierarchy, rather than mirroring identical commands to both - see
#1102.

Test Plan:
- TextUpdateTest fails without native changes, now passes with them.
- ExpandingText example no longer crashes.
- See More in Groups app no longer crashes.
2015-05-02 10:07:08 -08:00
Spencer Ahrens a4616bff3f [ReactNative] Test case for text update bug 2015-05-02 10:07:07 -08:00
Emily Eisenberg 30a479db8b Make AsyncStorage types match the implementations
Summary:
The `getAllKeys` callback type was completely missing the return value, and all of the callbacks are optional. This just fixes the types to match what the implementations are doing.
Closes https://github.com/facebook/react-native/pull/1079
Github Author: Emily Eisenberg <xymostech@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-01 18:26:11 -08:00
Eric Vicenti c0d77dbe9c [ReactNative] Navigator pop specify route to pop
Summary:
Now you can pass a route to the pop function in the navigator context, and the Navigator will pop that scene off the stack and every scene that follows.

This changes the request API that bubbles up to the top-level navigator. The `pop` request had previously taken a route for `popToRoute`, but that is a more obscure use case. This makes the request API more closely match the context method naming.

@public

Test Plan: Verified this works by popping several routes in AdsManager. Experimented with UIExplorer Navigator example to make sure popToRoute still works as expected
2015-05-01 18:11:13 -08:00
Eric Vicenti 28e6e993c6 [ReactNative] Navigator focus handler context fix 2015-05-01 17:01:58 -08:00
Spencer Ahrens 48b281de76 [ReactNative] Remove padding restriction on images
Summary:
@public
Padding actually works fine on images.

Test Plan: Nested text inside an image is properly positioned with padding on the image.
2015-05-01 16:44:52 -08:00
Eric Vicenti 5453be2ab2 [ReactNative] Fix touch issue caused by D2036644 after swiping back 2015-05-01 16:15:28 -08:00
Eric Vicenti 6abf37b47e [ReactNative] Navigator.Interceptor handler arg fix 2015-05-01 14:20:09 -08:00
Krzysztof Magiera 4bd56ca6d1 [react_native] JS files from D2038898: Move view specific constants out of UIManager to the cooresponding view manager class. 2015-05-01 07:06:51 -08:00
Nick Lockwood ba501a1bf5 Upgraded dev menu 2015-05-01 06:36:49 -08:00
Spencer Ahrens 6cb7178098 [ReactNative] Suggest un-pausing debugger when there are issues
Summary:
@public
The most common problem I've noticed is that the debugger is paused, so we
shouldn't ask the user if Chrome is open, because it usually is.

Test Plan: Try to reload with debugger paused, see new error message.
2015-04-30 17:20:39 -08:00
Eric Vicenti 76dc14684d [ReactNative] Navigator block touches to non-active scenes
Summary:
When tapping a link quickly, it will cause two scenes to be pushed on. This prevents against that case by swallowing touches for all non-active scenes.

@public

Test Plan: Can no longer double-push scenes
2015-04-30 15:49:37 -08:00
Philipp von Weitershausen e5f47731c6 [ReactNative] Only report console.error()s as exceptions in dev mode 2015-04-30 15:02:09 -08:00
Kevin Gozali 824da1bada [ReactNative] pass in launchOptions to relevant bridged modules 2015-04-30 14:51:09 -08:00
Ben Alpert 63ab6e8281 [react-native] Remove iOS-specific attributes from ART text 2015-04-30 13:23:16 -08:00
Ben Alpert 4f70e58b37 [react-native] Only intercept console.error on iOS 2015-04-30 12:06:47 -08:00
Andrei Coman 8fe6626d5f [react_native] JS files from D2028144: [react_native] Expose android version to JS 2015-04-30 11:42:14 -08:00
Nick Lockwood eb0476074f Improved debug and fixed macros 2015-04-30 09:59:16 -08:00
Ben Alpert 261a0af9bb [react-native] Fix Chrome debugging
Summary:
Requiring ExceptionsManager in renderApplication (added in D2023119) led to a transitive require of ExecutionEnvironment, which has to run after InitializeJavaScriptAppEngine.

InitializeJavaScriptAppEngine is the right place for this sort of logic because we control the order that things are loaded, so move the console.error hook initialization there.

@public

Test Plan: Loaded shell app in simulator with Chrome debugging with no errors.
2015-04-30 02:16:40 -08:00
Eric Vicenti 08ec846176 [ReactNative] Fix logic in popToRoute 2015-04-29 20:52:32 -08:00
Ben Alpert d8ab648fce Updates from Wed 29 Apr 2015-04-29 18:55:07 -07:00
Hedger Wang 4ac2fcc4a6 [madman][android]: unbreak android app. 2015-04-29 15:38:10 -08:00
Nick Lockwood 81e82d10ab Added missing features from Multiline Text commit 2015-04-29 15:27:15 -08:00
Ben Alpert c6af33e796 [react-native] Open-source ReactART for native 2015-04-29 15:21:48 -08:00
Andy Street 96850b7429 [react_native] JS files from D2027955: [react_native] Add bridge 'spy mode' to watch bridge traffic 2015-04-29 11:49:05 -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
Andy Street c82c6a07ae [react_native] JS files from D2027859: [react_native] Fix ToTheLeft wizard transitions 2015-04-29 04:49:43 -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
Eric Vicenti 349f8b942a [ReactNative] Avoid Navigator invariant in edge case
Summary:
It is very rare, but sometimes there is no active gesture when the responder gets released. This will avoid a redbox in that case

@public

Test Plan: Saw the redbox. No longer see the redbox. Hardcoded missing activeGesture while responder and verified no redbox
2015-04-28 23:53:39 -08:00
Spencer Ahrens ecf7baebea [React Native] Actually bring back console.error redboxes with disable flag 2015-04-28 14:53:36 -08:00
Eric Vicenti 9209c444c7 [ReactNative] Androidized Navigator animations
Summary:
Added configurations for android-like animations, with gestures disabled.

@public

Test Plan: Tested on AdsManager Android
2015-04-28 13:10:49 -08:00
Nick Lockwood 48297753cf Refactored RKSounds, moved it into it's own library, and fixed tests 2015-04-28 10:53:53 -08:00
Philipp von Weitershausen f2b38bacbf [ReactNative] parse localized JSON files in JS, not in ObjC 2015-04-28 09:52:35 -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
Eric Vicenti 8afdf30363 [ReactNative] Navigator refactor and improvements 2015-04-27 21:37:33 -08:00
Spencer Ahrens 473acdbc74 [ReactNative] Fix fatal from long press 2015-04-27 20:46:23 -08:00
Eric Vicenti ec3d70e738 [ReactNative] Quiet Navigator context warning 2015-04-27 17:31:12 -08:00
Eric Vicenti 6749f88650 [ReactNative] Fix Navigator resetTo 2015-04-27 17:18:52 -08:00
Gabe Levi b6e6dae6ba [Flow] Properly fix new errors as of Flow v0.10. 2015-04-27 14:56:21 -08:00
Ben Alpert dd56ccb9c7 [react-native] Fix capitalization of "REact" 2015-04-27 13:52:57 -08:00
Eric Vicenti 3f723f451d [ReactNative][RFC] Yellow Box for warnings 2015-04-27 13:32:22 -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
Tadeu Zagallo 136431cc2f [ReactNative] Fix struct args on exported methods 2015-04-27 04:01:37 -08:00
Gabe Levi 70c9f5140d Clean the errors that Flow v0.10.0 finds 2015-04-26 18:31:53 -04:00
Nick Lockwood 77e38b26c5 Improved RCTActivityIndicatorView and fixed some flow errors 2015-04-26 02:17:13 -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 68eb3e4906 [ReactNative] geolocation method docs 2015-04-24 16:26:28 -08:00
Spencer Ahrens a2dd7fc69f [ReactNative] Fix dimensions in jest tests 2015-04-24 14:00:35 -08:00
Spencer Ahrens 8465859411 Fix doc generation for Geolocation 2015-04-24 13:14:24 -07:00
Krzysztof Magiera 46db1826c5 [react_native] JS files from D2017699: Expose JavaScriptEnabled property for WebView component on android. 2015-04-24 11:53:35 -08:00
Spencer Ahrens 5225acea01 Fix tests 2015-04-24 12:15:11 -07:00
Alex Kotliarskyi 970bff6132 [ReactNative] Enable resolveAssetSource for Image.android 2015-04-24 10:56:04 -08:00
Spencer Ahrens 21b4b5b352 Updates from Fri 24 Apr 2015-04-24 11:46:18 -07:00
Kevin Gozali d094952725 [ReactNative] Re-applied D2011598 2015-04-24 10:33:41 -08:00
Andrei Coman a635a73abc [react_native] JS files from D2020585: [react_native] Remove focus for TextInputs when they unmount 2015-04-24 09:49:39 -08:00
Tadeu Zagallo d293bed5ab [ReactNative] Fix analyze errors on oss 2015-04-24 08:28:35 -08:00
Felix Oghina d354c7dd91 [react_native] JS files from D2009062: add geolocation support 2015-04-24 02:24:18 -08:00
Ben Alpert dd6f7743eb Fix updating RCTText with new text of the same size
Summary:
Fixes #979.

Previously, a Text whose width is determined automatically (as opposed to set by a container) would position the text incorrectly after an update to the text *if* the text's width did not change (i.e., when changing only digits in a font with tabular numbers).

Every time RCTShadowText's RCTMeasure runs, it sets the text container's size to be the maximum allowed size for the text. When RCTText's drawRect is called later, it relied on layoutSubviews having been called to set the text container's size back to the proper width. But if RCTMeasure returned the same dimensions as last time, then RCTText's frame wasn't reset and so layoutSubviews was never re-called. With this change, we set the textContainer's size each time we draw the text.

We could also fix this by using a different NSTextContainer instance in RCTMeasure. Not sure what the pros and cons of that are.
Closes https://github.com/facebook/react-native/pull/989
Github Author: Ben Alpert <balpert@fb.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-23 16:12:35 -08:00
Kevin Gozali ee3986342a [ReactNative][madman] Revert D2011598 temporarily 2015-04-23 15:12:01 -08:00
Eric Vicenti 36afc46274 [ReactNative] Fix for Navigator.replacePreviousAndPop 2015-04-23 14:19:44 -08:00
Philipp von Weitershausen e88ba1a6a3 [ReactNative] Back out D2014163 entirely 2015-04-23 12:02:47 -08:00
Bill Fisher 357a54500e Implement transform styles, redux 2015-04-23 10:17:39 -08:00
Alex Kotliarskyi 7de74b129d [ReactNative] Move NativeModules mock to OSS 2015-04-23 09:35:55 -08:00
Jakub Zika e293efbfb1 Bump .buckversion to 6cdb82cb7493a86c39d0f0dc3c102d0f470f55de. 2015-04-23 08:24:08 -08:00
Eduardo aa3d343547 NavigatorIOS custom nav bar colors
Summary:
NavigatorIOS with custom nav bar custom colors, working example included in
UIExplorer.

Based on pull request #318 to complete pending work based on comments.
Closes https://github.com/facebook/react-native/pull/695
Github Author: Eduardo <edo.lomeli@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-23 06:32:35 -08:00
Ivan Starkov a36da5130b Add Linear easing to AnimationUtils
Summary:
Simple linear easing also very useful.
Closes https://github.com/facebook/react-native/pull/794
Github Author: Ivan Starkov <istarkov@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-23 06:03:22 -08:00
Brent Vatne c219f61818 Add minimumTrackTintColor and maximumTrackTintColor to SliderIOS
Summary:
There are still many other props that can be added to further customize the SliderIOS component, but I had a specific need for these two so I just went ahead and added them.
Closes https://github.com/facebook/react-native/pull/799
Github Author: Brent Vatne <brent.vatne@madriska.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-23 05:57:15 -08:00
Dr. Kibitz 621a30c8b8 Fixes #813
Summary:
Also fix RCTShadowText export name.
Closes https://github.com/facebook/react-native/pull/857
Github Author: "Dr. Kibitz" <info@drkibitz.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-23 04:06:16 -08:00
Tadeu Zagallo 2bda21fbf0 [ReactNative] Flush ReactUpdates only once per batch 2015-04-22 17:57:07 -08:00
Alex Kotliarskyi ffb3026419 [ReactNative] Pick correct assets depending on device scale 2015-04-22 16:39:54 -08:00
Spencer Ahrens e63bfae8f6 [ReactNative] console.error shows RedBox with pretty stack trace 2015-04-22 15:51:41 -08:00
Alex Kotliarskyi c5ea25f7fb [ReactNative] Adopt client asset managing code to server changes 2015-04-22 13:41:28 -08:00
Nick Lockwood fc6e209223 Fixed broken struct arguments 2015-04-22 13:25:53 -08:00
Spencer Ahrens 0727cde42c [ReactNative] Quick fix to busted redboxes 2015-04-22 10:29:36 -08:00
Eric Vicenti 7aa413d619 [ReactNative] Fix Android back btn regression from D2010265 2015-04-22 10:06:10 -08:00
Andy Street eafe93096c [react_native] JS files from D2012956: [react_native] Never return null from XHR.getAllResponseHeaders if request has completed 2015-04-22 09:05:42 -08:00
Tadeu Zagallo 3595b79ec3 [ReactNative] Move VSync bound events to JS thread 2015-04-22 07:01:48 -08:00
Nick Lockwood 462224727a Reduced prop mapping overhead 2015-04-22 04:13:25 -08:00
Andy Street 0f7ebf23a9 [react_native] JS files from D1999034: [react_native] Fix source maps on Android 2015-04-22 03:38:55 -08:00
Spencer Ahrens 58a550fa06 [ReactNative] use requireNativeComponent to clean up a bunch of boilerplate 2015-04-21 21:06:48 -08:00
James Ide 901c24ebb8 [Text] Ensure that the text background is transparent by default
Summary:
For a very simple view I was observing that the text background was black and had to manually be set to transparent. This ensures that text nodes have a transparent background by default.

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

Test Plan:
 This example component no longer renders what looks like a black block, and instead displays legible text.

    var Example = React.createClass({
      render: function() {
          return (
            <View style={styles.container}>
              <Text>hello</Text>
            </View>
          );
      },
    });

    var styles = StyleSheet.create({
      container: {
        flex: 1,
      },
    };
2015-04-21 19:11:26 -08:00
Nick Lockwood b1a15004de Fixed release builds on UIExplorer 2015-04-21 18:22:34 -08:00
Josh Zana 368e507b38 Implement XmlHttpRequestBase#getAllResponseHeaders and getResponseHeader
Summary:
Used https://github.com/facebook/react-native/pull/382 as inspiration
but modified to return null instead of undefined as per the spec at
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest

This unblocks use of Dropbox.js within a react-native app, as well
as any other libraries that make use of these methods in XHR usage.

Closes https://github.com/facebook/react-native/issues/872
Closes https://github.com/facebook/react-native/pull/892
Github Author: Josh Zana <joshzana@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-21 16:45:32 -08:00
Mike Wilcox 17e5b04d1a Fix Typo
Summary:
* This PR fixes a typo for the NetInfo docs page
Closes https://github.com/facebook/react-native/pull/937
Github Author: Mike Wilcox <mwilcox56@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-21 16:41:34 -08:00
xcatliu 404f7d9dbf Fix AlertIOS Docs
Summary:
The curly braces seems to be redundant.
Closes https://github.com/facebook/react-native/pull/811
Github Author: xcatliu <xcatliu@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-21 16:10:31 -08:00
Nick Lockwood 2ee7ebae1f Fixed broken font weight on iPhone 5 2015-04-21 14:45:12 -08:00
Eric Vicenti 40eeaf5b37 [ReactNative] Navigator contextual popToRoute and imperitive vs contextual docs 2015-04-21 13:27:44 -08:00
Alex Kotliarskyi c6ad7b85d1 [ReactNative] Use network image for new image assets 2015-04-21 12:45:36 -08:00
Martin Konicek c0c2d4ca00 [react_native] JS files from D2009265: Fix resizeMode for images 2015-04-21 12:04:32 -08:00
Eric Vicenti 45c10ffc53 [ReactNative] Navigator touch grant bug from D2001635 2015-04-21 11:26:53 -08:00
Nick Lockwood ee898c24c7 Removed debug code from release builds 2015-04-21 09:47:21 -08:00
Philipp von Weitershausen 25ae5485da [ReactNative][MAdMan] helper for GraphQL-safe pixel size calculation 2015-04-21 08:21:52 -08:00
Philipp von Weitershausen a0db658982 [MAdMan] flowify AdsManagerGeoUtils 2015-04-21 08:11:30 -08:00
Andy Street b0348edcae [react_native] JS files from D2001635: [react_native] Use hardware layers during adsmanager Navigator navigation 2015-04-21 04:10:52 -08:00
Lochlan Wansbrough 765779a4bd Adds `opaque` and `underlayColor` to WebView.
Summary:
Enables overwriting of underlying colors for WebViews. Especially useful if you want to give your WebView a transparent background.
Closes https://github.com/facebook/react-native/pull/767
Github Author: Lochlan Wansbrough <lochie@live.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-20 18:11:37 -08:00
Alex Kotliarskyi a8a1798449 [ReactNative] Fix Chrome debugger 2015-04-20 14:37:24 -08:00
Nick Lockwood 5ce9fa4dda Changed default method queue to a background queue. 2015-04-20 12:02:04 -08:00
Nick Lockwood bbd5259586 Fixed reachability 2015-04-20 08:33:56 -08:00
Andy Street fde476f4e5 [react_native] JS files from D2001617: [react_native] Add support for rendering to hardware textures on Android 2015-04-20 03:10:56 -08:00
Tadeu Zagallo 0e67e33534 [ReactNative] Ensure JS calls scheduled by a deallocated context don't fire 2015-04-20 02:03:22 -08:00
Nick Lockwood 0b21df4a34 Improved logging and dev menu 2015-04-19 12:56:22 -08:00
Brent Vatne ebdc041b4f [Docs] Clarify schema support for LinkingIOS.openURL in Simulator 2015-04-18 16:32:01 -07:00