diff --git a/Libraries/Components/AppleTV/TVViewPropTypes.js b/Libraries/Components/AppleTV/TVViewPropTypes.js deleted file mode 100644 index d7492967bc1..00000000000 --- a/Libraries/Components/AppleTV/TVViewPropTypes.js +++ /dev/null @@ -1,108 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow - */ - -'use strict'; - -export type TVParallaxPropertiesType = $ReadOnly<{| - /** - * If true, parallax effects are enabled. Defaults to true. - */ - enabled?: boolean, - - /** - * Defaults to 2.0. - */ - shiftDistanceX?: number, - - /** - * Defaults to 2.0. - */ - shiftDistanceY?: number, - - /** - * Defaults to 0.05. - */ - tiltAngle?: number, - - /** - * Defaults to 1.0 - */ - magnification?: number, - - /** - * Defaults to 1.0 - */ - pressMagnification?: number, - - /** - * Defaults to 0.3 - */ - pressDuration?: number, - - /** - * Defaults to 0.3 - */ - pressDelay?: number, -|}>; - -/** - * Additional View properties for Apple TV - */ -export type TVViewProps = $ReadOnly<{| - /** - * *(Apple TV only)* When set to true, this view will be focusable - * and navigable using the Apple TV remote. - * - * @platform ios - */ - isTVSelectable?: boolean, - - /** - * *(Apple TV only)* May be set to true to force the Apple TV focus engine to move focus to this view. - * - * @platform ios - */ - hasTVPreferredFocus?: boolean, - - /** - * *(Apple TV only)* Object with properties to control Apple TV parallax effects. - * - * @platform ios - */ - tvParallaxProperties?: TVParallaxPropertiesType, - - /** - * *(Apple TV only)* May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. - * - * @platform ios - */ - tvParallaxShiftDistanceX?: number, - - /** - * *(Apple TV only)* May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 2.0. - * - * @platform ios - */ - tvParallaxShiftDistanceY?: number, - - /** - * *(Apple TV only)* May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 0.05. - * - * @platform ios - */ - tvParallaxTiltAngle?: number, - - /** - * *(Apple TV only)* May be used to change the appearance of the Apple TV parallax effect when this view goes in or out of focus. Defaults to 1.0. - * - * @platform ios - */ - tvParallaxMagnification?: number, -|}>; diff --git a/Libraries/Components/Touchable/TouchableHighlight.js b/Libraries/Components/Touchable/TouchableHighlight.js index 56606d0d3ec..561d2345488 100644 --- a/Libraries/Components/Touchable/TouchableHighlight.js +++ b/Libraries/Components/Touchable/TouchableHighlight.js @@ -29,7 +29,6 @@ import type {PressEvent} from '../../Types/CoreEventTypes'; import type {ViewStyleProp} from '../../StyleSheet/StyleSheet'; import type {ColorValue} from '../../StyleSheet/StyleSheetTypes'; import type {Props as TouchableWithoutFeedbackProps} from './TouchableWithoutFeedback'; -import type {TVParallaxPropertiesType} from '../AppleTV/TVViewPropTypes'; const DEFAULT_PROPS = { activeOpacity: 0.85, @@ -41,7 +40,6 @@ const PRESS_RETENTION_OFFSET = {top: 20, left: 20, right: 20, bottom: 30}; type IOSProps = $ReadOnly<{| hasTVPreferredFocus?: ?boolean, - tvParallaxProperties?: ?TVParallaxPropertiesType, |}>; type AndroidProps = $ReadOnly<{| @@ -228,21 +226,6 @@ const TouchableHighlight = ((createReactClass({ * @platform android */ nextFocusUp: PropTypes.number, - /** - * *(Apple TV only)* Object with properties to control Apple TV parallax effects. - * - * enabled: If true, parallax effects are enabled. Defaults to true. - * shiftDistanceX: Defaults to 2.0. - * shiftDistanceY: Defaults to 2.0. - * tiltAngle: Defaults to 0.05. - * magnification: Defaults to 1.0. - * pressMagnification: Defaults to 1.0. - * pressDuration: Defaults to 0.3. - * pressDelay: Defaults to 0.0. - * - * @platform ios - */ - tvParallaxProperties: PropTypes.object, /** * Handy for snapshot tests. */ @@ -418,8 +401,6 @@ const TouchableHighlight = ((createReactClass({ )} onLayout={this.props.onLayout} hitSlop={this.props.hitSlop} - isTVSelectable={true} - tvParallaxProperties={this.props.tvParallaxProperties} hasTVPreferredFocus={this.props.hasTVPreferredFocus} nextFocusDown={this.props.nextFocusDown} nextFocusForward={this.props.nextFocusForward} diff --git a/Libraries/Components/Touchable/TouchableNativeFeedback.android.js b/Libraries/Components/Touchable/TouchableNativeFeedback.android.js index e9ef048c452..d3d50404818 100644 --- a/Libraries/Components/Touchable/TouchableNativeFeedback.android.js +++ b/Libraries/Components/Touchable/TouchableNativeFeedback.android.js @@ -321,7 +321,6 @@ const TouchableNativeFeedback = createReactClass({ testID: this.props.testID, onLayout: this.props.onLayout, hitSlop: this.props.hitSlop, - isTVSelectable: true, nextFocusDown: this.props.nextFocusDown, nextFocusForward: this.props.nextFocusForward, nextFocusLeft: this.props.nextFocusLeft, diff --git a/Libraries/Components/Touchable/TouchableOpacity.js b/Libraries/Components/Touchable/TouchableOpacity.js index 3be1844e155..9751492e48d 100644 --- a/Libraries/Components/Touchable/TouchableOpacity.js +++ b/Libraries/Components/Touchable/TouchableOpacity.js @@ -25,7 +25,6 @@ const flattenStyle = require('../../StyleSheet/flattenStyle'); import type {Props as TouchableWithoutFeedbackProps} from './TouchableWithoutFeedback'; import type {ViewStyleProp} from '../../StyleSheet/StyleSheet'; -import type {TVParallaxPropertiesType} from '../AppleTV/TVViewPropTypes'; import type {PressEvent} from '../../Types/CoreEventTypes'; const PRESS_RETENTION_OFFSET = {top: 20, left: 20, right: 20, bottom: 30}; @@ -37,7 +36,6 @@ type TVProps = $ReadOnly<{| nextFocusLeft?: ?number, nextFocusRight?: ?number, nextFocusUp?: ?number, - tvParallaxProperties?: ?TVParallaxPropertiesType, |}>; export type Props = $ReadOnly<{| @@ -183,10 +181,6 @@ const TouchableOpacity = ((createReactClass({ * @platform android */ nextFocusUp: PropTypes.number, - /** - * Apple TV parallax effects - */ - tvParallaxProperties: PropTypes.object, }, getDefaultProps: function() { @@ -318,14 +312,12 @@ const TouchableOpacity = ((createReactClass({ nativeID={this.props.nativeID} testID={this.props.testID} onLayout={this.props.onLayout} - isTVSelectable={true} nextFocusDown={this.props.nextFocusDown} nextFocusForward={this.props.nextFocusForward} nextFocusLeft={this.props.nextFocusLeft} nextFocusRight={this.props.nextFocusRight} nextFocusUp={this.props.nextFocusUp} hasTVPreferredFocus={this.props.hasTVPreferredFocus} - tvParallaxProperties={this.props.tvParallaxProperties} hitSlop={this.props.hitSlop} focusable={ this.props.focusable !== false && this.props.onPress !== undefined diff --git a/Libraries/Components/Touchable/__tests__/__snapshots__/TouchableHighlight-test.js.snap b/Libraries/Components/Touchable/__tests__/__snapshots__/TouchableHighlight-test.js.snap index 3bbbc05d27c..41d3391d3c4 100644 --- a/Libraries/Components/Touchable/__tests__/__snapshots__/TouchableHighlight-test.js.snap +++ b/Libraries/Components/Touchable/__tests__/__snapshots__/TouchableHighlight-test.js.snap @@ -4,7 +4,6 @@ exports[`TouchableHighlight renders correctly 1`] = ` { style={styles.wrapper} testID="touchable_highlight_text_button" activeOpacity={1} - tvParallaxProperties={{ - pressMagnification: 1.3, - pressDuration: 0.6, - }} underlayColor="rgb(210, 230, 255)" onPress={this.touchableOnPress}> diff --git a/React/Views/RCTViewManager.m b/React/Views/RCTViewManager.m index 4c503aa8c80..550759cabb2 100644 --- a/React/Views/RCTViewManager.m +++ b/React/Views/RCTViewManager.m @@ -115,7 +115,7 @@ RCT_EXPORT_MODULE() #pragma mark - View properties #if TARGET_OS_TV -// Apple TV properties +// TODO: Delete props for Apple TV. RCT_EXPORT_VIEW_PROPERTY(isTVSelectable, BOOL) RCT_EXPORT_VIEW_PROPERTY(hasTVPreferredFocus, BOOL) RCT_EXPORT_VIEW_PROPERTY(tvParallaxProperties, NSDictionary)