2144 Commits

Author SHA1 Message Date
Vladislav Alexeev
be2cabc3f8 Dynamic Text Sizes for Text component
Summary:
Dynamic Text Sizes for Text component.
Text gains new prop - allowFontScaling (true by default).
There is also AccessibilityManager module that allows you to tune multipliers per each content size category, but predefined multipliers are there.
This could potentially break some apps so please test carefully.
2015-07-14 03:13:32 -08:00
Alex Akers
eb06659711 [React Native] Update code comments about layout-only view 2015-07-14 02:52:45 -08:00
Isken Huang
6357931b61 add cli bundle url params 2015-07-14 10:40:39 +08:00
Nathan Spaun
875ab073ea [Treehouse] Sync from android permalink keyboard layout changes 2015-07-13 18:29:54 -08:00
Spencer Ahrens
0d153562be Merge pull request #1978 from sahrens/Updates_for_Mon_July_13th
Updates for mon july 13th
2015-07-14 02:18:18 +02:00
Spencer Ahrens
31b63ade13 Updates_for_Mon_July_13th 2015-07-14 00:27:24 +02:00
Spencer Ahrens
509e9c96e2 [ReactNative] Disable flaky Layout only node scenario tests 2015-07-13 14:20:10 -08:00
Param Aggarwal
e1ce646275 Stray import statement - RCTTouchHandler
Summary:
Closes https://github.com/facebook/react-native/pull/1970
Github Author: Param Aggarwal <paramaggarwal@gmail.com>
2015-07-13 12:47:18 -08:00
Spencer Ahrens
e5f7200213 [ReactNative] Fix crash in ListView 2015-07-13 12:36:56 -08:00
James Ide
9f07b9a2b6 [ListView] Operate on the true scroll responder instead of the scroll component
Summary:
When composing scroll views, `this.refs[SCROLLVIEW_REF]` may refer to another higher-order scroll component instead of a ScrollView. This can cause issues if you expect to need it to be a ScrollView backed by an RCTScrollView.

The solution is to call `getScrollResponder()` - as long as all higher-order scroll components implement this method, it will make its way down to the true ScrollView, which is what ListView wants here.

Closes https://github.com/facebook/react-native/pull/1927
Github Author: James Ide <ide@jameside.com>
2015-07-13 12:36:55 -08:00
James Ide
d5943b0e47 [Image] Add support for tintColor to remote images
Summary:
Remote images now support the `tintColor` prop.

Also picked nicer demo colors for the UIExplorer example.

Fixes #1867

Closes https://github.com/facebook/react-native/pull/1932
Github Author: James Ide <ide@jameside.com>
2015-07-13 10:36:32 -08:00
Nick Lockwood
90dd7a13f0 Added support for URLs pointing to files inside application home 2015-07-13 10:34:48 -08:00
Alex Kotliarskyi
d1b14ef062 [React Native] Log to ASL
Summary:
By default we were just writing all log messages to stderr. This also
adds support for [Apple System Log](https://developer.apple.com/library/ios/documentation/System/Conceptual/ManPages_iPhoneOS/man3/asl_log.3.html) that
can be viewed using standard tools.
2015-07-13 09:52:16 -08:00
Krzysztof Magiera
47315af069 [ReactNative] Fix SPY_MODE to show all JS->N communication. 2015-07-13 09:43:04 -08:00
Nick Lockwood
01151f8c7a Added LRU cache to fix out of memory issues with color caching 2015-07-13 08:50:00 -08:00
Alex Akers
4beef5bec3 [React Native] Re-enable testScenario{1,2}
Summary:
The tests are passing locally. Not sure why they weren't passing on FB CI.
2015-07-13 07:16:52 -08:00
Spencer Ahrens
9c4b9973f9 [ReactNative] add _flowconfig and _gitignore to SampleApp 2015-07-13 06:39:18 -08:00
Sam Mueller
f732e46581 Clarify docs to use animated over react-tween-state & rebound 2015-07-10 14:04:45 -07:00
Hedger Wang
2cbcfcea88 [Android][JS]: supports prop "html" in WebView 2015-07-10 12:33:16 -08:00
Jared Forsyth
2b916f3cef Merge pull request #1947 from jaredly/Hotfix_Fri_10_July
Hotfix fri 10 july
2015-07-10 13:19:50 -07:00
Jared Forsyth
98a00f4840 Hotfix from Fri 10 July 2015-07-10 13:01:05 -07:00
Jared Forsyth
b54594e42b [react native] fix inspector touch bug 2015-07-10 11:53:23 -08:00
Nick Lockwood
f6d058dfea Merge pull request #1943 from nicklockwood/update_fri_10_jul
Updates for Friday 10th July
2015-07-10 18:07:28 +01:00
Nick Lockwood
7fa08e5c3f Updates for Fri 10 Jul 2015-07-10 17:48:12 +01:00
Nick Lockwood
9229eadff0 Fixed ART Text
Summary:
ART text was crashing due to a bug in the release logic.
2015-07-10 08:31:21 -08:00
Nick Lockwood
4f464962a0 Added missing semver dependency 2015-07-10 07:34:44 -08:00
Alexsander Akers
ea959af850 [React Native] Fix test failures 2015-07-10 06:56:50 -08:00
Alexsander Akers
72b50dc32d [React Native] Update image downloader
Summary:
Change `RCTImageDownloader` so it stores the `RCTDownloadTaskWrapper` for reuse. Modify `RCTDownloadTaskWrapper` to use associated objects to store the completion/progress blocks.
2015-07-10 06:34:22 -08:00
Dmitriy Loktev
8e70c7f003 [Image] Add onLoadStart, onLoadProgress, onLoadError events to Image component
Summary:
This PR adds 4 native events to NetworkImage.

![demo](http://zippy.gfycat.com/MelodicLawfulCaecilian.gif)

Using these events I could wrap `Image` component into something like:
```javascript
class NetworkImage extends React.Component {
  getInitialState() {
    return {
      downloading: false,
      progress: 0
    }
  }

  render() {
    var loader = this.state.downloading ?
      <View style={this.props.loaderStyles}>
        <ActivityIndicatorIOS animating={true} size={'large'} />
        <Text style={{color: '#bbb'}}>{this.state.progress}%</Text>
      </View>
      :
      null;

    return <Image source={this.props.source}
      onLoadStart={() => this.setState({downloading: true}) }
      onLoaded={() => this.setState({downloading: false}) }
      onLoadProgress={(e)=> this.setState({progress: Math.round(100 * e.nativeEvent.written / e.nativeEvent.total)});
      onLoadError={(e)=> {
        alert('the image cannot be downloaded because: ', JSON.stringify(e));
        this.setState({downloading: false});
      }}>
      {loader}
    </Image>
  }
}
```
Useful on slow connections and server errors.

There are dozen lines of Objective C, which I don't have experience with. There are neither specific tests nor documentation yet. And I do realize that you're already working right now on better `<Image/>` (pipeline, new asset management, etc.). So this is basically a proof concept of events for images, and if this idea is not completely wrong I could improve it or help somehow.

Closes https://github.com/facebook/react-native/pull/1318
Github Author: Dmitriy Loktev <unknownliveid@hotmail.com>
2015-07-10 06:34:21 -08:00
Kostiantyn Koval
54c21ac651 add NSSet type to RCTConvert
Summary:
Add support for NSSet type
Closes https://github.com/facebook/react-native/pull/1938
Github Author: Kostiantyn Koval <konstantin.koval1@gmail.com>
2015-07-10 04:19:05 -08:00
Alex Akers
ffaf16283f [React Native] Add new E2E tests 2015-07-10 04:12:28 -08:00
James Ide
40a043109d [io.js] Print a warning message if the user is not on io.js 2.x
Summary:
Detects if the user is on Node or io.js 1.x and prints a banner explaining how to upgrade. We probably should link to more detailed upgrade docs so this is just a start.

I also added a function to format banners that is kind of useful.

Addresses part of #1737

![packager-banner](https://cloud.githubusercontent.com/assets/379606/8447050/ad615402-1f67-11e5-8c02-ece5f7488135.png)

Closes https://github.com/facebook/react-native/pull/1824
Github Author: James Ide <ide@jameside.com>
2015-07-10 00:32:46 -08:00
Brent Vatne
86c815f1d4 Merge pull request #1930 from kphed/master
Minor grammatical fixes to EmbeddedApp.md
2015-07-09 20:42:35 -07:00
Khoa Phan
572157d14b Minor grammatical fixes:
1. 'Install' should be 'installed' (past tense)
2. Change 'checkout' to 'check out'
2015-07-09 19:48:25 -07:00
LYK
fc059857e2 [Text] Get the system font instead of Helvetica programmatically and add a virtual fontName called "System"
Summary:
Get the system font instead of Helvetica programmatically and add a virtual fontName called "System" that defaults to whatever the current system font is.
#1611
Closes https://github.com/facebook/react-native/pull/1635
Github Author: LYK <dalinaum@gmail.com>
2015-07-09 15:48:49 -08:00
Peter Zich
10bb054b62 [react-native] Typo fix (s/monolithically/monotonically/) 2015-07-09 14:40:50 -08:00
Matthew Arbesfeld
23909cd6f6 [Image] Support loading images from application home directory.
Summary:
Image source uri's prefixed with ~ are expanded into a full path to
the app directory.

For example: `~/Documents/foo.png` is expanded into `Users/arbesfeld/Library/Developer/CoreSimulator/Devices/977988DF-A8BC-4CE5-A27A-75807A6DF085/data/Containers/Data/Application/CBEFC261-5900-4EF9-8646-603BC57B094A/Documents/foo.png`.

This lets us store and use images from the application home directory with the `Image` component:

```
<Image source={{uri: '~/Documents/foo.png', width: 300, height: 300}} />
```

Resolves #1178
Closes https://github.com/facebook/react-native/pull/1740
Github Author: Matthew Arbesfeld <arbesfeld@gmail.com>
2015-07-09 12:58:26 -08:00
Olivier Notteghem
e1f53c043c Restore SPY mode to sniff traffic across bridge 2015-07-09 09:23:27 -08:00
Tadeu Zagallo
1419941f8e [ReactNative] Log with RCTPerformanceLogger only once per bridge instance
Summary:
Fixes #1809

Even if a bridge has more than one root view, it's not supported by the js side
right now, and it will keep warning that those timespans had already been
recorded.
2015-07-09 07:35:16 -08:00
Spencer Ahrens
8a5fa6cb3a Merge pull request #1899 from sahrens/AnimatedDocs
Add new Animated API to animation docs.
2015-07-09 14:48:28 +02:00
Spencer Ahrens
bda7f7389a Add new Animated API to animation docs. 2015-07-09 14:47:47 +02:00
Spencer Ahrens
a2578fed3c Merge pull request #1900 from sahrens/Update_Tue_Jul_7_Animated
Updates from Tue July 7 and Wed July 8th - includes new Animated API
2015-07-09 14:22:51 +02:00
Spencer Ahrens
233f80d6c2 Fix tests
e2e flowconfig needed update, plus tweaks
2015-07-09 14:12:56 +02:00
Spencer Ahrens
7ce8cd7222 Updates Tue July 7th and Wed July 8th including Animated 2015-07-09 12:59:47 +02:00
Spencer Ahrens
fd2cb763df [ReactNative] add immutable dependency for NavigationRouteStack 2015-07-09 02:53:02 -08:00
Spencer Ahrens
04fe80b7a0 [ReactNative] Export Easing module so folks can use it 2015-07-09 02:44:13 -08:00
Spencer Ahrens
7d4b1877ae [RN] add Animated test for spring tracking 2015-07-09 01:59:49 -08:00
Krzysztof Magiera
9b162d7659 [ReactNative] Add support for onLayout View property. 2015-07-09 00:56:09 -08:00
Hedger Wang
21b98b23c9 [Navigator] Introducing NavigationRouteStack.
Summary:
Introducing the data structure NavigationRouteStack that focused on managing
navigation routes stack.

The goal is to make <Navigatior /> thinner by moving stack management logic into
its own class and make sure it's well-tested.

Teh next step will be cleaning up <Navigatior /> and add `NavigationRouteStack` to
`NavigationContext`.
2015-07-08 16:58:11 -08:00
Jarrod Mosen
bb07817023 Update SegmentedControlIOSExample.js
Summary:
`event.nativeEvent` now uses `selectedSegmentIndex`, not `selectedIndex`.
Closes https://github.com/facebook/react-native/pull/1872
Github Author: Jarrod Mosen <jarrod.mosen@me.com>
2015-07-08 12:52:04 -08:00