Skip to content

Commit

Permalink
remove unused VR-only props (#31230)
Browse files Browse the repository at this point in the history
Summary:
It looks like `ScrollView` still contains the remnant props for VR platform, which afaik has be discontinued a while ago (please correct me, if I'm wrong).

This PR removes `scrollBarThumbImage` prop marked as VR platform only prop from `ScrollView`.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[VR] [Removed] - remove VR platform specific `scrollBarThumbImage` prop from `ScrollView`

Pull Request resolved: #31230

Test Plan: CI

Reviewed By: javache

Differential Revision: D27367267

Pulled By: PeteTheHeat

fbshipit-source-id: b76fdb0e03c443aaf87308162bf75f8683220918
  • Loading branch information
Simek authored and facebook-github-bot committed Mar 29, 2021
1 parent 9ebdf74 commit 95f7c79
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
19 changes: 0 additions & 19 deletions Libraries/Components/ScrollView/ScrollView.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import dismissKeyboard from '../../Utilities/dismissKeyboard';
import flattenStyle from '../../StyleSheet/flattenStyle';
import invariant from 'invariant';
import processDecelerationRate from './processDecelerationRate';
import resolveAssetSource from '../../Image/resolveAssetSource';
import splitLayoutProps from '../../StyleSheet/splitLayoutProps';
import setAndForwardRef from '../../Utilities/setAndForwardRef';

Expand Down Expand Up @@ -428,22 +427,6 @@ type AndroidProps = $ReadOnly<{|
fadingEdgeLength?: ?number,
|}>;

type VRProps = $ReadOnly<{|
/**
* Optionally an image can be used for the scroll bar thumb. This will
* override the color. While the image is loading or the image fails to
* load the color will be used instead. Use an alpha of 0 in the color
* to avoid seeing it while the image is loading.
*
* - `uri` - a string representing the resource identifier for the image, which
* should be either a local file path or the name of a static image resource
* - `number` - Opaque type returned by something like
* `import IMAGE from './image.jpg'`.
* @platform vr
*/
scrollBarThumbImage?: ?($ReadOnly<{||}> | number), // Opaque type returned by import IMAGE from './image.jpg'
|}>;

type StickyHeaderComponentType = React.AbstractComponent<
ScrollViewStickyHeaderProps,
$ReadOnly<interface {setNextHeaderY: number => void}>,
Expand All @@ -453,7 +436,6 @@ export type Props = $ReadOnly<{|
...ViewProps,
...IOSProps,
...AndroidProps,
...VRProps,

/**
* These styles will be applied to the scroll view content container which
Expand Down Expand Up @@ -1724,7 +1706,6 @@ class ScrollView extends React.Component<Props, State> {
onTouchStart: this._handleTouchStart,
onTouchCancel: this._handleTouchCancel,
onScroll: this._handleScroll,
scrollBarThumbImage: resolveAssetSource(this.props.scrollBarThumbImage),
scrollEventThrottle: hasStickyHeaders
? 1
: this.props.scrollEventThrottle,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ exports[`<ScrollView /> should render as expected: should deep render when not m
onTouchMove={[Function]}
onTouchStart={[Function]}
pagingEnabled={false}
scrollBarThumbImage={null}
scrollViewRef={null}
sendMomentumEvents={false}
snapToEnd={true}
Expand Down

0 comments on commit 95f7c79

Please sign in to comment.