Skip to content

Commit

Permalink
Merge pull request #1 from facebook/master
Browse files Browse the repository at this point in the history
Updating fork
  • Loading branch information
Edoardo Moreni committed Nov 9, 2015
2 parents ea4ea90 + b12117a commit 49df1cb
Show file tree
Hide file tree
Showing 493 changed files with 10,552 additions and 5,799 deletions.
25 changes: 16 additions & 9 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,19 @@
# Some modules have their own node_modules with overlap
.*/node_modules/node-haste/.*

# Ignore react-tools where there are overlaps, but don't ignore anything that
# react-native relies on
.*/node_modules/react-tools/src/React.js
.*/node_modules/react-tools/src/renderers/shared/event/EventPropagators.js
.*/node_modules/react-tools/src/renderers/shared/event/eventPlugins/ResponderEventPlugin.js
.*/node_modules/react-tools/src/shared/vendor/core/ExecutionEnvironment.js
# Ignore react and fbjs where there are overlaps, but don't ignore
# anything that react-native relies on
.*/node_modules/fbjs-haste/.*/__tests__/.*
.*/node_modules/fbjs-haste/__forks__/Map.js
.*/node_modules/fbjs-haste/__forks__/Promise.js
.*/node_modules/fbjs-haste/__forks__/fetch.js
.*/node_modules/fbjs-haste/core/ExecutionEnvironment.js
.*/node_modules/fbjs-haste/core/isEmpty.js
.*/node_modules/fbjs-haste/crypto/crc32.js
.*/node_modules/fbjs-haste/stubs/ErrorUtils.js
.*/node_modules/react-haste/React.js
.*/node_modules/react-haste/renderers/dom/ReactDOM.js
.*/node_modules/react-haste/renderers/shared/event/eventPlugins/ResponderEventPlugin.js

# Ignore commoner tests
.*/node_modules/commoner/test/.*
Expand Down Expand Up @@ -43,9 +50,9 @@ suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FixMe

suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(1[0-7]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(1[0-7]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(1[0-8]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(1[0-8]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy

[version]
0.17.0
0.18.1
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,4 @@ env:
branches:
only:
- master
- /^.*-stable$/
2 changes: 1 addition & 1 deletion Examples/2048/2048/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
launchOptions:launchOptions];

self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [[UIViewController alloc] init];
UIViewController *rootViewController = [UIViewController new];
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
Expand Down
2 changes: 1 addition & 1 deletion Examples/Movies/Movies/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
launchOptions:launchOptions];

self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [[UIViewController alloc] init];
UIViewController *rootViewController = [UIViewController new];
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ protected void onResume() {
super.onResume();

if (mReactInstanceManager != null) {
mReactInstanceManager.onResume(this);
mReactInstanceManager.onResume(this, this);
}
}

Expand Down
2 changes: 1 addition & 1 deletion Examples/TicTacToe/TicTacToe/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
launchOptions:launchOptions];

self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [[UIViewController alloc] init];
UIViewController *rootViewController = [UIViewController new];
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
Expand Down
8 changes: 4 additions & 4 deletions Examples/UIExplorer/ActionSheetIOSExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ var {
} = React;

var BUTTONS = [
'Button Index: 0',
'Button Index: 1',
'Button Index: 2',
'Option 0',
'Option 1',
'Option 2',
'Destruct',
'Cancel',
];
Expand All @@ -47,7 +47,7 @@ var ActionSheetExample = React.createClass({
Click to show the ActionSheet
</Text>
<Text>
Clicked button at index: "{this.state.clicked}"
Clicked button: {this.state.clicked}
</Text>
</View>
);
Expand Down
8 changes: 4 additions & 4 deletions Examples/UIExplorer/AlertIOSExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class PromptExample extends React.Component {

<TouchableHighlight
style={styles.wrapper}
onPress={this.prompt.bind(this, this.title, this.promptResponse)}>
onPress={this.prompt.bind(this, this.title, null, null, this.promptResponse)}>

<View style={styles.button}>
<Text>
Expand All @@ -143,7 +143,7 @@ class PromptExample extends React.Component {

<TouchableHighlight
style={styles.wrapper}
onPress={this.prompt.bind(this, this.title, this.buttons)}>
onPress={this.prompt.bind(this, this.title, null, this.buttons, null)}>

<View style={styles.button}>
<Text>
Expand All @@ -154,7 +154,7 @@ class PromptExample extends React.Component {

<TouchableHighlight
style={styles.wrapper}
onPress={this.prompt.bind(this, this.title, this.defaultValue, this.promptResponse)}>
onPress={this.prompt.bind(this, this.title, this.defaultValue, null, this.promptResponse)}>

<View style={styles.button}>
<Text>
Expand All @@ -165,7 +165,7 @@ class PromptExample extends React.Component {

<TouchableHighlight
style={styles.wrapper}
onPress={this.prompt.bind(this, this.title, this.defaultValue, this.buttons)}>
onPress={this.prompt.bind(this, this.title, this.defaultValue, this.buttons, null)}>

<View style={styles.button}>
<Text>
Expand Down
21 changes: 21 additions & 0 deletions Examples/UIExplorer/BorderExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@ var styles = StyleSheet.create({
width: 100,
height: 100
},
border8: {
width: 60,
height: 60,
borderColor: 'black',
marginRight: 10,
backgroundColor: 'lightgrey',
},
});

exports.title = 'Border';
Expand Down Expand Up @@ -159,4 +166,18 @@ exports.examples = [
);
}
},
{
title: 'Single Borders',
description: 'top, left, bottom right',
render() {
return (
<View style={{flexDirection: 'row'}}>
<View style={[styles.box, styles.border8, {borderTopWidth: 5}]} />
<View style={[styles.box, styles.border8, {borderLeftWidth: 5}]} />
<View style={[styles.box, styles.border8, {borderBottomWidth: 5}]} />
<View style={[styles.box, styles.border8, {borderRightWidth: 5}]} />
</View>
);
}
},
];
2 changes: 2 additions & 0 deletions Examples/UIExplorer/ModalExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ var styles = StyleSheet.create({
},
innerContainer: {
borderRadius: 10,
alignItems: 'center',
},
row: {
alignItems: 'center',
Expand All @@ -158,6 +159,7 @@ var styles = StyleSheet.create({
borderRadius: 5,
flex: 1,
height: 44,
alignSelf: 'stretch',
justifyContent: 'center',
overflow: 'hidden',
},
Expand Down
45 changes: 45 additions & 0 deletions Examples/UIExplorer/ProgressBarAndroidExample.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,31 @@ var React = require('React');
var UIExplorerBlock = require('UIExplorerBlock');
var UIExplorerPage = require('UIExplorerPage');

var TimerMixin = require('react-timer-mixin');

var MovingBar = React.createClass({
mixins: [TimerMixin],

getInitialState: function() {
return {
progress: 0
};
},

componentDidMount: function() {
this.setInterval(
() => {
var progress = (this.state.progress + 0.02) % 1;
this.setState({progress: progress});
}, 50
);
},

render: function() {
return <ProgressBar progress={this.state.progress} {...this.props} />;
},
});

var ProgressBarAndroidExample = React.createClass({

statics: {
Expand Down Expand Up @@ -54,6 +79,26 @@ var ProgressBarAndroidExample = React.createClass({
<UIExplorerBlock title="Large Inverse ProgressBar">
<ProgressBar styleAttr="LargeInverse" />
</UIExplorerBlock>

<UIExplorerBlock title="Horizontal Indeterminate ProgressBar">
<ProgressBar styleAttr="Horizontal" />
</UIExplorerBlock>

<UIExplorerBlock title="Horizontal ProgressBar">
<MovingBar styleAttr="Horizontal" indeterminate={false} />
</UIExplorerBlock>

<UIExplorerBlock title="Large Red ProgressBar">
<ProgressBar styleAttr="Large" color="red" />
</UIExplorerBlock>

<UIExplorerBlock title="Horizontal Black Indeterminate ProgressBar">
<ProgressBar styleAttr="Horizontal" color="black" />
</UIExplorerBlock>

<UIExplorerBlock title="Horizontal Blue ProgressBar">
<MovingBar styleAttr="Horizontal" indeterminate={false} color="blue" />
</UIExplorerBlock>
</UIExplorerPage>
);
},
Expand Down
25 changes: 22 additions & 3 deletions Examples/UIExplorer/SliderIOSExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var SliderExample = React.createClass({
{this.state.value}
</Text>
<SliderIOS
style={styles.slider}
{...this.props}
onValueChange={(value) => this.setState({value: value})} />
</View>
);
Expand All @@ -62,7 +62,26 @@ exports.displayName = 'SliderExample';
exports.description = 'Slider input for numeric values';
exports.examples = [
{
title: 'SliderIOS',
render(): ReactElement { return <SliderExample />; }
title: 'Default settings',
render(): ReactElement {
return <SliderExample />;
}
},
{
title: 'minimumValue: -1, maximumValue: 2',
render(): ReactElement {
return (
<SliderExample
minimumValue={-1}
maximumValue={2}
/>
);
}
},
{
title: 'step: 0.25',
render(): ReactElement {
return <SliderExample step={0.25} />;
}
}
];
16 changes: 16 additions & 0 deletions Examples/UIExplorer/TextExample.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,22 @@ var TextExample = React.createClass({
</View>
</View>
</UIExplorerBlock>
<UIExplorerBlock title="Custom Fonts">
<View style={{flexDirection: 'row', alignItems: 'flex-start'}}>
<View style={{flex: 1}}>
<Text style={{fontFamily: 'notoserif'}}>
NotoSerif Regular
</Text>
<Text style={{fontFamily: 'notoserif', fontStyle: 'italic', fontWeight: 'bold'}}>
NotoSerif Bold Italic
</Text>
<Text style={{fontFamily: 'notoserif', fontStyle: 'italic'}}>
NotoSerif Italic (Missing Font file)
</Text>
</View>
</View>
</UIExplorerBlock>

<UIExplorerBlock title="Font Size">
<Text style={{fontSize: 23}}>
Size 23
Expand Down
15 changes: 15 additions & 0 deletions Examples/UIExplorer/TextExample.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,21 @@ exports.examples = [
</Text>
)
</Text>
<Text style={{opacity:0.7}}>
(opacity
<Text>
(is inherited
<Text style={{opacity:0.7}}>
(and accumulated
<Text style={{backgroundColor:'#ffaaaa'}}>
(and also applies to the background)
</Text>
)
</Text>
)
</Text>
)
</Text>
<Text style={{fontSize: 12}}>
<Entity>Entity Name</Entity>
</Text>
Expand Down
Loading

0 comments on commit 49df1cb

Please sign in to comment.