Skip to content

Commit 95f7c79

Browse files
Simekfacebook-github-bot
authored andcommitted
remove unused VR-only props (#31230)
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
1 parent 9ebdf74 commit 95f7c79

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

Libraries/Components/ScrollView/ScrollView.js

-19
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import dismissKeyboard from '../../Utilities/dismissKeyboard';
2626
import flattenStyle from '../../StyleSheet/flattenStyle';
2727
import invariant from 'invariant';
2828
import processDecelerationRate from './processDecelerationRate';
29-
import resolveAssetSource from '../../Image/resolveAssetSource';
3029
import splitLayoutProps from '../../StyleSheet/splitLayoutProps';
3130
import setAndForwardRef from '../../Utilities/setAndForwardRef';
3231

@@ -428,22 +427,6 @@ type AndroidProps = $ReadOnly<{|
428427
fadingEdgeLength?: ?number,
429428
|}>;
430429

431-
type VRProps = $ReadOnly<{|
432-
/**
433-
* Optionally an image can be used for the scroll bar thumb. This will
434-
* override the color. While the image is loading or the image fails to
435-
* load the color will be used instead. Use an alpha of 0 in the color
436-
* to avoid seeing it while the image is loading.
437-
*
438-
* - `uri` - a string representing the resource identifier for the image, which
439-
* should be either a local file path or the name of a static image resource
440-
* - `number` - Opaque type returned by something like
441-
* `import IMAGE from './image.jpg'`.
442-
* @platform vr
443-
*/
444-
scrollBarThumbImage?: ?($ReadOnly<{||}> | number), // Opaque type returned by import IMAGE from './image.jpg'
445-
|}>;
446-
447430
type StickyHeaderComponentType = React.AbstractComponent<
448431
ScrollViewStickyHeaderProps,
449432
$ReadOnly<interface {setNextHeaderY: number => void}>,
@@ -453,7 +436,6 @@ export type Props = $ReadOnly<{|
453436
...ViewProps,
454437
...IOSProps,
455438
...AndroidProps,
456-
...VRProps,
457439

458440
/**
459441
* These styles will be applied to the scroll view content container which
@@ -1724,7 +1706,6 @@ class ScrollView extends React.Component<Props, State> {
17241706
onTouchStart: this._handleTouchStart,
17251707
onTouchCancel: this._handleTouchCancel,
17261708
onScroll: this._handleScroll,
1727-
scrollBarThumbImage: resolveAssetSource(this.props.scrollBarThumbImage),
17281709
scrollEventThrottle: hasStickyHeaders
17291710
? 1
17301711
: this.props.scrollEventThrottle,

Libraries/Components/ScrollView/__tests__/__snapshots__/ScrollView-test.js.snap

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ exports[`<ScrollView /> should render as expected: should deep render when not m
3434
onTouchMove={[Function]}
3535
onTouchStart={[Function]}
3636
pagingEnabled={false}
37-
scrollBarThumbImage={null}
3837
scrollViewRef={null}
3938
sendMomentumEvents={false}
4039
snapToEnd={true}

0 commit comments

Comments
 (0)