Updates from Wed 1 Apr

- (Xcode) Set indent=2 in all xcodeproj files. | Spencer Ahrens
- [react-native] Fix dev menu keyboard shortcut in sample app | Ben Alpert
- [ReactNative] Fix doc page for PushNotificationIOS | Eric Vicenti
- [ReactNative] Improve <Image> docs | Christopher Chedeau
- Add support for web-style data-uris | Felix Oghina
- [react_native] Update AnimationsDebugModule to output more accurate FPS info | Andy Street
- [ReactNative] Rename NavigationBar props | Eric Vicenti
This commit is contained in:
Christopher Chedeau 2015-04-01 18:37:03 -07:00
parent 443d44d8f4
commit db3a724bb2
28 changed files with 139 additions and 32 deletions

View File

@ -121,7 +121,9 @@
832341AE1AAA6A7D00B99B32 /* Libraries */,
83CBBA001A601CBA00E9B192 /* Products */,
);
indentWidth = 2;
sourceTree = "<group>";
tabWidth = 2;
};
83CBBA001A601CBA00E9B192 /* Products */ = {
isa = PBXGroup;

View File

@ -159,7 +159,9 @@
58C571FC1AA6124500CDF9C8 /* Libraries */,
83CBBA001A601CBA00E9B192 /* Products */,
);
indentWidth = 2;
sourceTree = "<group>";
tabWidth = 2;
};
83CBBA001A601CBA00E9B192 /* Products */ = {
isa = PBXGroup;

View File

@ -242,7 +242,9 @@
832341AE1AAA6A7D00B99B32 /* Libraries */,
83CBBA001A601CBA00E9B192 /* Products */,
);
indentWidth = 2;
sourceTree = "<group>";
tabWidth = 2;
};
83CBBA001A601CBA00E9B192 /* Products */ = {
isa = PBXGroup;

View File

@ -24,7 +24,7 @@ var SampleApp = React.createClass({
</Text>
<Text style={styles.instructions}>
Press Cmd+R to reload,{'\n'}
Cmd+Shift+Z for dev menu
Cmd+Control+Z for dev menu
</Text>
</View>
);

View File

@ -121,7 +121,9 @@
58C572071AA6126D00CDF9C8 /* Libraries */,
83CBBA001A601CBA00E9B192 /* Products */,
);
indentWidth = 2;
sourceTree = "<group>";
tabWidth = 2;
};
83CBBA001A601CBA00E9B192 /* Products */ = {
isa = PBXGroup;

View File

@ -115,7 +115,7 @@ var BreadcrumbNavSample = React.createClass({
renderScene={this._renderScene}
navigationBar={
<Navigator.BreadcrumbNavigationBar
navigationBarRouteMapper={this._navBarRouteMapper}
routeMapper={this._navBarRouteMapper}
/>
}
/>

View File

@ -121,8 +121,8 @@ var NavigationBarSample = React.createClass({
)}
navigationBar={
<Navigator.NavigationBar
navigationBarRouteMapper={NavigationBarRouteMapper}
navigationBarStyles={styles.navBar}
routeMapper={NavigationBarRouteMapper}
style={styles.navBar}
/>
}
/>

View File

@ -74,7 +74,7 @@ class NotificationExample extends React.Component {
_onNotification(notification) {
AlertIOS.alert(
'Notification Received',
`Alert message: ${notification.getMessage()}`,
'Alert message: ' + notification.getMessage(),
[{
text: 'Dismiss',
onPress: null,

View File

@ -305,7 +305,9 @@
004D289F1AAF61C70097A701 /* UIExplorerTests */,
83CBBA001A601CBA00E9B192 /* Products */,
);
indentWidth = 2;
sourceTree = "<group>";
tabWidth = 2;
};
83CBBA001A601CBA00E9B192 /* Products */ = {
isa = PBXGroup;

View File

@ -0,0 +1,72 @@
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)
@@ -19,6 +19,7 @@
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
147CED4C1AB3532B00DA3E4C /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 147CED4B1AB34F8C00DA3E4C /* libRCTActionSheet.a */; };
+ D85B829E1AB6D5D7003F4FE2 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D85B829C1AB6D5CE003F4FE2 /* libRCTVibration.a */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -78,6 +79,13 @@
remoteGlobalIDString = 134814201AA4EA6300B7C361;
remoteInfo = RCTActionSheet;
};
+ D85B829B1AB6D5CE003F4FE2 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = D85B82911AB6D5CE003F4FE2 /* RCTVibration.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = 832C81801AAF6DEF007FA2F7;
+ remoteInfo = RCTVibration;
+ };
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
@@ -98,6 +106,7 @@
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
14E0EEC81AB118F7000DECC3 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = ../../Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj; sourceTree = "<group>"; };
+ D85B82911AB6D5CE003F4FE2 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = ../../Libraries/Vibration/RCTVibration.xcodeproj; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -112,6 +121,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ D85B829E1AB6D5D7003F4FE2 /* libRCTVibration.a in Frameworks */,
147CED4C1AB3532B00DA3E4C /* libRCTActionSheet.a in Frameworks */,
134454601AAFCABD003F0779 /* libRCTAdSupport.a in Frameworks */,
134A8A2A1AACED7A00945AAE /* libRCTGeolocation.a in Frameworks */,
@@ -145,6 +155,7 @@
1316A21D1AA397F400C0188E /* Libraries */ = {
isa = PBXGroup;
children = (
+ D85B82911AB6D5CE003F4FE2 /* RCTVibration.xcodeproj */,
14E0EEC81AB118F7000DECC3 /* RCTActionSheet.xcodeproj */,
13417FFA1AA91531003F314A /* ReactKit.xcodeproj */,
134454551AAFCAAE003F0779 /* RCTAdSupport.xcodeproj */,
@@ -334,6 +353,10 @@
ProjectRef = 13417FEA1AA914B8003F314A /* RCTText.xcodeproj */;
},
{
+ ProductGroup = D85B82921AB6D5CE003F4FE2 /* Products */;
+ ProjectRef = D85B82911AB6D5CE003F4FE2 /* RCTVibration.xcodeproj */;
+ },
+ {
ProductGroup = 13417FFB1AA91531003F314A /* Products */;
ProjectRef = 13417FFA1AA91531003F314A /* ReactKit.xcodeproj */;
},
@@ -396,6 +419,13 @@
remoteRef = 147CED4A1AB34F8C00DA3E4C /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
+ D85B829C1AB6D5CE003F4FE2 /* libRCTVibration.a */ = {
+ isa = PBXReferenceProxy;
+ fileType = archive.ar;
+ path = libRCTVibration.a;
+ remoteRef = D85B829B1AB6D5CE003F4FE2 /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */

View File

@ -233,7 +233,9 @@
004D289F1AAF61C70097A701 /* IntegrationTestsTests */,
83CBBA001A601CBA00E9B192 /* Products */,
);
indentWidth = 2;
sourceTree = "<group>";
tabWidth = 2;
};
83CBBA001A601CBA00E9B192 /* Products */ = {
isa = PBXGroup;

View File

@ -54,7 +54,9 @@
14C644C21AB0DFC900DE3C65 /* RCTActionSheetManager.m */,
134814211AA4EA7D00B7C361 /* Products */,
);
indentWidth = 2;
sourceTree = "<group>";
tabWidth = 2;
};
/* End PBXGroup section */

View File

@ -46,7 +46,9 @@
832C819B1AAF6E1A007FA2F7 /* RCTAdSupport.m */,
832C81811AAF6DEF007FA2F7 /* Products */,
);
indentWidth = 2;
sourceTree = "<group>";
tabWidth = 2;
};
832C81811AAF6DEF007FA2F7 /* Products */ = {
isa = PBXGroup;

View File

@ -462,7 +462,7 @@ var Navigator = React.createClass({
this._emitDidFocus(presentedIndex);
this._removePoppedRoutes();
if (AnimationsDebugModule) {
AnimationsDebugModule.stopRecordingFps();
AnimationsDebugModule.stopRecordingFps(Date.now());
}
this._hideOtherScenes(presentedIndex);
}

View File

@ -77,7 +77,7 @@ var NavigatorBreadcrumbNavigationBar = React.createClass({
popToRoute: PropTypes.func,
popToTop: PropTypes.func,
}),
navigationBarRouteMapper: PropTypes.shape({
routeMapper: PropTypes.shape({
rightContentForRoute: PropTypes.func,
titleContentForRoute: PropTypes.func,
iconForRoute: PropTypes.func,
@ -87,7 +87,7 @@ var NavigatorBreadcrumbNavigationBar = React.createClass({
idStack: React.PropTypes.arrayOf(React.PropTypes.number),
presentedIndex: React.PropTypes.number,
}),
navigationBarStyles: View.propTypes.style,
style: View.propTypes.style,
},
statics: {
@ -144,7 +144,7 @@ var NavigatorBreadcrumbNavigationBar = React.createClass({
var titles = navState.routeStack.map(this._renderOrReturnTitle);
var buttons = navState.routeStack.map(this._renderOrReturnRightButton);
return (
<View style={[styles.breadCrumbContainer, this.props.navigationBarStyles]}>
<View style={[styles.breadCrumbContainer, this.props.style]}>
{titles}
{icons}
{buttons}
@ -154,7 +154,7 @@ var NavigatorBreadcrumbNavigationBar = React.createClass({
_renderOrReturnBreadcrumb: function(route, index) {
var uid = this.props.navState.idStack[index];
var navBarRouteMapper = this.props.navigationBarRouteMapper;
var navBarRouteMapper = this.props.routeMapper;
var navOps = this.props.navigator;
var alreadyRendered = this.refs['crumbContainer' + uid];
if (alreadyRendered) {
@ -199,7 +199,7 @@ var NavigatorBreadcrumbNavigationBar = React.createClass({
/>
);
}
var navBarRouteMapper = this.props.navigationBarRouteMapper;
var navBarRouteMapper = this.props.routeMapper;
var titleContent = navBarRouteMapper.titleContentForRoute(
navState.routeStack[index],
this.props.navigator
@ -219,7 +219,7 @@ var NavigatorBreadcrumbNavigationBar = React.createClass({
_renderOrReturnRightButton: function(route, index) {
var navState = this.props.navState;
var navBarRouteMapper = this.props.navigationBarRouteMapper;
var navBarRouteMapper = this.props.routeMapper;
var uid = navState.idStack[index];
var alreadyRendered = this.refs['rightContainer' + uid];
if (alreadyRendered) {

View File

@ -46,7 +46,7 @@ var NavigatorNavigationBar = React.createClass({
propTypes: {
navigator: React.PropTypes.object,
navigationBarRouteMapper: React.PropTypes.shape({
routeMapper: React.PropTypes.shape({
Title: React.PropTypes.func.isRequired,
LeftButton: React.PropTypes.func.isRequired,
RightButton: React.PropTypes.func.isRequired,
@ -56,7 +56,7 @@ var NavigatorNavigationBar = React.createClass({
idStack: React.PropTypes.arrayOf(React.PropTypes.number),
presentedIndex: React.PropTypes.number,
}),
navigationBarStyles: View.propTypes.style,
style: View.propTypes.style,
},
statics: {
@ -133,7 +133,7 @@ var NavigatorNavigationBar = React.createClass({
}, this);
return (
<View style={[styles.navBarContainer, this.props.navigationBarStyles]}>
<View style={[styles.navBarContainer, this.props.style]}>
{components}
</View>
);
@ -145,7 +145,6 @@ var NavigatorNavigationBar = React.createClass({
/*number*/index
) /*object*/ {
var navState = this.props.navState;
var navBarRouteMapper = this.props.navigationBarRouteMapper;
var uid = navState.idStack[index];
var containerRef = componentName + 'Container' + uid;
var alreadyRendered = this.refs[containerRef];
@ -160,7 +159,7 @@ var NavigatorNavigationBar = React.createClass({
);
}
var content = navBarRouteMapper[componentName](
var content = this.props.routeMapper[componentName](
navState.routeStack[index],
this.props.navigator,
index,

View File

@ -54,7 +54,9 @@
134814051AA4E45400B7C361 /* RCTLocationObserver.m */,
134814211AA4EA7D00B7C361 /* Products */,
);
indentWidth = 2;
sourceTree = "<group>";
tabWidth = 2;
};
/* End PBXGroup section */

View File

@ -56,35 +56,33 @@ var warning = require('warning');
var Image = React.createClass({
propTypes: {
/**
* `uri` is a string representing the resource identifier for the image, which
* could be an http address, a local file path, or the name of a static image
* resource (which should be wrapped in the `required('image!name')` function).
*/
source: PropTypes.shape({
/**
* A string representing the resource identifier for the image, which
* could be an http address, a local file path, or the name of a static image
* resource (which should be wrapped in the `ix` function).
*/
uri: PropTypes.string,
}),
/**
* accessible - Whether this element should be revealed as an accessible
* element.
* Whether this element should be revealed as an accessible element.
*/
accessible: PropTypes.bool,
/**
* accessibilityLabel - Custom string to display for accessibility.
* Custom string to display for accessibility.
*/
accessibilityLabel: PropTypes.string,
/**
* capInsets - When the image is resized, the corners of the size specified
* When the image is resized, the corners of the size specified
* by capInsets will stay a fixed size, but the center content and borders
* of the image will be stretched. This is useful for creating resizable
* rounded buttons, shadows, and other resizable assets. More info:
*
* https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIImage_Class/index.html#//apple_ref/occ/instm/UIImage/resizableImageWithCapInsets:
* rounded buttons, shadows, and other resizable assets. More info on
* [Apple documentation](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIImage_Class/index.html#//apple_ref/occ/instm/UIImage/resizableImageWithCapInsets)
*/
capInsets: EdgeInsetsPropType,
style: StyleSheetPropType(ImageStylePropTypes),
/**
* testID - A unique identifier for this element to be used in UI Automation
* A unique identifier for this element to be used in UI Automation
* testing scripts.
*/
testID: PropTypes.string,

View File

@ -81,7 +81,9 @@
1304D5AA1AA8C4A30002E2BE /* RCTStaticImageManager.m */,
58B5115E1A9E6B3D00147676 /* Products */,
);
indentWidth = 2;
sourceTree = "<group>";
tabWidth = 2;
};
58B5115E1A9E6B3D00147676 /* Products */ = {
isa = PBXGroup;

View File

@ -51,7 +51,9 @@
1372B7361AB03E7B00659ED6 /* RCTReachability.m */,
58B511DC1A9E6C8500147676 /* Products */,
);
indentWidth = 2;
sourceTree = "<group>";
tabWidth = 2;
};
58B511DC1A9E6C8500147676 /* Products */ = {
isa = PBXGroup;

View File

@ -54,7 +54,9 @@
148699CE1ABD045300480536 /* RCTPushNotificationManager.m */,
134814211AA4EA7D00B7C361 /* Products */,
);
indentWidth = 2;
sourceTree = "<group>";
tabWidth = 2;
};
/* End PBXGroup section */

View File

@ -65,7 +65,9 @@
58E64FE31AB964CD007446E2 /* FBSnapshotTestCase */,
580C37701AB104AF0015E709 /* Products */,
);
indentWidth = 2;
sourceTree = "<group>";
tabWidth = 2;
};
580C37701AB104AF0015E709 /* Products */ = {
isa = PBXGroup;

View File

@ -51,7 +51,9 @@
00D277151AB8C32C00DC1E48 /* RCTWebSocketExecutor.m */,
832C81811AAF6DEF007FA2F7 /* Products */,
);
indentWidth = 2;
sourceTree = "<group>";
tabWidth = 2;
};
832C81811AAF6DEF007FA2F7 /* Products */ = {
isa = PBXGroup;

View File

@ -66,7 +66,9 @@
58B511CD1A9E6C5C00147676 /* RCTTextManager.m */,
58B5119C1A9E6C1200147676 /* Products */,
);
indentWidth = 2;
sourceTree = "<group>";
tabWidth = 2;
};
58B5119C1A9E6C1200147676 /* Products */ = {
isa = PBXGroup;

View File

@ -46,7 +46,9 @@
832C819B1AAF6E1A007FA2F7 /* RCTVibration.m */,
832C81811AAF6DEF007FA2F7 /* Products */,
);
indentWidth = 2;
sourceTree = "<group>";
tabWidth = 2;
};
832C81811AAF6DEF007FA2F7 /* Products */ = {
isa = PBXGroup;

View File

@ -547,7 +547,11 @@ RCT_CGSTRUCT_CONVERTER(CGAffineTransform, (@[
UIImage *image = nil;
NSString *path = json;
if ([path isAbsolutePath]) {
if ([path hasPrefix:@"data:"]) {
NSURL *url = [NSURL URLWithString:path];
NSData *imageData = [NSData dataWithContentsOfURL:url];
image = [UIImage imageWithData:imageData];
} else if ([path isAbsolutePath]) {
image = [UIImage imageWithContentsOfFile:path];
} else {
image = [UIImage imageNamed:path];

View File

@ -321,7 +321,9 @@
83CBBA2F1A601D0F00E9B192 /* React */,
83CBBA001A601CBA00E9B192 /* Products */,
);
indentWidth = 2;
sourceTree = "<group>";
tabWidth = 2;
};
83CBBA001A601CBA00E9B192 /* Products */ = {
isa = PBXGroup;

View File

@ -1,6 +1,6 @@
{
"name": "react-native",
"version": "0.3.3",
"version": "0.3.1",
"description": "A framework for building native apps using React",
"repository": {
"type": "git",