Skip to content

Commit e81e29f

Browse files
committed
Merge pull request #1735 from frantic/updates-24-jun
Updates from Thu, 25 June
2 parents 36cda56 + cfe13f2 commit e81e29f

178 files changed

Lines changed: 9335 additions & 5523 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.flowconfig

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ suppress_type=$FlowIssue
4040
suppress_type=$FlowFixMe
4141
suppress_type=$FixMe
4242

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

4647
[version]
4748
0.12.0

Examples/Movies/SearchScreen.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,14 @@ var SearchScreen = React.createClass({
7777
var apiKey = API_KEYS[this.state.queryNumber % API_KEYS.length];
7878
if (query) {
7979
return (
80+
// $FlowFixMe(>=0.13.0) - pageNumber may be null or undefined
8081
API_URL + 'movies.json?apikey=' + apiKey + '&q=' +
8182
encodeURIComponent(query) + '&page_limit=20&page=' + pageNumber
8283
);
8384
} else {
8485
// With no query, load latest movies
8586
return (
87+
// $FlowFixMe(>=0.13.0) - pageNumber may be null or undefined
8688
API_URL + 'lists/movies/in_theaters.json?apikey=' + apiKey +
8789
'&page_limit=20&page=' + pageNumber
8890
);

Examples/SampleApp/SampleApp.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@
600600
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
601601
"$(SRCROOT)/../../React/**",
602602
);
603-
INFOPLIST_FILE = "$(SRCROOT)/iOS/Info.plist";
603+
INFOPLIST_FILE = "iOS/Info.plist";
604604
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
605605
OTHER_LDFLAGS = "-ObjC";
606606
PRODUCT_NAME = SampleApp;
@@ -616,7 +616,7 @@
616616
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
617617
"$(SRCROOT)/../../React/**",
618618
);
619-
INFOPLIST_FILE = "$(SRCROOT)/iOS/Info.plist";
619+
INFOPLIST_FILE = "iOS/Info.plist";
620620
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
621621
OTHER_LDFLAGS = "-ObjC";
622622
PRODUCT_NAME = SampleApp;

Examples/UIExplorer/DatePickerIOSExample.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ var Heading = React.createClass({
125125
}
126126
});
127127

128+
exports.displayName = (undefined: ?string);
128129
exports.title = '<DatePickerIOS>';
129130
exports.description = 'Select dates and times using the native UIDatePicker.';
130131
exports.examples = [

Examples/UIExplorer/ImageExample.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ var {
2525

2626
var ImageCapInsetsExample = require('./ImageCapInsetsExample');
2727

28+
exports.displayName = (undefined: ?string);
2829
exports.framework = 'React';
2930
exports.title = '<Image>';
3031
exports.description = 'Base component for displaying different types of images.';

Examples/UIExplorer/MapViewExample.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ var styles = StyleSheet.create({
236236
},
237237
});
238238

239+
exports.displayName = (undefined: ?string);
239240
exports.title = '<MapView>';
240241
exports.description = 'Base component to display maps';
241242
exports.examples = [

Examples/UIExplorer/Navigator/NavigationBarSample.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,31 @@ function newRandomRoute() {
9292

9393
var NavigationBarSample = React.createClass({
9494

95+
componentWillMount: function() {
96+
var navigator = this.props.navigator;
97+
98+
var callback = (event) => {
99+
console.log(
100+
`NavigationBarSample : event ${event.type}`,
101+
{
102+
route: JSON.stringify(event.data.route),
103+
target: event.target,
104+
type: event.type,
105+
}
106+
);
107+
};
108+
109+
// Observe focus change events from this component.
110+
this._listeners = [
111+
navigator.navigationContext.addListener('willfocus', callback),
112+
navigator.navigationContext.addListener('didfocus', callback),
113+
];
114+
},
115+
116+
componentWillUnmount: function() {
117+
this._listeners && this._listeners.forEach(listener => listener.remove());
118+
},
119+
95120
render: function() {
96121
return (
97122
<Navigator

Examples/UIExplorer/Navigator/NavigatorExample.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ var TabBarExample = React.createClass({
132132
render: function() {
133133
return (
134134
<Navigator
135+
ref={this._setNavigatorRef}
135136
style={styles.container}
136137
initialRoute={{ message: "First Scene", }}
137138
renderScene={this.renderScene}
@@ -145,6 +146,34 @@ var TabBarExample = React.createClass({
145146
);
146147
},
147148

149+
150+
componentWillUnmount: function() {
151+
this._listeners && this._listeners.forEach(listener => listener.remove());
152+
},
153+
154+
_setNavigatorRef: function(navigator) {
155+
if (navigator !== this._navigator) {
156+
this._navigator = navigator;
157+
158+
if (navigator) {
159+
var callback = (event) => {
160+
console.log(
161+
`TabBarExample: event ${event.type}`,
162+
{
163+
route: JSON.stringify(event.data.route),
164+
target: event.target,
165+
type: event.type,
166+
}
167+
);
168+
};
169+
// Observe focus change events from the owner.
170+
this._listeners = [
171+
navigator.navigationContext.addListener('willfocus', callback),
172+
navigator.navigationContext.addListener('didfocus', callback),
173+
];
174+
}
175+
}
176+
},
148177
});
149178

150179
var styles = StyleSheet.create({

Examples/UIExplorer/PickerIOSExample.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ var PickerExample = React.createClass({
112112
},
113113
});
114114

115+
exports.displayName = (undefined: ?string);
115116
exports.title = '<PickerIOS>';
116117
exports.description = 'Render lists of selectable options with UIPickerView.';
117118
exports.examples = [

Examples/UIExplorer/ProgressViewIOSExample.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ var ProgressViewExample = React.createClass({
6060
},
6161
});
6262

63+
exports.displayName = (undefined: ?string);
6364
exports.framework = 'React';
6465
exports.title = 'ProgressViewIOS';
6566
exports.description = 'ProgressViewIOS';

0 commit comments

Comments
 (0)