Skip to content

Commit 9a4ee17

Browse files
committed
Updates from Mon 30 Mar
- [ReactNative] Clean up no longer needed reference to NavigationBarClass | Philipp von Weitershausen - [TextInput] returnKeyType, enablesReturnKeyAutomatically, secureTextEntry, more keyboardTypes | Tadeu Zagallo - [ReactNative] PropTypes for NavigationBars | Philipp von Weitershausen - Changed LayoutAnimation to use ms instead of seconds for consistency | Nick Lockwood - Better date support | Nick Lockwood - Renamed throttleScrollCallbackMS to scrollEventThrottle | Nick Lockwood - Fixed threading issues in RCTImageDownloader | Nick Lockwood - [iOS][Assets]: Cleaning up more 1x png from Libraries | Radu Marin - [ReactNative][docs] LinkingIOS | Tadeu Zagallo - Fixing TouchableOpacity and TouchableHighlight documentation | Ben Alpert - [react-native] Add React.addons.createFragment | Ben Alpert
1 parent 02298b5 commit 9a4ee17

File tree

49 files changed

+906
-290
lines changed

Some content is hidden

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

49 files changed

+906
-290
lines changed

Examples/Movies/SearchScreen.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,16 @@ var MovieScreen = require('./MovieScreen');
3131

3232
var fetch = require('fetch');
3333

34+
/**
35+
* This is for demo purposes only, and rate limited.
36+
* In case you want to use the Rotten Tomatoes' API on a real app you should
37+
* create an account at http://developer.rottentomatoes.com/
38+
*/
3439
var API_URL = 'http://api.rottentomatoes.com/api/public/v1.0/';
35-
var API_KEYS = ['7waqfqbprs7pajbz28mqf6vz', 'y4vwv8m33hed9ety83jmv52f'];
40+
var API_KEYS = [
41+
'7waqfqbprs7pajbz28mqf6vz',
42+
// 'y4vwv8m33hed9ety83jmv52f', Fallback api_key
43+
];
3644

3745
// Results should be cached keyed by the query
3846
// with values of null meaning "being fetched"

Examples/SampleApp/SampleApp.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
/* Begin PBXBuildFile section */
1010
00481BE81AC0C86700671115 /* libRCTWebSocketDebugger.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00481BE61AC0C7FA00671115 /* libRCTWebSocketDebugger.a */; };
1111
00481BEA1AC0C89D00671115 /* libicucore.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 00481BE91AC0C89D00671115 /* libicucore.dylib */; };
12+
008F07F31AC5B25A0029DE68 /* main.jsbundle in Resources */ = {isa = PBXBuildFile; fileRef = 008F07F21AC5B25A0029DE68 /* main.jsbundle */; };
1213
00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; };
1314
00C302E61ABCBA2D00DB3ED1 /* libRCTAdSupport.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302B41ABCB8E700DB3ED1 /* libRCTAdSupport.a */; };
1415
00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; };
@@ -92,6 +93,7 @@
9293
/* Begin PBXFileReference section */
9394
00481BDB1AC0C7FA00671115 /* RCTWebSocketDebugger.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocketDebugger.xcodeproj; path = ../../Libraries/RCTWebSocketDebugger/RCTWebSocketDebugger.xcodeproj; sourceTree = "<group>"; };
9495
00481BE91AC0C89D00671115 /* libicucore.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libicucore.dylib; path = usr/lib/libicucore.dylib; sourceTree = SDKROOT; };
96+
008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = main.jsbundle; path = iOS/main.jsbundle; sourceTree = "<group>"; };
9597
00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = ../../Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj; sourceTree = "<group>"; };
9698
00C302AF1ABCB8E700DB3ED1 /* RCTAdSupport.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAdSupport.xcodeproj; path = ../../Libraries/AdSupport/RCTAdSupport.xcodeproj; sourceTree = "<group>"; };
9799
00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = ../../Libraries/Geolocation/RCTGeolocation.xcodeproj; sourceTree = "<group>"; };
@@ -189,6 +191,7 @@
189191
13B07FAE1A68108700A75B9A /* SampleApp */ = {
190192
isa = PBXGroup;
191193
children = (
194+
008F07F21AC5B25A0029DE68 /* main.jsbundle */,
192195
13B07FAF1A68108700A75B9A /* AppDelegate.h */,
193196
13B07FB01A68108700A75B9A /* AppDelegate.m */,
194197
13B07FB51A68108700A75B9A /* Images.xcassets */,
@@ -405,6 +408,7 @@
405408
isa = PBXResourcesBuildPhase;
406409
buildActionMask = 2147483647;
407410
files = (
411+
008F07F31AC5B25A0029DE68 /* main.jsbundle in Resources */,
408412
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
409413
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
410414
);

Examples/SampleApp/iOS/AppDelegate.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
3131
// OPTION 2
3232
// Load from pre-bundled file on disk. To re-generate the static bundle, run
3333
//
34-
// $ curl http://localhost:8081/Examples/SampleApp/index.ios.bundle -o main.jsbundle
34+
// $ curl 'http://localhost:8081/Examples/SampleApp/index.ios.bundle?dev=false&minify=true' -o iOS/main.jsbundle
3535
//
3636
// and uncomment the next following line
3737
// jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// Offline JS
2+
// To re-generate the offline bundle, run this from root of your project
3+
// $ curl 'http://localhost:8081/Examples/SampleApp/index.ios.bundle?dev=false&minify=true' -o iOS/main.jsbundle
4+
5+
throw new Error('Offline JS file is empty. See iOS/main.jsbundle for instructions');

Examples/UIExplorer/ListViewPagingExample.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,9 @@ var styles = StyleSheet.create({
226226
var animations = {
227227
layout: {
228228
spring: {
229-
duration: 0.75,
229+
duration: 750,
230230
create: {
231-
duration: 0.3,
231+
duration: 300,
232232
type: LayoutAnimation.Types.easeInEaseOut,
233233
property: LayoutAnimation.Properties.opacity,
234234
},
@@ -238,13 +238,13 @@ var animations = {
238238
},
239239
},
240240
easeInEaseOut: {
241-
duration: 0.3,
241+
duration: 300,
242242
create: {
243243
type: LayoutAnimation.Types.easeInEaseOut,
244244
property: LayoutAnimation.Properties.scaleXY,
245245
},
246246
update: {
247-
delay: 0.1,
247+
delay: 100,
248248
type: LayoutAnimation.Types.easeInEaseOut,
249249
},
250250
},

Examples/UIExplorer/ScrollViewExample.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ exports.examples = [
3333
return (
3434
<ScrollView
3535
onScroll={() => { console.log('onScroll!'); }}
36-
throttleScrollCallbackMS={200}
36+
scrollEventThrottle={200}
3737
contentInset={{top: -50}}
3838
style={styles.scrollView}>
3939
{THUMBS.map(createThumbRow)}

Examples/UIExplorer/TextExample.ios.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,15 @@ exports.examples = [
7676
</Text>
7777
);
7878
},
79+
}, {
80+
title: 'Padding',
81+
render: function() {
82+
return (
83+
<Text style={{padding: 10}}>
84+
This text is indented by 10px padding on all sides.
85+
</Text>
86+
);
87+
},
7988
}, {
8089
title: 'Font Family',
8190
render: function() {

Examples/UIExplorer/TextInputExample.js

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,89 @@ exports.examples = [
174174
);
175175
}
176176
},
177+
{
178+
title: 'Keyboard types',
179+
render: function() {
180+
var keyboardTypes = [
181+
'default',
182+
'ascii-capable',
183+
'numbers-and-punctuation',
184+
'url',
185+
'number-pad',
186+
'phone-pad',
187+
'name-phone-pad',
188+
'email-address',
189+
'decimal-pad',
190+
'twitter',
191+
'web-search',
192+
'numeric',
193+
];
194+
var examples = keyboardTypes.map((type) => {
195+
return (
196+
<WithLabel key={type} label={type}>
197+
<TextInput
198+
keyboardType={type}
199+
style={styles.default}
200+
/>
201+
</WithLabel>
202+
);
203+
});
204+
return <View>{examples}</View>;
205+
}
206+
},
207+
{
208+
title: 'Return key types',
209+
render: function() {
210+
var returnKeyTypes = [
211+
'default',
212+
'go',
213+
'google',
214+
'join',
215+
'next',
216+
'route',
217+
'search',
218+
'send',
219+
'yahoo',
220+
'done',
221+
'emergency-call',
222+
];
223+
var examples = returnKeyTypes.map((type) => {
224+
return (
225+
<WithLabel key={type} label={type}>
226+
<TextInput
227+
returnKeyType={type}
228+
style={styles.default}
229+
/>
230+
</WithLabel>
231+
);
232+
});
233+
return <View>{examples}</View>;
234+
}
235+
},
236+
{
237+
title: 'Enable return key automatically',
238+
render: function() {
239+
return (
240+
<View>
241+
<WithLabel label="true">
242+
<TextInput enablesReturnKeyAutomatically={true} style={styles.default} />
243+
</WithLabel>
244+
</View>
245+
);
246+
}
247+
},
248+
{
249+
title: 'Secure text entry',
250+
render: function() {
251+
return (
252+
<View>
253+
<WithLabel label="true">
254+
<TextInput secureTextEntry={true} style={styles.default} value="abc" />
255+
</WithLabel>
256+
</View>
257+
);
258+
}
259+
},
177260
{
178261
title: 'Event handling',
179262
render: function(): ReactElement { return <TextEventsExample /> },
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
diff a/Libraries/FBReactKit/js/react-native-github/Examples/UIExplorer/UIExplorer.xcodeproj/project.pbxproj b/Libraries/FBReactKit/js/react-native-github/Examples/UIExplorer/UIExplorer.xcodeproj/project.pbxproj (rejected hunks)
2+
@@ -19,6 +19,7 @@
3+
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
4+
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
5+
147CED4C1AB3532B00DA3E4C /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 147CED4B1AB34F8C00DA3E4C /* libRCTActionSheet.a */; };
6+
+ D85B829E1AB6D5D7003F4FE2 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D85B829C1AB6D5CE003F4FE2 /* libRCTVibration.a */; };
7+
/* End PBXBuildFile section */
8+
9+
/* Begin PBXContainerItemProxy section */
10+
@@ -78,6 +79,13 @@
11+
remoteGlobalIDString = 134814201AA4EA6300B7C361;
12+
remoteInfo = RCTActionSheet;
13+
};
14+
+ D85B829B1AB6D5CE003F4FE2 /* PBXContainerItemProxy */ = {
15+
+ isa = PBXContainerItemProxy;
16+
+ containerPortal = D85B82911AB6D5CE003F4FE2 /* RCTVibration.xcodeproj */;
17+
+ proxyType = 2;
18+
+ remoteGlobalIDString = 832C81801AAF6DEF007FA2F7;
19+
+ remoteInfo = RCTVibration;
20+
+ };
21+
/* End PBXContainerItemProxy section */
22+
23+
/* Begin PBXFileReference section */
24+
@@ -98,6 +106,7 @@
25+
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
26+
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
27+
14E0EEC81AB118F7000DECC3 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = ../../Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj; sourceTree = "<group>"; };
28+
+ D85B82911AB6D5CE003F4FE2 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = ../../Libraries/Vibration/RCTVibration.xcodeproj; sourceTree = "<group>"; };
29+
/* End PBXFileReference section */
30+
31+
/* Begin PBXFrameworksBuildPhase section */
32+
@@ -112,6 +121,7 @@
33+
isa = PBXFrameworksBuildPhase;
34+
buildActionMask = 2147483647;
35+
files = (
36+
+ D85B829E1AB6D5D7003F4FE2 /* libRCTVibration.a in Frameworks */,
37+
147CED4C1AB3532B00DA3E4C /* libRCTActionSheet.a in Frameworks */,
38+
134454601AAFCABD003F0779 /* libRCTAdSupport.a in Frameworks */,
39+
134A8A2A1AACED7A00945AAE /* libRCTGeolocation.a in Frameworks */,
40+
@@ -145,6 +155,7 @@
41+
1316A21D1AA397F400C0188E /* Libraries */ = {
42+
isa = PBXGroup;
43+
children = (
44+
+ D85B82911AB6D5CE003F4FE2 /* RCTVibration.xcodeproj */,
45+
14E0EEC81AB118F7000DECC3 /* RCTActionSheet.xcodeproj */,
46+
13417FFA1AA91531003F314A /* ReactKit.xcodeproj */,
47+
134454551AAFCAAE003F0779 /* RCTAdSupport.xcodeproj */,
48+
@@ -334,6 +353,10 @@
49+
ProjectRef = 13417FEA1AA914B8003F314A /* RCTText.xcodeproj */;
50+
},
51+
{
52+
+ ProductGroup = D85B82921AB6D5CE003F4FE2 /* Products */;
53+
+ ProjectRef = D85B82911AB6D5CE003F4FE2 /* RCTVibration.xcodeproj */;
54+
+ },
55+
+ {
56+
ProductGroup = 13417FFB1AA91531003F314A /* Products */;
57+
ProjectRef = 13417FFA1AA91531003F314A /* ReactKit.xcodeproj */;
58+
},
59+
@@ -396,6 +419,13 @@
60+
remoteRef = 147CED4A1AB34F8C00DA3E4C /* PBXContainerItemProxy */;
61+
sourceTree = BUILT_PRODUCTS_DIR;
62+
};
63+
+ D85B829C1AB6D5CE003F4FE2 /* libRCTVibration.a */ = {
64+
+ isa = PBXReferenceProxy;
65+
+ fileType = archive.ar;
66+
+ path = libRCTVibration.a;
67+
+ remoteRef = D85B829B1AB6D5CE003F4FE2 /* PBXContainerItemProxy */;
68+
+ sourceTree = BUILT_PRODUCTS_DIR;
69+
+ };
70+
/* End PBXReferenceProxy section */
71+
72+
/* Begin PBXResourcesBuildPhase section */

Examples/UIExplorer/UIExplorer.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)