Skip to content

Commit 3419420

Browse files
authored
[flags] Cleanup enableActivity (#35681)
1 parent b1533b0 commit 3419420

17 files changed

+27
-130
lines changed

packages/react-dom/src/__tests__/ReactDOMActivity-test.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ describe('ReactDOMActivity', () => {
5454
return <span prop={props.text}>{props.children}</span>;
5555
}
5656

57-
// @gate enableActivity
5857
it(
5958
'hiding an Activity boundary also hides the direct children of any ' +
6059
'portals it contains, regardless of how deeply nested they are',
@@ -100,7 +99,6 @@ describe('ReactDOMActivity', () => {
10099
},
101100
);
102101

103-
// @gate enableActivity
104102
it(
105103
'revealing an Activity boundary inside a portal does not reveal the ' +
106104
'portal contents if has a hidden Activity parent',
@@ -151,7 +149,6 @@ describe('ReactDOMActivity', () => {
151149
},
152150
);
153151

154-
// @gate enableActivity
155152
it('hides new portals added to an already hidden tree', async () => {
156153
function Child() {
157154
return <Text text="Child" />;
@@ -218,7 +215,6 @@ describe('ReactDOMActivity', () => {
218215
);
219216
});
220217

221-
// @gate enableActivity
222218
it('hides new insertions inside an already hidden portal', async () => {
223219
function Child({text}) {
224220
useLayoutEffect(() => {
@@ -289,7 +285,6 @@ describe('ReactDOMActivity', () => {
289285
);
290286
});
291287

292-
// @gate enableActivity
293288
it('reveal an inner Suspense boundary without revealing an outer Activity on the same host child', async () => {
294289
const promise = new Promise(() => {});
295290

@@ -390,7 +385,6 @@ describe('ReactDOMActivity', () => {
390385
);
391386
});
392387

393-
// @gate enableActivity
394388
it('mounts/unmounts layout effects in portal when visibility changes (starting visible)', async () => {
395389
function Child() {
396390
useLayoutEffect(() => {
@@ -440,7 +434,6 @@ describe('ReactDOMActivity', () => {
440434
);
441435
});
442436

443-
// @gate enableActivity
444437
it('mounts/unmounts layout effects in portal when visibility changes (starting hidden)', async () => {
445438
function Child() {
446439
useLayoutEffect(() => {

packages/react-dom/src/__tests__/ReactDOMFragmentRefs-test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ describe('FragmentRefs', () => {
763763
});
764764

765765
describe('with activity', () => {
766-
// @gate enableFragmentRefs && enableActivity
766+
// @gate enableFragmentRefs
767767
it('does not apply event listeners to hidden trees', async () => {
768768
const parentRef = React.createRef();
769769
const fragmentRef = React.createRef();
@@ -799,7 +799,7 @@ describe('FragmentRefs', () => {
799799
expect(logs).toEqual(['Child 1', 'Child 3']);
800800
});
801801

802-
// @gate enableFragmentRefs && enableActivity
802+
// @gate enableFragmentRefs
803803
it('applies event listeners to visible trees', async () => {
804804
const parentRef = React.createRef();
805805
const fragmentRef = React.createRef();
@@ -835,7 +835,7 @@ describe('FragmentRefs', () => {
835835
expect(logs).toEqual(['Child 1', 'Child 2', 'Child 3']);
836836
});
837837

838-
// @gate enableFragmentRefs && enableActivity
838+
// @gate enableFragmentRefs
839839
it('handles Activity modes switching', async () => {
840840
const fragmentRef = React.createRef();
841841
const fragmentRef2 = React.createRef();

packages/react-dom/src/__tests__/ReactDOMServerPartialHydration-test.internal.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3668,7 +3668,6 @@ describe('ReactDOMServerPartialHydration', () => {
36683668
expect(ref.current.innerHTML).toBe('Hidden child');
36693669
});
36703670

3671-
// @gate enableActivity
36723671
it('a visible Activity component is surrounded by comment markers', async () => {
36733672
const ref = React.createRef();
36743673

@@ -3706,7 +3705,6 @@ describe('ReactDOMServerPartialHydration', () => {
37063705
expect(ref.current).toBe(span);
37073706
});
37083707

3709-
// @gate enableActivity
37103708
it('a hidden Activity component is skipped over during server rendering', async () => {
37113709
const visibleRef = React.createRef();
37123710

0 commit comments

Comments
 (0)