From 91a35aa3f7aeb0dcd4565b56767211601d4ab9e0 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Fri, 13 Sep 2024 04:48:54 -0700 Subject: [PATCH] Fix Basic SVC for RNTester iOS (#46439) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/46439 The SVC for some components on iOS got out of sync. This was creating warnings in the React Native DevTools and it was affecting the release of 0.76. With this change, I updated the manually written SVC so that we don't have warnings anymore. We still have to fix the `boxShadow` and `filter`. This will happen in a later change. ## Changelog [iOS][Fixed] - Solved SVC warnings for RNTester Reviewed By: NickGerleman Differential Revision: D62501704 --- .../Components/ScrollView/ScrollViewNativeComponent.js | 3 +++ .../Components/TextInput/RCTTextInputViewConfig.js | 9 +++++++++ .../Libraries/NativeComponent/BaseViewConfig.ios.js | 9 +++++++++ 3 files changed, 21 insertions(+) diff --git a/packages/react-native/Libraries/Components/ScrollView/ScrollViewNativeComponent.js b/packages/react-native/Libraries/Components/ScrollView/ScrollViewNativeComponent.js index aa4f79b921d7..0d39831a6c50 100644 --- a/packages/react-native/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +++ b/packages/react-native/Libraries/Components/ScrollView/ScrollViewNativeComponent.js @@ -160,6 +160,9 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig = snapToInterval: true, snapToOffsets: true, snapToStart: true, + verticalScrollIndicatorInsets: { + diff: require('../../Utilities/differ/insetsDiffer'), + }, zoomScale: true, ...ConditionallyIgnoredEventHandlers({ onScrollBeginDrag: true, diff --git a/packages/react-native/Libraries/Components/TextInput/RCTTextInputViewConfig.js b/packages/react-native/Libraries/Components/TextInput/RCTTextInputViewConfig.js index 1bc2dcacc3d9..72e719c3ea71 100644 --- a/packages/react-native/Libraries/Components/TextInput/RCTTextInputViewConfig.js +++ b/packages/react-native/Libraries/Components/TextInput/RCTTextInputViewConfig.js @@ -85,8 +85,15 @@ const RCTTextInputViewConfig = { topContentSizeChange: { registrationName: 'onContentSizeChange', }, + topChangeSync: { + registrationName: 'onChangeSync', + }, + topKeyPressSync: { + registrationName: 'onKeyPressSync', + }, }, validAttributes: { + dynamicTypeRamp: true, fontSize: true, fontWeight: true, fontVariant: true, @@ -151,6 +158,8 @@ const RCTTextInputViewConfig = { onSelectionChange: true, onContentSizeChange: true, onScroll: true, + onChangeSync: true, + onKeyPressSync: true, }), }, }; diff --git a/packages/react-native/Libraries/NativeComponent/BaseViewConfig.ios.js b/packages/react-native/Libraries/NativeComponent/BaseViewConfig.ios.js index 778568f7c013..053ce08da335 100644 --- a/packages/react-native/Libraries/NativeComponent/BaseViewConfig.ios.js +++ b/packages/react-native/Libraries/NativeComponent/BaseViewConfig.ios.js @@ -198,6 +198,7 @@ const validAttributesForNonEventProps = { testID: true, backgroundColor: {process: require('../StyleSheet/processColor').default}, backfaceVisibility: true, + cursor: true, opacity: true, shadowColor: {process: require('../StyleSheet/processColor').default}, shadowOffset: {diff: require('../Utilities/differ/sizesDiffer')}, @@ -216,8 +217,10 @@ const validAttributesForNonEventProps = { role: true, borderRadius: true, borderColor: {process: require('../StyleSheet/processColor').default}, + borderBlockColor: {process: require('../StyleSheet/processColor').default}, borderCurve: true, borderWidth: true, + borderBlockWidth: true, borderStyle: true, hitSlop: {diff: require('../Utilities/differ/insetsDiffer')}, collapsable: true, @@ -240,9 +243,15 @@ const validAttributesForNonEventProps = { borderLeftWidth: true, borderLeftColor: {process: require('../StyleSheet/processColor').default}, borderStartWidth: true, + borderBlockStartWidth: true, borderStartColor: {process: require('../StyleSheet/processColor').default}, + borderBlockStartColor: { + process: require('../StyleSheet/processColor').default, + }, borderEndWidth: true, + borderBlockEndWidth: true, borderEndColor: {process: require('../StyleSheet/processColor').default}, + borderBlockEndColor: {process: require('../StyleSheet/processColor').default}, borderTopLeftRadius: true, borderTopRightRadius: true,