Skip to content

Commit dd53a94

Browse files
authored
[rn] enabled disableLegacyMode everywhere (facebook#34947)
Stacked on facebook#34946 This should be a noop, now that the legacy renderers are not being sync'd.
1 parent 90817f8 commit dd53a94

File tree

5 files changed

+12
-4
lines changed

5 files changed

+12
-4
lines changed

.github/workflows/runtime_commit_artifacts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,10 @@ jobs:
164164
165165
# Delete the OSS renderers, these are sync'd to RN separately.
166166
RENDERER_FOLDER=$BASE_FOLDER/react-native-github/Libraries/Renderer/implementations/
167-
SHIM_FOLDER=$BASE_FOLDER/react-native-github/Libraries/Renderer/shims/
168167
rm $RENDERER_FOLDER/ReactFabric-{dev,prod,profiling}.js
169168
170169
# 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/
171171
rm $SHIM_FOLDER/ReactNative.js
172172
173173
# Copy eslint-plugin-react-hooks

packages/react-native-renderer/src/__tests__/ReactFabricAndNative-test.internal.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ describe('created with ReactFabric called with ReactNative', () => {
4040
require('react-native/Libraries/ReactPrivate/ReactNativePrivateInterface').getNativeTagFromPublicInstance;
4141
});
4242

43+
// @gate !disableLegacyMode
4344
it('find Fabric instances with the RN renderer', () => {
4445
const View = createReactNativeComponentClass('RCTView', () => ({
4546
validAttributes: {title: true},
@@ -60,6 +61,7 @@ describe('created with ReactFabric called with ReactNative', () => {
6061
expect(getNativeTagFromPublicInstance(instance)).toBe(2);
6162
});
6263

64+
// @gate !disableLegacyMode
6365
it('find Fabric nodes with the RN renderer', () => {
6466
const View = createReactNativeComponentClass('RCTView', () => ({
6567
validAttributes: {title: true},
@@ -80,6 +82,7 @@ describe('created with ReactFabric called with ReactNative', () => {
8082
expect(handle).toBe(2);
8183
});
8284

85+
// @gate !disableLegacyMode
8386
it('dispatches commands on Fabric nodes with the RN renderer', () => {
8487
nativeFabricUIManager.dispatchCommand.mockClear();
8588
const View = createReactNativeComponentClass('RCTView', () => ({
@@ -101,6 +104,7 @@ describe('created with ReactFabric called with ReactNative', () => {
101104
expect(UIManager.dispatchViewManagerCommand).not.toBeCalled();
102105
});
103106

107+
// @gate !disableLegacyMode
104108
it('dispatches sendAccessibilityEvent on Fabric nodes with the RN renderer', () => {
105109
nativeFabricUIManager.sendAccessibilityEvent.mockClear();
106110
const View = createReactNativeComponentClass('RCTView', () => ({
@@ -143,6 +147,7 @@ describe('created with ReactNative called with ReactFabric', () => {
143147
.ReactNativeViewConfigRegistry.register;
144148
});
145149

150+
// @gate !disableLegacyMode
146151
it('find Paper instances with the Fabric renderer', () => {
147152
const View = createReactNativeComponentClass('RCTView', () => ({
148153
validAttributes: {title: true},
@@ -163,6 +168,7 @@ describe('created with ReactNative called with ReactFabric', () => {
163168
expect(instance._nativeTag).toBe(3);
164169
});
165170

171+
// @gate !disableLegacyMode
166172
it('find Paper nodes with the Fabric renderer', () => {
167173
const View = createReactNativeComponentClass('RCTView', () => ({
168174
validAttributes: {title: true},
@@ -183,6 +189,7 @@ describe('created with ReactNative called with ReactFabric', () => {
183189
expect(handle).toBe(3);
184190
});
185191

192+
// @gate !disableLegacyMode
186193
it('dispatches commands on Paper nodes with the Fabric renderer', () => {
187194
UIManager.dispatchViewManagerCommand.mockReset();
188195
const View = createReactNativeComponentClass('RCTView', () => ({
@@ -205,6 +212,7 @@ describe('created with ReactNative called with ReactFabric', () => {
205212
expect(nativeFabricUIManager.dispatchCommand).not.toBeCalled();
206213
});
207214

215+
// @gate !disableLegacyMode
208216
it('dispatches sendAccessibilityEvent on Paper nodes with the Fabric renderer', () => {
209217
ReactNativePrivateInterface.legacySendAccessibilityEvent.mockReset();
210218
const View = createReactNativeComponentClass('RCTView', () => ({

packages/shared/forks/ReactFeatureFlags.native-fb.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const disableCommentsAsDOMContainers: boolean = true;
3535
export const disableInputAttributeSyncing: boolean = false;
3636
export const disableLegacyContext: boolean = false;
3737
export const disableLegacyContextForFunctionComponents: boolean = false;
38-
export const disableLegacyMode: boolean = false;
38+
export const disableLegacyMode: boolean = true;
3939
export const disableSchedulerTimeoutInWorkLoop: boolean = false;
4040
export const disableTextareaChildren: boolean = false;
4141
export const enableAsyncDebugInfo: boolean = false;

packages/shared/forks/ReactFeatureFlags.native-oss.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const disableCommentsAsDOMContainers: boolean = true;
2121
export const disableInputAttributeSyncing: boolean = false;
2222
export const disableLegacyContext: boolean = true;
2323
export const disableLegacyContextForFunctionComponents: boolean = true;
24-
export const disableLegacyMode: boolean = false;
24+
export const disableLegacyMode: boolean = true;
2525
export const disableSchedulerTimeoutInWorkLoop: boolean = false;
2626
export const disableTextareaChildren: boolean = false;
2727
export const enableAsyncDebugInfo: boolean = false;

packages/shared/forks/ReactFeatureFlags.test-renderer.native-fb.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const disableCommentsAsDOMContainers = true;
1616
export const disableInputAttributeSyncing = false;
1717
export const disableLegacyContext = false;
1818
export const disableLegacyContextForFunctionComponents = false;
19-
export const disableLegacyMode = false;
19+
export const disableLegacyMode = true;
2020
export const disableSchedulerTimeoutInWorkLoop = false;
2121
export const disableTextareaChildren = false;
2222
export const enableAsyncDebugInfo = false;

0 commit comments

Comments
 (0)