react-native/Libraries/Components
Christopher Chedeau 725053acfe [Animated][BREAKING_CHANGE] Convert <TouchableOpacity> to Animated
Summary:
Because we don't want to integrate Animated inside of the core of React, we can only pass Animated.Value to styles of <Animated.View>. TouchableOpacity unfortunately used cloneElement. This means that we should have asked every single call site to replace their children to Animated.View. This isn't great.

The other solution is to stop using cloneElement and instead wrap the children inside of an <Animated.View>. This has many advantages:
- We no longer use cloneElement so we're no longer messing up with elements that are not our own.
- Refs are now working correctly for children elements
- No longer need to enforce that there's only one child and that this child is a native element

The downside is that we're introducing a <View> into the hierarchy. Sadly with CSS there is no way to have a View that doesn't affect layout. What we need to do is to remove the inner <View> and transfer all the styles to the TouchableOpacity. It is annoying but fortunately a pretty mechanical process.

I think that having a wrapper is the best solution. I will investigate to see if we can make wrappers on TouchableHighliht and TouchableWithoutFeedback as well.

**Upgrade Path:**

If the child is a View, move the style of the View to TouchableOpacity and remove the View itself.

```
<TouchableOpacity onPress={...}>
  <View style={...}>
    ...
  </View>
</TouchableOpacity>

-->

<TouchableOpacity onPress={...} style={...}>
  ...
</TouchableOpacity>
```

If the child is an Image or Text, on all the examples at Facebook it worked without any change. But it is a great idea to double check them anyway.
2015-07-20 16:44:36 -08:00
..
ActivityIndicatorIOS [ActivityIndicator] Specify a width 2015-06-17 07:49:59 -08:00
DatePicker Removed deprecated RCT_EXPORT + code paths 2015-06-05 09:58:25 -08:00
MapView [madman]: Fix MapView crashing problem. 2015-06-25 21:21:08 -08:00
Navigation Nav ios hide hairline 2015-07-16 04:31:17 -08:00
ProgressViewIOS Removed deprecated RCT_EXPORT + code paths 2015-06-05 09:58:25 -08:00
ScrollView Reverted ca9d1b3bf5a6f46ec29babe8685634690ff9a2bc to unbreak groups 2015-07-17 04:03:01 -08:00
SegmentedControlIOS Removed deprecated RCT_EXPORT + code paths 2015-06-05 09:58:25 -08:00
SliderIOS Add minimumTrackTintColor and maximumTrackTintColor to SliderIOS 2015-04-23 05:57:15 -08:00
StatusBar Removed deprecated RCT_EXPORT + code paths 2015-06-05 09:58:25 -08:00
SwitchIOS [ReactNative] use requireNativeComponent to clean up a bunch of boilerplate 2015-04-21 21:06:48 -08:00
TabBarIOS [TabBarIOS] Add translucent property to TabBarIOS 2015-07-14 08:02:44 -08:00
TextInput [TextInput] Remove focus on TextInput if property `editable` is … 2015-07-15 08:37:22 -08:00
Touchable [Animated][BREAKING_CHANGE] Convert <TouchableOpacity> to Animated 2015-07-20 16:44:36 -08:00
UnimplementedViews [ReactNative] introduce requireNativeComponent 2015-04-16 17:12:12 -08:00
View Reverted ca9d1b3bf5a6f46ec29babe8685634690ff9a2bc to unbreak groups 2015-07-17 04:03:01 -08:00
WebView [Android][JS]: supports prop "html" in WebView 2015-07-10 12:33:16 -08:00
ScrollResponder.js [Treehouse] Sync from android permalink keyboard layout changes 2015-07-13 18:29:54 -08:00
StaticRenderer.js [Haste] @provides -> @providesModule StaticRenderer 2015-05-14 08:42:13 -08:00
Subscribable.js [ReactNative] clean lint for Libraries/Components 2015-05-18 15:54:07 -08:00