From 611e0619caf7323b5d06f29efbc2febd0ad4eba7 Mon Sep 17 00:00:00 2001 From: Martin Konicek Date: Mon, 7 Dec 2015 08:28:45 -0800 Subject: [PATCH] Rename PullToRefreshLayoutAndroid -> PullToRefreshViewAndroid Summary: The naming "Layout" is an Android-specific thing and not useful in JS. Let's stay consistent with naming like "ScrollView", "MapView" etc. public Reviewed By: bestander Differential Revision: D2723163 fb-gh-sync-id: 6b86e5a649254c41e9d6b0ef6f1fe2ff4b9f3e9a --- ...js => PullToRefreshViewAndroidExample.android.js} | 12 ++++++------ Examples/UIExplorer/UIExplorerList.android.js | 2 +- ...ndroid.js => PullToRefreshViewAndroid.android.js} | 10 +++++----- ...ndroid.ios.js => PullToRefreshViewAndroid.ios.js} | 2 +- Libraries/react-native/react-native.js | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) rename Examples/UIExplorer/{PullToRefreshLayoutAndroidExample.android.js => PullToRefreshViewAndroidExample.android.js} (91%) rename Libraries/PullToRefresh/{PullToRefreshLayoutAndroid.android.js => PullToRefreshViewAndroid.android.js} (90%) rename Libraries/PullToRefresh/{PullToRefreshLayoutAndroid.ios.js => PullToRefreshViewAndroid.ios.js} (89%) diff --git a/Examples/UIExplorer/PullToRefreshLayoutAndroidExample.android.js b/Examples/UIExplorer/PullToRefreshViewAndroidExample.android.js similarity index 91% rename from Examples/UIExplorer/PullToRefreshLayoutAndroidExample.android.js rename to Examples/UIExplorer/PullToRefreshViewAndroidExample.android.js index 06a39c7cc..c309c9028 100644 --- a/Examples/UIExplorer/PullToRefreshLayoutAndroidExample.android.js +++ b/Examples/UIExplorer/PullToRefreshViewAndroidExample.android.js @@ -18,7 +18,7 @@ const React = require('react-native'); const { ScrollView, StyleSheet, - PullToRefreshLayoutAndroid, + PullToRefreshViewAndroid, Text, TouchableWithoutFeedback, View, @@ -61,9 +61,9 @@ const Row = React.createClass({ ); }, }); -const PullToRefreshLayoutAndroidExample = React.createClass({ +const PullToRefreshViewAndroidExample = React.createClass({ statics: { - title: '', + title: '', description: 'Container that adds pull-to-refresh support to its child view.' }, @@ -88,7 +88,7 @@ const PullToRefreshLayoutAndroidExample = React.createClass({ return ; }); return ( - {rows} - + ); }, @@ -124,4 +124,4 @@ const PullToRefreshLayoutAndroidExample = React.createClass({ }); -module.exports = PullToRefreshLayoutAndroidExample; +module.exports = PullToRefreshViewAndroidExample; diff --git a/Examples/UIExplorer/UIExplorerList.android.js b/Examples/UIExplorer/UIExplorerList.android.js index b3b0fc4d5..6445eff49 100644 --- a/Examples/UIExplorer/UIExplorerList.android.js +++ b/Examples/UIExplorer/UIExplorerList.android.js @@ -27,7 +27,7 @@ var COMPONENTS = [ require('./ProgressBarAndroidExample'), require('./ScrollViewSimpleExample'), require('./SwitchAndroidExample'), - require('./PullToRefreshLayoutAndroidExample.android'), + require('./PullToRefreshViewAndroidExample.android'), require('./TextExample.android'), require('./TextInputExample.android'), require('./ToolbarAndroidExample'), diff --git a/Libraries/PullToRefresh/PullToRefreshLayoutAndroid.android.js b/Libraries/PullToRefresh/PullToRefreshViewAndroid.android.js similarity index 90% rename from Libraries/PullToRefresh/PullToRefreshLayoutAndroid.android.js rename to Libraries/PullToRefresh/PullToRefreshViewAndroid.android.js index a1d69c353..40842d0a2 100644 --- a/Libraries/PullToRefresh/PullToRefreshLayoutAndroid.android.js +++ b/Libraries/PullToRefresh/PullToRefreshViewAndroid.android.js @@ -6,7 +6,7 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule PullToRefreshLayoutAndroid + * @providesModule PullToRefreshViewAndroid */ 'use strict'; @@ -24,7 +24,7 @@ var NATIVE_REF = 'native_swiperefreshlayout'; * React view that supports a single scrollable child view (e.g. `ScrollView`). When this child * view is at `scrollY: 0`, swiping down triggers an `onRefresh` event. */ -var PullToRefreshLayoutAndroid = React.createClass({ +var PullToRefreshViewAndroid = React.createClass({ statics: { SIZE: RefreshLayoutConsts.SIZE, }, @@ -48,7 +48,7 @@ var PullToRefreshLayoutAndroid = React.createClass({ */ refreshing: React.PropTypes.bool, /** - * Size of the refresh indicator, see PullToRefreshLayoutAndroid.SIZE + * Size of the refresh indicator, see PullToRefreshViewAndroid.SIZE */ size: React.PropTypes.oneOf(RefreshLayoutConsts.SIZE.DEFAULT, RefreshLayoutConsts.SIZE.LARGE), }, @@ -81,7 +81,7 @@ var PullToRefreshLayoutAndroid = React.createClass({ var NativePullToRefresh = requireNativeComponent( 'AndroidSwipeRefreshLayout', - PullToRefreshLayoutAndroid + PullToRefreshViewAndroid ); -module.exports = PullToRefreshLayoutAndroid; +module.exports = PullToRefreshViewAndroid; diff --git a/Libraries/PullToRefresh/PullToRefreshLayoutAndroid.ios.js b/Libraries/PullToRefresh/PullToRefreshViewAndroid.ios.js similarity index 89% rename from Libraries/PullToRefresh/PullToRefreshLayoutAndroid.ios.js rename to Libraries/PullToRefresh/PullToRefreshViewAndroid.ios.js index eea4dbae7..2a16f851b 100644 --- a/Libraries/PullToRefresh/PullToRefreshLayoutAndroid.ios.js +++ b/Libraries/PullToRefresh/PullToRefreshViewAndroid.ios.js @@ -6,7 +6,7 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule PullToRefreshLayoutAndroid + * @providesModule PullToRefreshViewAndroid */ 'use strict'; diff --git a/Libraries/react-native/react-native.js b/Libraries/react-native/react-native.js index 2264fa5c6..99bda63a9 100644 --- a/Libraries/react-native/react-native.js +++ b/Libraries/react-native/react-native.js @@ -37,7 +37,7 @@ var ReactNative = Object.assign(Object.create(require('React')), { SliderIOS: require('SliderIOS'), SnapshotViewIOS: require('SnapshotViewIOS'), Switch: require('Switch'), - PullToRefreshLayoutAndroid: require('PullToRefreshLayoutAndroid'), + PullToRefreshViewAndroid: require('PullToRefreshViewAndroid'), SwitchAndroid: require('SwitchAndroid'), SwitchIOS: require('SwitchIOS'), TabBarIOS: require('TabBarIOS'),