@samitouri / QOS-React / commits / dd53a946ec

[rn] enabled disableLegacyMode everywhere (#34947)

Stacked on https://github.com/facebook/react/pull/34946 This should be a noop, now that the legacy renderers are not being sync'd.

Ricky committed Oct 27, 2025 at 17:48 UTC dd53a946ecf4805ea0ecb885e538f69e8e3cbd61
5 files changed +12 -4
.github/workflows/runtime_commit_artifacts.yml
+1 -1
@@ -164,10 +164,10 @@ jobs:
164
165 # Delete the OSS renderers, these are sync'd to RN separately.
166 RENDERER_FOLDER=$BASE_FOLDER/react-native-github/Libraries/Renderer/implementations/
167 - SHIM_FOLDER=$BASE_FOLDER/react-native-github/Libraries/Renderer/shims/
167 rm $RENDERER_FOLDER/ReactFabric-{dev,prod,profiling}.js
168
169 # Delete the legacy renderer shim, this is not sync'd and will get deleted in the future.
170 + SHIM_FOLDER=$BASE_FOLDER/react-native-github/Libraries/Renderer/shims/
171 rm $SHIM_FOLDER/ReactNative.js
172
173 # Copy eslint-plugin-react-hooks
packages/react-native-renderer/src/__tests__/ReactFabricAndNative-test.internal.js
+8
@@ -40,6 +40,7 @@ describe('created with ReactFabric called with ReactNative', () => {
40 require('react-native/Libraries/ReactPrivate/ReactNativePrivateInterface').getNativeTagFromPublicInstance;
41 });
42
43 + // @gate !disableLegacyMode
44 it('find Fabric instances with the RN renderer', () => {
45 const View = createReactNativeComponentClass('RCTView', () => ({
46 validAttributes: {title: true},
@@ -60,6 +61,7 @@ describe('created with ReactFabric called with ReactNative', () => {
61 expect(getNativeTagFromPublicInstance(instance)).toBe(2);
62 });
63
64 + // @gate !disableLegacyMode
65 it('find Fabric nodes with the RN renderer', () => {
66 const View = createReactNativeComponentClass('RCTView', () => ({
67 validAttributes: {title: true},
@@ -80,6 +82,7 @@ describe('created with ReactFabric called with ReactNative', () => {
82 expect(handle).toBe(2);
83 });
84
85 + // @gate !disableLegacyMode
86 it('dispatches commands on Fabric nodes with the RN renderer', () => {
87 nativeFabricUIManager.dispatchCommand.mockClear();
88 const View = createReactNativeComponentClass('RCTView', () => ({
@@ -101,6 +104,7 @@ describe('created with ReactFabric called with ReactNative', () => {
104 expect(UIManager.dispatchViewManagerCommand).not.toBeCalled();
105 });
106
107 + // @gate !disableLegacyMode
108 it('dispatches sendAccessibilityEvent on Fabric nodes with the RN renderer', () => {
109 nativeFabricUIManager.sendAccessibilityEvent.mockClear();
110 const View = createReactNativeComponentClass('RCTView', () => ({
@@ -143,6 +147,7 @@ describe('created with ReactNative called with ReactFabric', () => {
147 .ReactNativeViewConfigRegistry.register;
148 });
149
150 + // @gate !disableLegacyMode
151 it('find Paper instances with the Fabric renderer', () => {
152 const View = createReactNativeComponentClass('RCTView', () => ({
153 validAttributes: {title: true},
@@ -163,6 +168,7 @@ describe('created with ReactNative called with ReactFabric', () => {
168 expect(instance._nativeTag).toBe(3);
169 });
170
171 + // @gate !disableLegacyMode
172 it('find Paper nodes with the Fabric renderer', () => {
173 const View = createReactNativeComponentClass('RCTView', () => ({
174 validAttributes: {title: true},
@@ -183,6 +189,7 @@ describe('created with ReactNative called with ReactFabric', () => {
189 expect(handle).toBe(3);
190 });
191
192 + // @gate !disableLegacyMode
193 it('dispatches commands on Paper nodes with the Fabric renderer', () => {
194 UIManager.dispatchViewManagerCommand.mockReset();
195 const View = createReactNativeComponentClass('RCTView', () => ({
@@ -205,6 +212,7 @@ describe('created with ReactNative called with ReactFabric', () => {
212 expect(nativeFabricUIManager.dispatchCommand).not.toBeCalled();
213 });
214
215 + // @gate !disableLegacyMode
216 it('dispatches sendAccessibilityEvent on Paper nodes with the Fabric renderer', () => {
217 ReactNativePrivateInterface.legacySendAccessibilityEvent.mockReset();
218 const View = createReactNativeComponentClass('RCTView', () => ({
packages/shared/forks/ReactFeatureFlags.native-fb.js
+1 -1
@@ -35,7 +35,7 @@ export const disableCommentsAsDOMContainers: boolean = true;
35 export const disableInputAttributeSyncing: boolean = false;
36 export const disableLegacyContext: boolean = false;
37 export const disableLegacyContextForFunctionComponents: boolean = false;
38 -export const disableLegacyMode: boolean = false;
38 +export const disableLegacyMode: boolean = true;
39 export const disableSchedulerTimeoutInWorkLoop: boolean = false;
40 export const disableTextareaChildren: boolean = false;
41 export const enableAsyncDebugInfo: boolean = false;
packages/shared/forks/ReactFeatureFlags.native-oss.js
+1 -1
@@ -21,7 +21,7 @@ export const disableCommentsAsDOMContainers: boolean = true;
21 export const disableInputAttributeSyncing: boolean = false;
22 export const disableLegacyContext: boolean = true;
23 export const disableLegacyContextForFunctionComponents: boolean = true;
24 -export const disableLegacyMode: boolean = false;
24 +export const disableLegacyMode: boolean = true;
25 export const disableSchedulerTimeoutInWorkLoop: boolean = false;
26 export const disableTextareaChildren: boolean = false;
27 export const enableAsyncDebugInfo: boolean = false;
packages/shared/forks/ReactFeatureFlags.test-renderer.native-fb.js
+1 -1
@@ -16,7 +16,7 @@ export const disableCommentsAsDOMContainers = true;
16 export const disableInputAttributeSyncing = false;
17 export const disableLegacyContext = false;
18 export const disableLegacyContextForFunctionComponents = false;
19 -export const disableLegacyMode = false;
19 +export const disableLegacyMode = true;
20 export const disableSchedulerTimeoutInWorkLoop = false;
21 export const disableTextareaChildren = false;
22 export const enableAsyncDebugInfo = false;