From 507934f7d9d26dccc3e0db797ca78ca75ad4fc2b Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Fri, 13 Sep 2024 08:10:10 -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 fbshipit-source-id: 3c02f7615c3511a97eba73a2ddaa713d2e4e30f0 --- .../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 aa4f79b921d..0d39831a6c5 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 0aa8965bda3..b20e518d978 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, @@ -150,6 +157,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 778568f7c01..053ce08da33 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,