Compare commits

...
Author SHA1 Message Date
Konstantin Raev d4c6e60ced version 0.20.0-rc1 2016-02-06 17:53:40 +00:00
Martin KonicekandKonstantin Raev fa17a572c0 Disable menu option for HMR, it's not ready just yet 2016-02-05 14:54:58 +00:00
fangmobileandKonstantin Raev c71530259e added accessibility props for touchables
Summary:
accessibilityLabels are missing in these touchable*.js files.
for #5322
ide This is not tested yet. I will update with test.
Closes https://github.com/facebook/react-native/pull/5346

Reviewed By: svcscm

Differential Revision: D2882061

Pulled By: gkassabli

fb-gh-sync-id: dff0ef373e5f5895027cb1cc08c8887a6ace8eee
2016-02-05 14:50:39 +00:00
Adam MiskiewiczandKonstantin Raev 1ef0b8f4db Use new DisplayMetrics object in getDisplayMetrics as to not overwrite Android global state
Summary:
The change in https://github.com/facebook/react-native/commit/8e603940e3fca4ed2fe420c02a66d860b53f3076 actually causes a super bad bug when `context.getResources().getDisplayMetrics()` is accessed in other parts of the application.

It turns out that when you dive into the impl of `getRealMetrics`, it mutates whatever `DisplayMetrics` object is passed to it. In this case, `getDisplayMetrics` ends up mutating the `DisplayMetrics` object that sits on the application context's `Resources` instance.

This PR makes that not so.

/cc jesseruder ide jaysoo bestander astreet
Closes https://github.com/facebook/react-native/pull/5764

Reviewed By: svcscm

Differential Revision: D2902386

Pulled By: androidtrunkagent

fb-gh-sync-id: 3f24b68bc7e6b4ca83808c03ef3637e1ac9a673e
2016-02-05 14:49:07 +00:00
Janic DuplessisandKonstantin Raev 3eb5993044 Fix proguard template for ReactProp and ReactPropGroup
Summary:
ReactProp and ReactPropGroup were moved in the annotations package but the proguard file was not updated accordingly. This caused apps to crash when built in release using proguard.

Fixes #5655
Closes https://github.com/facebook/react-native/pull/5717

Reviewed By: svcscm

Differential Revision: D2905573

Pulled By: lexs

fb-gh-sync-id: 29ab14bacda7254d9896ff3991bf17d7fdfd6ea9
2016-02-05 14:44:49 +00:00
Konstantin Raev 29997b3644 [0.20.0-rc] Bump version numbers 2016-02-04 12:06:12 +00:00
17 changed files with 40 additions and 26 deletions
@@ -208,7 +208,13 @@ exports.examples = [
{
title: 'Auto-focus',
render: function() {
return <TextInput autoFocus={true} style={styles.singleLine} />;
return (
<TextInput
autoFocus={true}
style={styles.singleLine}
accessibilityLabel="I am the accessibility label for text input"
/>
);
}
},
{
+7 -1
View File
@@ -348,7 +348,13 @@ exports.examples = [
{
title: 'Auto-focus',
render: function() {
return <TextInput autoFocus={true} style={styles.default} />;
return (
<TextInput
autoFocus={true}
style={styles.default}
accessibilityLabel="I am the accessibility label for text input"
/>
);
}
},
{
+3
View File
@@ -144,6 +144,9 @@ var TouchableFeedbackEvents = React.createClass({
<TouchableOpacity
style={styles.wrapper}
testID="touchable_feedback_events_button"
accessibilityLabel="touchable feedback events"
accessibilityTraits="button"
accessibilityComponentType="button"
onPress={() => this._appendEvent('press')}
onPressIn={() => this._appendEvent('pressIn')}
onPressOut={() => this._appendEvent('pressOut')}
+6 -4
View File
@@ -290,10 +290,6 @@ var TextInput = React.createClass({
* Styles
*/
style: Text.propTypes.style,
/**
* Used to locate this view in end-to-end tests
*/
testID: PropTypes.string,
/**
* The color of the textInput underline.
* @platform android
@@ -457,6 +453,9 @@ var TextInput = React.createClass({
<TouchableWithoutFeedback
onPress={this._onPress}
rejectResponderTermination={true}
accessible={props.accessible}
accessibilityLabel={props.accessibilityLabel}
accessibilityTraits={props.accessibilityTraits}
testID={props.testID}>
{textContainer}
</TouchableWithoutFeedback>
@@ -520,6 +519,9 @@ var TextInput = React.createClass({
return (
<TouchableWithoutFeedback
onPress={this._onPress}
accessible={this.props.accessible}
accessibilityLabel={this.props.accessibilityLabel}
accessibilityComponentType={this.props.accessibilityComponentType}
testID={this.props.testID}>
{textContainer}
</TouchableWithoutFeedback>
@@ -117,6 +117,9 @@ var TouchableBounce = React.createClass({
<Animated.View
style={[{transform: [{scale: this.state.scale}]}, this.props.style]}
accessible={true}
accessibilityLabel={this.props.accessibilityLabel}
accessibilityComponentType={this.props.accessibilityComponentType}
accessibilityTraits={this.props.accessibilityTraits}
testID={this.props.testID}
onStartShouldSetResponder={this.touchableHandleStartShouldSetResponder}
onResponderTerminationRequest={this.touchableHandleResponderTerminationRequest}
@@ -215,6 +215,7 @@ var TouchableHighlight = React.createClass({
return (
<View
accessible={true}
accessibilityLabel={this.props.accessibilityLabel}
accessibilityComponentType={this.props.accessibilityComponentType}
accessibilityTraits={this.props.accessibilityTraits}
ref={UNDERLAY_REF}
@@ -200,6 +200,7 @@ var TouchableNativeFeedback = React.createClass({
...onlyChild(this.props.children).props,
nativeBackgroundAndroid: this.props.background,
accessible: this.props.accessible !== false,
accessibilityLabel: this.props.accessibilityLabel,
accessibilityComponentType: this.props.accessibilityComponentType,
accessibilityTraits: this.props.accessibilityTraits,
testID: this.props.testID,
@@ -154,6 +154,7 @@ var TouchableOpacity = React.createClass({
return (
<Animated.View
accessible={true}
accessibilityLabel={this.props.accessibilityLabel}
accessibilityComponentType={this.props.accessibilityComponentType}
accessibilityTraits={this.props.accessibilityTraits}
style={[this.props.style, {opacity: this.state.anim}]}
@@ -135,6 +135,7 @@ var TouchableWithoutFeedback = React.createClass({
// Note(avik): remove dynamic typecast once Flow has been upgraded
return (React: any).cloneElement(onlyChild(this.props.children), {
accessible: this.props.accessible !== false,
accessibilityLabel: this.props.accessibilityLabel,
accessibilityComponentType: this.props.accessibilityComponentType,
accessibilityTraits: this.props.accessibilityTraits,
testID: this.props.testID,
+1 -1
View File
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "React"
s.version = "0.0.0-master"
s.version = "0.20.0-rc"
s.summary = "Build high quality mobile apps using React."
s.description = <<-DESC
React Native apps are built using the React JS
+1 -1
View File
@@ -1,4 +1,4 @@
VERSION_NAME=0.12.0-SNAPSHOT
VERSION_NAME=0.20.0
GROUP=com.facebook.react
POM_NAME=ReactNative
@@ -265,17 +265,6 @@ public class DevSupportManagerImpl implements DevSupportManager {
handleReloadJS();
}
});
options.put(
mDevSettings.isHotModuleReplacementEnabled()
? mApplicationContext.getString(R.string.catalyst_hot_module_replacement_off)
: mApplicationContext.getString(R.string.catalyst_hot_module_replacement),
new DevOptionHandler() {
@Override
public void onOptionSelected() {
mDevSettings.setHotModuleReplacementEnabled(!mDevSettings.isHotModuleReplacementEnabled());
handleReloadJS();
}
});
options.put(
mDevSettings.isReloadOnJSChangeEnabled()
? mApplicationContext.getString(R.string.catalyst_live_reload_off)
@@ -464,7 +464,8 @@ public class UIManagerModule extends ReactContextBaseJavaModule implements
private DisplayMetrics getDisplayMetrics() {
Context context = getReactApplicationContext();
DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics();
DisplayMetrics displayMetrics = new DisplayMetrics();
displayMetrics.setTo(context.getResources().getDisplayMetrics());
WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
Display display = wm.getDefaultDisplay();
@@ -121,5 +121,5 @@ android {
dependencies {
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:0.13.0"
compile "com.facebook.react:react-native:0.20.+"
}
@@ -42,8 +42,8 @@
-keep class * extends com.facebook.react.bridge.NativeModule { *; }
-keepclassmembers,includedescriptorclasses class * { native <methods>; }
-keepclassmembers class * { @com.facebook.react.uimanager.UIProp <fields>; }
-keepclassmembers class * { @com.facebook.react.uimanager.ReactProp <methods>; }
-keepclassmembers class * { @com.facebook.react.uimanager.ReactPropGroup <methods>; }
-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp <methods>; }
-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup <methods>; }
-dontwarn com.facebook.react.**
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "react-native",
"version": "0.0.0-master",
"version": "0.20.0-rc1",
"description": "A framework for building native apps using React",
"license": "BSD-3-Clause",
"repository": {
+2 -2
View File
@@ -46,8 +46,8 @@ artifacts_dir=~/.m2/repository/com/facebook/react/react-native/${RELEASE}.0
for i in "${artifacts_list[@]}"; do
artifact_file="${artifacts_dir}/react-native-${RELEASE}.0${i}"
[ -e "${artifact_file}" ] || error "Couldn't find file: ${artifact_file}"
[ -e "${artifact_file}.asc" ] || error "Couldn't find file: ${artifact_file}.asc"
# [ -e "${artifact_file}" ] || error "Couldn't find file: ${artifact_file}"
# [ -e "${artifact_file}.asc" ] || error "Couldn't find file: ${artifact_file}.asc"
done
success "Generated artifacts for Maven"