Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge from upstream through 2020-04-24 #803

Merged
merged 117 commits into from
Jul 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
cd13c99
Update default Podfile to not depend on a path (#28572)
grabbou Apr 9, 2020
cd347a7
Upgrade Prettier in Xplat to version 1.19.1
gkz Apr 9, 2020
ccb7dbe
Stop using get_fbobjc_enable_exception_lang_compiler_flags_DEPRECATED…
swolchok Apr 9, 2020
449dc37
Add ProGuard rule for hermes (#28571)
radko93 Apr 9, 2020
dff17ef
Move CheckBox JS files to FB Internal
poteto Apr 9, 2020
44ec762
fix: ripple should be applied even when borderless == false (#28526)
vonovak Apr 9, 2020
411c344
Remove ColorAndroid function as it adds no value over PlatfromColor (…
tom-un Apr 10, 2020
d4d6dff
iOS: mark some old NativeModule targets with depslint_never_remove
fkgozali Apr 10, 2020
8988a07
Update Gradle Wrapper to 6.3 (#28173)
friederbluemle Apr 10, 2020
46c77dc
Fix crash inside RCTRedBox when trying to present same UIViewControll…
sammy-SC Apr 10, 2020
be78673
Animated: Early detection of division by zero in AnimatedDivision
shergin Apr 11, 2020
d7d585f
Fabric: Controlling DifferentiatorMode via ReactNativeConfig
shergin Apr 11, 2020
4305a29
Upgrade Hermes dependency to 0.5.0
willholen Apr 14, 2020
49c90e9
Set width/height also to Undefined when we change the measure mode to…
SidharthGuglani-zz Apr 14, 2020
9c54bf4
Remove redundant input from TextInput
sammy-SC Apr 14, 2020
e0da72a
Update RNTester AppDelegate for changes made to SurfacePresenter API …
empyrical Apr 14, 2020
9bc7a07
Retryable ViewCommand exceptions shouldn't crash
JoshuaGross Apr 14, 2020
b861782
Remove setMostRecentEventCount from TextInput view commands
sammy-SC Apr 14, 2020
e6ed5b2
label-actions: Add canned response for upgrade issues
hramos Apr 14, 2020
eaba383
Yoga Podspec: Export YGNode and YGStyle headers (#997)
empyrical Apr 14, 2020
8901d95
Add logging to catch null TurboModules
RSNara Apr 15, 2020
36688d3
Remove module cache from ReactPackageTurboModuleManagerDelegate
RSNara Apr 15, 2020
bc99a32
Control concurrent calls into TMMDelegate from TMM
RSNara Apr 15, 2020
78266b8
Bump eslint-plugin-react-native-community version to 1.1.0
TheSavior Apr 15, 2020
75a6178
Update Babel to 7.8.x/7.9.x
cpojer Apr 15, 2020
992e0ce
fix: do not throw on missing `cliPath`, use the default value (#28625)
grabbou Apr 15, 2020
1908d50
Fix CIRCLE_PR_NUMBER may not always be set (#28640)
tido64 Apr 15, 2020
a9bac17
Add "Open Debugger" and "Open React DevTools" to iOS dev menu
rickhanlonii Apr 16, 2020
33b3a1a
Changed iOS LaunchScreen from xib to storyboard (#28239)
jeswinsimon Apr 16, 2020
25ed045
Switch over to JavaTurboModule::InitParams
RSNara Apr 16, 2020
dda7f82
RN: Shrinkwrap Text Layout (Android)
yungsters Apr 16, 2020
b2d10bc
(eslint-config) update community eslint plugin in eslint config (#28642)
Naturalclar Apr 16, 2020
ddc3300
chore: update CLI to the latest version (#28623)
grabbou Apr 16, 2020
7cedccd
Add "Open Debugger" and "Open React DevTools" to Android dev menu
rickhanlonii Apr 16, 2020
44beb2a
Remove the post install step (#28651)
priteshrnandgaonkar Apr 16, 2020
fb04237
Revert D21064653: Remove the post install step
TheSavior Apr 16, 2020
56583c6
Remove out of date TODO
rickhanlonii Apr 16, 2020
1ee8c0c
RNTester LayoutAnimation example: add more options
JoshuaGross Apr 16, 2020
b2ccfac
Add a "reparenting" LayoutAnimation example that animates flattening/…
JoshuaGross Apr 16, 2020
f5d00e5
Fix jsi cmake include dirs (#207)
ryantrem Apr 16, 2020
abde015
Resolve `kind-of` vulnerability by bumping to 6.0.3
TheSavior Apr 16, 2020
8c9c402
Move CheckBox Android files to FB internal (#28658)
poteto Apr 17, 2020
251ff1b
Part 1: Update ObjC++ codegen classes to use ObjCTurboModule::InitParams
RSNara Apr 17, 2020
03bd7d7
Part 2: Update ObjC++ codegen classes to use ObjCTurboModule::InitParams
RSNara Apr 17, 2020
d75401a
Part 3: Update RCTTurboModuleManagerDelegate to use ObjCTurboModule::…
RSNara Apr 17, 2020
90f60a8
chore: update `./scripts/test-manual-e2e.sh` (#28653)
grabbou Apr 17, 2020
49e16bd
use default value of enums YGDirection and YGMeasureMode instead of -1
SidharthGuglani-zz Apr 17, 2020
04de69a
fix typo as there is no file called YGJNI.cpp (#990)
acton393 Apr 17, 2020
894f6b3
Remove unused packages from xplat/js/package.json
cpojer Apr 17, 2020
0a67133
Make ColorValue public in StyleSheet.js
Apr 17, 2020
4c538fc
Fabric: `LayoutableShadowNode:getLayoutMetrics` is not a virtual meth…
shergin Apr 18, 2020
62544c0
Fabric: Proper traits for `ImageShadowNode` and `ViewShadowNode`
shergin Apr 18, 2020
cc07baa
Fabric: "Attempt to mutate a sealed object." is now an assert (not ex…
shergin Apr 18, 2020
e1eef24
Fabric: Implementation of `getDebugDescription` for `std::array`
shergin Apr 18, 2020
e56950d
Fabric: `componentregistry` module was decoupled from `uimanager`
shergin Apr 18, 2020
599f1ed
Fabric: `scheduler` module was decoupled from `uimanager`
shergin Apr 18, 2020
7a2c685
Fabric: `templateprocessor` module was decoupled from `uimanager`
shergin Apr 18, 2020
335f3aa
Migrate deprecated frameInterval to preferredFramesPerSecond (#28675)
safaiyeh Apr 19, 2020
de188a2
Fabric: Fix case of Glog include in MountingTest.cpp (#28616)
empyrical Apr 19, 2020
b000664
Fabric: Add Unicode prefix to AttachmentCharacter (#28617)
empyrical Apr 19, 2020
6694ce0
Fabric: Fixed incorrect early-return in `UIView+ComponentViewProtocol…
shergin Apr 20, 2020
7757ad0
Fix border-stroke drawing after resetting border-radius (#28356)
IjzerenHein Apr 20, 2020
5dc6ede
Fabric: Using proper clock in MountingTelemetryTest
shergin Apr 20, 2020
28dce36
Fix rounded border drawing when border-radius is smaller than border-…
IjzerenHein Apr 20, 2020
7cc791b
Fabric: `ComponentDescriptor::cloneProps()` now never returns the bas…
shergin Apr 20, 2020
f248ba1
Upgrade to Jest 25
cpojer Apr 20, 2020
5709996
Apply placeholderColor to TextInput component
sammy-SC Apr 20, 2020
e7ef35c
Fix mistake in swapping left/right layout properties
sammy-SC Apr 20, 2020
8057550
Fixed incorrect owner assignment in YGNode move constructor
shergin Apr 20, 2020
854f637
Easy diff to add a TODO
mdvacca Apr 20, 2020
04bc315
Add support for generating custom messages
willholen Apr 20, 2020
33ccc0a
Implement Hermes.setPauseOnLoad
willholen Apr 20, 2020
7701275
Switch isPackagerRunning to a class method.
rickhanlonii Apr 20, 2020
4afb836
Fabric: Fixed `getDirtied` vs `isDirty` in `YogaLayoutableShadowNode`
shergin Apr 21, 2020
d639063
Fabric: More strict policies to dirty Yoga nodes in YogaLayoutableSha…
shergin Apr 21, 2020
25793ea
Allow iOS PlatformColor strings to be ObjC or Swift UIColor selectors…
tom-un Apr 21, 2020
1fdb9ac
Update Differ test
JoshuaGross Apr 21, 2020
8c4efc9
Enable Yoga logging in Fabric Debug
mdvacca Apr 21, 2020
05c76be
Easy diff to document in code how to enable logging of Shadow Tree in…
mdvacca Apr 21, 2020
a136b34
Flip text alignment in case layout direction is RTL
sammy-SC Apr 21, 2020
19658a1
Daily `arc lint --take GOOGLEJAVAFORMAT`
Apr 21, 2020
17f025b
Upgrade Flipper to 0.37.0 (#28545)
sunnylqm Apr 22, 2020
0b68f3c
Upgrade babel-eslint in xplat/js
gkz Apr 22, 2020
a850d11
RN: Create `RootTag` Type
yungsters Apr 22, 2020
5242ad9
RN: Add `RootTag` Type to TurboModule
yungsters Apr 22, 2020
6aab3f8
RN: Fix Codegen Schema Buck Dependency (#28719)
yungsters Apr 22, 2020
57fee33
Flow 0.123.0 in xplat/js
panagosg7 Apr 22, 2020
2ad827b
Remove outdated metro type definitions
cpojer Apr 22, 2020
bf5f3c6
Daily `arc lint --take CLANGFORMAT`
Apr 22, 2020
df03228
remove tvOS from template (#28706)
Naturalclar Apr 22, 2020
3246eae
Fabric: `ConcreteShadowNode::initialStateData()` now accepts a `Shado…
shergin Apr 22, 2020
f64b39e
Fabric: Introducting `ShadowNodeFamilyFragment::Value`
shergin Apr 22, 2020
2c473e1
Overhaul RCTTurboModule creation and initialization
RSNara Apr 22, 2020
d06ee3d
Fix folly::dynamic crash when attaching a debugger to Hermes
willholen Apr 23, 2020
a2f8b9c
Set black as default text color for <TextInput/> on iOS (#28708)
JonnyBurger Apr 23, 2020
ca16256
Daily `arc lint --take CLANGFORMAT`
Apr 23, 2020
ab9b212
RN: Rename `{ => Event}ObjectPropertyType` in Codegen
yungsters Apr 23, 2020
1b2bcb1
RN: Rename `{NativePrimitive => ReservedProp}TypeAnnotation` in Codegen
yungsters Apr 23, 2020
b8bfc50
RN: Rename `{ => NativeModule}MethodTypeShape` in Codegen
yungsters Apr 23, 2020
064cb12
RN: Add `RootTag` Codegen Parser Test (and Cleanup)
yungsters Apr 23, 2020
310b0c3
RN: Add `RootTag` to New NativeModule Codegen
yungsters Apr 23, 2020
4d9fa4b
RN: Add `RootTag` to New Commands Codegen
yungsters Apr 23, 2020
a903d1b
BackHandler: specify function return type for handler (#28192)
Naturalclar Apr 23, 2020
78b1c85
Fabric: Simplifying Yoga and Fabric integration
shergin Apr 23, 2020
17adf54
Clean up comments about null state wrappers
JoshuaGross Apr 23, 2020
bda8aae
Modal: disable view flattening explicitly for the children of Modal, …
JoshuaGross Apr 23, 2020
ed29ba1
Support `contentOffset` property in Android's ScrollView and Horizont…
JoshuaGross Apr 23, 2020
025be81
RN: Fix Text Layout Ignoring Parent Bounds
yungsters Apr 24, 2020
4ae2de2
Remove unnecessary cast to int in TextInlineView measure functions
mdvacca Apr 24, 2020
fa69356
Use RTL in RTLExample when Platform != android (#28742)
kmelmon Apr 24, 2020
2b56011
Add Dark Mode support to the App template and NewAppScreen components…
Simek Apr 24, 2020
8173427
Allow use of std::tuple<> with decorators directly
mhorowitz Apr 24, 2020
fef8bc3
Fabric: Added assert in ShadowNode
shergin Apr 25, 2020
aad9960
Fabric: Test for State Reconciliation mechanism
shergin Apr 25, 2020
30cc158
ScrollView, HorizontalScrollView: support `null` contentOffset
JoshuaGross Apr 25, 2020
fd34ef0
Merge commit '17f025bc26da13da795845a3f7daee65563420c0' into amgleitm…
amgleitman Jul 20, 2021
8f6b9fb
Merge commit '30cc158a875a0414cf53d4d5155410eea5d5aeea' into amgleitm…
amgleitman Jul 21, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .flowconfig
Expand Up @@ -90,4 +90,4 @@ untyped-import
untyped-type-import

[version]
^0.122.0
^0.123.0
2 changes: 1 addition & 1 deletion .flowconfig.android
Expand Up @@ -93,4 +93,4 @@ untyped-import
untyped-type-import

[version]
^0.122.0
^0.123.0
2 changes: 1 addition & 1 deletion .flowconfig.macos
Expand Up @@ -89,4 +89,4 @@ untyped-import
untyped-type-import

[version]
^0.122.0
^0.123.0
4 changes: 4 additions & 0 deletions .github/label-actions.yml
Expand Up @@ -10,6 +10,10 @@
comment: >
Please report documentation issues in the [`react-native-website`](https://github.com/facebook/react-native-website/issues) repository.
close: true
"Type: Upgrade Issue":
comment: >
Do you need help upgrading to a newer React Native version? Visit the [Upgrade Support repository](https://github.com/react-native-community/upgrade-support) or use the [upgrade helper](https://react-native-community.github.io/upgrade-helper/) to see the changes that need to be made to upgrade your app.
close: true
"Resolution: For Stack Overflow":
comment: >
We are using GitHub issues exclusively to track bugs in the core React Native library. Please try asking over on [Stack Overflow](http://stackoverflow.com/questions/tagged/react-native) as it is better suited for this type of question.
Expand Down
2 changes: 1 addition & 1 deletion Libraries/ActionSheetIOS/ActionSheetIOS.js
Expand Up @@ -14,7 +14,7 @@ import RCTActionSheetManager from './NativeActionSheetManager';

const invariant = require('invariant');
const processColor = require('../StyleSheet/processColor');
import type {ColorValue} from '../StyleSheet/StyleSheetTypes';
import type {ColorValue} from '../StyleSheet/StyleSheet';
import type {ProcessedColorValue} from '../StyleSheet/processColor';

/**
Expand Down
3 changes: 3 additions & 0 deletions Libraries/Animated/src/nodes/AnimatedDivision.js
Expand Up @@ -23,6 +23,9 @@ class AnimatedDivision extends AnimatedWithChildren {

constructor(a: AnimatedNode | number, b: AnimatedNode | number) {
super();
if (b === 0) {
console.error('Detected potential division by zero in AnimatedDivision');
}
this._a = typeof a === 'number' ? new AnimatedValue(a) : a;
this._b = typeof b === 'number' ? new AnimatedValue(b) : b;
}
Expand Down
7 changes: 2 additions & 5 deletions Libraries/Blob/RCTBlobManager.mm
Expand Up @@ -310,12 +310,9 @@ - (id)processWebsocketMessage:(id)message
};
}

- (std::shared_ptr<facebook::react::TurboModule>)
getTurboModuleWithJsInvoker:(std::shared_ptr<facebook::react::CallInvoker>)jsInvoker
nativeInvoker:(std::shared_ptr<facebook::react::CallInvoker>)nativeInvoker
perfLogger:(id<RCTTurboModulePerformanceLogger>)perfLogger
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const facebook::react::ObjCTurboModule::InitParams &)params
{
return std::make_shared<facebook::react::NativeBlobModuleSpecJSI>(self, jsInvoker, nativeInvoker, perfLogger);
return std::make_shared<facebook::react::NativeBlobModuleSpecJSI>(params);
}

@end
Expand Down
7 changes: 2 additions & 5 deletions Libraries/Blob/RCTFileReaderModule.mm
Expand Up @@ -71,12 +71,9 @@ @implementation RCTFileReaderModule
}
}

- (std::shared_ptr<facebook::react::TurboModule>)
getTurboModuleWithJsInvoker:(std::shared_ptr<facebook::react::CallInvoker>)jsInvoker
nativeInvoker:(std::shared_ptr<facebook::react::CallInvoker>)nativeInvoker
perfLogger:(id<RCTTurboModulePerformanceLogger>)perfLogger
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const facebook::react::ObjCTurboModule::InitParams &)params
{
return std::make_shared<facebook::react::NativeFileReaderModuleSpecJSI>(self, jsInvoker, nativeInvoker, perfLogger);
return std::make_shared<facebook::react::NativeFileReaderModuleSpecJSI>(params);
}

@end
Expand Down
Expand Up @@ -16,7 +16,7 @@ const StyleSheet = require('../../StyleSheet/StyleSheet');
const View = require('../View/View');
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
import type {ViewProps} from '../View/ViewPropTypes';
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
import type {ColorValue} from '../../StyleSheet/StyleSheet';

const PlatformActivityIndicator =
Platform.OS === 'android'
Expand Down
Expand Up @@ -12,7 +12,7 @@

import type {WithDefault} from '../../Types/CodegenTypes';

import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
import type {ColorValue} from '../../StyleSheet/StyleSheet';
import type {ViewProps} from '../View/ViewPropTypes';

import codegenNativeComponent from '../../Utilities/codegenNativeComponent';
Expand Down
Expand Up @@ -34,7 +34,7 @@ exports[`<ActivityIndicator /> should render as expected: should deep render whe
`;

exports[`<ActivityIndicator /> should render as expected: should shallow render as <ActivityIndicator /> when mocked 1`] = `
<ForwardRef(ActivityIndicator)
<ActivityIndicator
animating={true}
color="#0000ff"
hidesWhenStopped={true}
Expand All @@ -43,7 +43,7 @@ exports[`<ActivityIndicator /> should render as expected: should shallow render
`;

exports[`<ActivityIndicator /> should render as expected: should shallow render as <ActivityIndicator /> when not mocked 1`] = `
<ForwardRef(ActivityIndicator)
<ActivityIndicator
animating={true}
color="#0000ff"
hidesWhenStopped={true}
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Components/Button.js
Expand Up @@ -22,7 +22,7 @@ const invariant = require('invariant');

import type {PressEvent, KeyEvent} from '../Types/CoreEventTypes';
import type {FocusEvent, BlurEvent} from './TextInput/TextInput'; // TODO(OSS Candidate ISS#2710739)
import type {ColorValue} from '../StyleSheet/StyleSheetTypes';
import type {ColorValue} from '../StyleSheet/StyleSheet';
import type {
AccessibilityActionEvent,
AccessibilityActionInfo,
Expand Down
Expand Up @@ -11,7 +11,7 @@
'use strict';

import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
import type {ColorValue} from 'react-native/Libraries/StyleSheet/StyleSheetTypes';
import type {ColorValue} from 'react-native/Libraries/StyleSheet/StyleSheet';
import type {
WithDefault,
DirectEventHandler,
Expand Down
Expand Up @@ -25,8 +25,7 @@ import AndroidDrawerLayoutNativeComponent, {

const DRAWER_STATES = ['Idle', 'Dragging', 'Settling'];

import type {ViewStyleProp} from '../../StyleSheet/StyleSheet';
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
import type {ColorValue, ViewStyleProp} from '../../StyleSheet/StyleSheet';
import type {DirectEventHandler} from '../../Types/CodegenTypes';
import type {
MeasureOnSuccessCallback,
Expand Down
Expand Up @@ -22,7 +22,7 @@ import type {
} from '../../Types/CodegenTypes';
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
import type {TextStyleProp} from '../../StyleSheet/StyleSheet';
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
import type {ColorValue} from '../../StyleSheet/StyleSheet';
import type {ProcessedColorValue} from '../../StyleSheet/processColor';
import type {ViewProps} from '../../Components/View/ViewPropTypes';

Expand Down
Expand Up @@ -22,7 +22,7 @@ import type {
} from '../../Types/CodegenTypes';
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
import type {TextStyleProp} from '../../StyleSheet/StyleSheet';
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
import type {ColorValue} from '../../StyleSheet/StyleSheet';
import type {ProcessedColorValue} from '../../StyleSheet/processColor';
import type {ViewProps} from '../../Components/View/ViewPropTypes';

Expand Down
2 changes: 1 addition & 1 deletion Libraries/Components/Picker/Picker.js
Expand Up @@ -17,7 +17,7 @@ const React = require('react');
const UnimplementedView = require('../UnimplementedViews/UnimplementedView');

import type {TextStyleProp} from '../../StyleSheet/StyleSheet';
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
import type {ColorValue} from '../../StyleSheet/StyleSheet';

const MODE_DIALOG = 'dialog';
const MODE_DROPDOWN = 'dropdown';
Expand Down
3 changes: 1 addition & 2 deletions Libraries/Components/Picker/PickerAndroid.android.js
Expand Up @@ -21,9 +21,8 @@ import StyleSheet from '../../StyleSheet/StyleSheet';
import invariant from 'invariant';
import processColor from '../../StyleSheet/processColor';

import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
import type {SyntheticEvent} from '../../Types/CoreEventTypes';
import type {TextStyleProp} from '../../StyleSheet/StyleSheet';
import type {ColorValue, TextStyleProp} from '../../StyleSheet/StyleSheet';

type PickerItemSelectSyntheticEvent = SyntheticEvent<
$ReadOnly<{|
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Components/Picker/PickerIOS.ios.js
Expand Up @@ -24,7 +24,7 @@ import RCTPickerNativeComponent, {
Commands as PickerCommands,
} from './RCTPickerNativeComponent';
import type {TextStyleProp} from '../../StyleSheet/StyleSheet';
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
import type {ColorValue} from '../../StyleSheet/StyleSheet';
import type {ProcessedColorValue} from '../../StyleSheet/processColor';
import type {SyntheticEvent} from '../../Types/CoreEventTypes';
import type {ViewProps} from '../View/ViewPropTypes';
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Components/Pressable/Pressable.js
Expand Up @@ -25,7 +25,7 @@ import type {
import {PressabilityDebugView} from '../../Pressability/PressabilityDebug';
import usePressability from '../../Pressability/usePressability';
import {normalizeRect, type RectOrSize} from '../../StyleSheet/Rect';
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
import type {ColorValue} from '../../StyleSheet/StyleSheet';
import type {
LayoutEvent,
MouseEvent, // TODO(macOS GH#774)
Expand Down
15 changes: 7 additions & 8 deletions Libraries/Components/Pressable/useAndroidRippleForView.js
Expand Up @@ -12,7 +12,7 @@

import invariant from 'invariant';
import {Commands} from '../View/ViewNativeComponent';
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
import type {ColorValue} from '../../StyleSheet/StyleSheet';
import type {PressEvent} from '../../Types/CoreEventTypes';
import {Platform, View, processColor} from 'react-native';
import * as React from 'react';
Expand All @@ -26,9 +26,9 @@ type NativeBackgroundProp = $ReadOnly<{|
|}>;

export type RippleConfig = {|
color?: ?ColorValue,
borderless?: ?boolean,
radius?: ?number,
color?: ColorValue,
borderless?: boolean,
radius?: number,
|};

/**
Expand All @@ -47,13 +47,12 @@ export default function useAndroidRippleForView(
|}>,
|}> {
const {color, borderless, radius} = rippleConfig ?? {};
const normalizedBorderless = borderless === true;

return useMemo(() => {
if (
Platform.OS === 'android' &&
Platform.Version >= 21 &&
(color != null || normalizedBorderless || radius != null)
(color != null || borderless != null || radius != null)
) {
const processedColor = processColor(color);
invariant(
Expand All @@ -67,7 +66,7 @@ export default function useAndroidRippleForView(
nativeBackgroundAndroid: {
type: 'RippleAndroid',
color: processedColor,
borderless: normalizedBorderless,
borderless: borderless === true,
rippleRadius: radius,
},
},
Expand Down Expand Up @@ -101,5 +100,5 @@ export default function useAndroidRippleForView(
};
}
return null;
}, [color, normalizedBorderless, radius, viewRef]);
}, [color, borderless, radius, viewRef]);
}
Expand Up @@ -15,7 +15,7 @@ const React = require('react');
import ProgressBarAndroidNativeComponent from './ProgressBarAndroidNativeComponent';

import type {ViewProps} from '../View/ViewPropTypes';
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
import type {ColorValue} from '../../StyleSheet/StyleSheet';

export type ProgressBarAndroidProps = $ReadOnly<{|
...ViewProps,
Expand Down
Expand Up @@ -10,7 +10,7 @@

'use strict';

import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
import type {ColorValue} from '../../StyleSheet/StyleSheet';
import type {ViewProps} from '../View/ViewPropTypes';
import type {Double, WithDefault} from '../../Types/CodegenTypes';

Expand Down
Expand Up @@ -15,7 +15,7 @@ const StyleSheet = require('../../StyleSheet/StyleSheet');

import RCTProgressViewNativeComponent from './RCTProgressViewNativeComponent';
import type {ImageSource} from '../../Image/ImageSource';
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
import type {ColorValue} from '../../StyleSheet/StyleSheet';
import type {ViewProps} from '../View/ViewPropTypes';

type Props = $ReadOnly<{|
Expand Down
Expand Up @@ -12,7 +12,7 @@

import type {Float, WithDefault} from '../../Types/CodegenTypes';
import type {ImageSource} from '../../Image/ImageSource';
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
import type {ColorValue} from '../../StyleSheet/StyleSheet';
import type {ViewProps} from '../View/ViewPropTypes';

import codegenNativeComponent from '../../Utilities/codegenNativeComponent';
Expand Down
Expand Up @@ -22,7 +22,7 @@ import type {
Int32,
WithDefault,
} from '../../Types/CodegenTypes';
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
import type {ColorValue} from '../../StyleSheet/StyleSheet';
import type {ViewProps} from '../View/ViewPropTypes';

type NativeProps = $ReadOnly<{|
Expand Down
Expand Up @@ -11,7 +11,7 @@
'use strict';

import type {DirectEventHandler, WithDefault} from '../../Types/CodegenTypes';
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
import type {ColorValue} from '../../StyleSheet/StyleSheet';
import type {ViewProps} from '../View/ViewPropTypes';
import * as React from 'react';

Expand Down
2 changes: 1 addition & 1 deletion Libraries/Components/RefreshControl/RefreshControl.js
Expand Up @@ -13,7 +13,7 @@
const Platform = require('../../Utilities/Platform');
const React = require('react');

import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
import type {ColorValue} from '../../StyleSheet/StyleSheet';
import type {ViewProps} from '../View/ViewPropTypes';
import AndroidSwipeRefreshLayoutNativeComponent, {
Commands as AndroidSwipeRefreshLayoutCommands,
Expand Down
Expand Up @@ -37,6 +37,7 @@ const AndroidHorizontalScrollViewViewConfig = {
snapToInterval: true,
snapToStart: true,
snapToOffsets: true,
contentOffset: true,
},
};

Expand Down
2 changes: 1 addition & 1 deletion Libraries/Components/ScrollView/ScrollView.js
Expand Up @@ -31,7 +31,7 @@ const setAndForwardRef = require('../../Utilities/setAndForwardRef');
import type {EdgeInsetsProp} from '../../StyleSheet/EdgeInsetsPropType';
import type {PointProp} from '../../StyleSheet/PointPropType';
import type {ViewStyleProp} from '../../StyleSheet/StyleSheet';
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
import type {ColorValue} from '../../StyleSheet/StyleSheet';
import type {
PressEvent,
ScrollEvent,
Expand Down
Expand Up @@ -16,7 +16,7 @@ import type {
ViewStyleProp,
DangerouslyImpreciseStyle,
} from '../../StyleSheet/StyleSheet';
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
import type {ColorValue} from '../../StyleSheet/StyleSheet';
import type {EdgeInsetsProp} from '../../StyleSheet/EdgeInsetsPropType';
import type {ScrollEvent} from '../../Types/CoreEventTypes';
import type {PointProp} from '../../StyleSheet/PointPropType';
Expand Down
Expand Up @@ -73,21 +73,21 @@ exports[`<ScrollView /> should render as expected: should deep render when not m
`;

exports[`<ScrollView /> should render as expected: should shallow render as <ScrollView /> when mocked 1`] = `
<ForwardRef(ScrollView)>
<ScrollView>
<View>
<Text>
Hello World!
</Text>
</View>
</ForwardRef(ScrollView)>
</ScrollView>
`;

exports[`<ScrollView /> should render as expected: should shallow render as <ScrollView /> when not mocked 1`] = `
<ForwardRef(ScrollView)>
<ScrollView>
<View>
<Text>
Hello World!
</Text>
</View>
</ForwardRef(ScrollView)>
</ScrollView>
`;
Expand Up @@ -18,7 +18,7 @@ import type {
WithDefault,
Int32,
} from '../../Types/CodegenTypes';
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
import type {ColorValue} from '../../StyleSheet/StyleSheet';

export type OnChangeEvent = $ReadOnly<{|
value: Int32,
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Components/Slider/Slider.js
Expand Up @@ -17,7 +17,7 @@ const StyleSheet = require('../../StyleSheet/StyleSheet');

import type {ImageSource} from '../../Image/ImageSource';
import type {ViewStyleProp} from '../../StyleSheet/StyleSheet';
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
import type {ColorValue} from '../../StyleSheet/StyleSheet';
import type {ViewProps} from '../View/ViewPropTypes';
import type {SyntheticEvent} from '../../Types/CoreEventTypes';

Expand Down
2 changes: 1 addition & 1 deletion Libraries/Components/Slider/SliderNativeComponent.js
Expand Up @@ -20,7 +20,7 @@ import type {
import codegenNativeComponent from '../../Utilities/codegenNativeComponent';
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';

import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
import type {ColorValue} from '../../StyleSheet/StyleSheet';
import type {ImageSource} from '../../Image/ImageSource';
import type {ViewProps} from '../View/ViewPropTypes';

Expand Down