Skip to content

Commit 9ca214a

Browse files
committed
Remove network experiment and experimental icon
1 parent 59c63cb commit 9ca214a

File tree

6 files changed

+9
-51
lines changed

6 files changed

+9
-51
lines changed

front_end/core/rn_experiments/experimentsImpl.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,3 @@ Instance.register({
184184
unstable: false,
185185
enabledByDefault: ({ isReactNativeEntryPoint }) => isReactNativeEntryPoint,
186186
});
187-
188-
Instance.register({
189-
name: RNExperimentName.ENABLE_NETWORK_PANEL,
190-
title: 'Enable Network panel',
191-
unstable: true,
192-
enabledByDefault: () => false,
193-
});

front_end/core/root/Runtime.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,6 @@ export const experiments = new ExperimentsSupport();
305305
export enum RNExperimentName {
306306
REACT_NATIVE_SPECIFIC_UI = 'react-native-specific-ui',
307307
JS_HEAP_PROFILER_ENABLE = 'js-heap-profiler-enable',
308-
ENABLE_NETWORK_PANEL = 'enable-network-panel',
309308
}
310309

311310
export enum ConditionName {
@@ -340,7 +339,6 @@ export const enum ExperimentName {
340339
JS_HEAP_PROFILER_ENABLE = RNExperimentName.JS_HEAP_PROFILER_ENABLE,
341340
REACT_NATIVE_SPECIFIC_UI = RNExperimentName.REACT_NATIVE_SPECIFIC_UI,
342341
NOT_REACT_NATIVE_SPECIFIC_UI = '!' + RNExperimentName.REACT_NATIVE_SPECIFIC_UI,
343-
ENABLE_NETWORK_PANEL = RNExperimentName.ENABLE_NETWORK_PANEL,
344342
}
345343

346344
export enum GenAiEnterprisePolicyValue {
@@ -515,7 +513,6 @@ export type Condition = (config?: HostConfig) => boolean;
515513
export const conditions = {
516514
canDock: () => Boolean(Runtime.queryParam('can_dock')),
517515
notSourcesHideAddFolder: () => Boolean(Runtime.queryParam(ConditionName.NOT_SOURCES_HIDE_ADD_FOLDER)),
518-
reactNativeUnstableNetworkPanel: () =>
519-
Boolean(Runtime.queryParam(ConditionName.REACT_NATIVE_UNSTABLE_NETWORK_PANEL)) ||
520-
experiments.isEnabled(ExperimentName.ENABLE_NETWORK_PANEL),
516+
reactNativeUnstableNetworkPanel: () => true,
517+
reactNativeExpoNetworkPanel: () => Boolean(Runtime.queryParam(ConditionName.REACT_NATIVE_UNSTABLE_NETWORK_PANEL)),
521518
};

front_end/entrypoints/rn_fusebox/FuseboxFeatureObserver.ts

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
import type * as Common from '../../core/common/common.js';
77
import * as i18n from '../../core/i18n/i18n.js';
8-
import * as Root from '../../core/root/root.js';
98
import * as SDK from '../../core/sdk/sdk.js';
109
import type * as Protocol from '../../generated/protocol.js';
1110
import * as UI from '../../ui/legacy/legacy.js';
@@ -17,10 +16,6 @@ import {FuseboxWindowTitleManager} from './FuseboxWindowTitleManager.js';
1716
const {html, render} = Lit;
1817

1918
const UIStrings = {
20-
/**
21-
* @description Message for the "settings changed" banner shown when a reload is required for the Network panel.
22-
*/
23-
reloadRequiredForNetworkPanelMessage: 'The Network panel is now available for dogfooding. Please reload to access it.',
2419
/**
2520
* @description Title shown when Network inspection is disabled due to multiple React Native hosts.
2621
*/
@@ -79,16 +74,12 @@ export class FuseboxFeatureObserver implements
7974
#handleMetadataUpdated(
8075
event: Common.EventTarget.EventTargetEvent<Protocol.ReactNativeApplication.MetadataUpdatedEvent>): void {
8176
// eslint-disable-next-line @typescript-eslint/naming-convention
82-
const {unstable_isProfilingBuild, unstable_networkInspectionEnabled} = event.data;
77+
const {unstable_isProfilingBuild} = event.data;
8378

8479
if (unstable_isProfilingBuild) {
8580
FuseboxWindowTitleManager.instance().setSuffix('[PROFILING]');
8681
this.#hideUnsupportedFeaturesForProfilingBuilds();
8782
}
88-
89-
if (unstable_networkInspectionEnabled) {
90-
this.#ensureNetworkPanelEnabled();
91-
}
9283
}
9384

9485
#handleSystemStateChanged(
@@ -127,21 +118,6 @@ export class FuseboxFeatureObserver implements
127118
});
128119
}
129120

130-
#ensureNetworkPanelEnabled(): void {
131-
if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.ENABLE_NETWORK_PANEL)) {
132-
return;
133-
}
134-
135-
Root.Runtime.experiments.setEnabled(
136-
Root.Runtime.ExperimentName.ENABLE_NETWORK_PANEL,
137-
true,
138-
);
139-
140-
UI.InspectorView?.InspectorView?.instance()?.displayReloadRequiredWarning(
141-
i18nString(UIStrings.reloadRequiredForNetworkPanelMessage),
142-
);
143-
}
144-
145121
#disableSingleHostOnlyFeatures(): void {
146122
if (this.#singleHostFeaturesDisabled) {
147123
return;

front_end/panels/network/NetworkItemView.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -151,18 +151,12 @@ export class NetworkItemView extends UI.TabbedPane.TabbedPane {
151151
private readonly responseView: RequestResponseView|undefined;
152152
private cookiesView: RequestCookiesView|null;
153153
private initialTab?: NetworkForward.UIRequestLocation.UIRequestTabs;
154-
private readonly isReactNative: boolean = false;
155154

156155
constructor(
157156
request: SDK.NetworkRequest.NetworkRequest, calculator: NetworkTimeCalculator,
158157
initialTab?: NetworkForward.UIRequestLocation.UIRequestTabs) {
159158
super();
160159

161-
// [RN] Used to scope down available features for React Native targets
162-
this.isReactNative = Root.Runtime.experiments.isEnabled(
163-
Root.Runtime.ExperimentName.REACT_NATIVE_SPECIFIC_UI,
164-
);
165-
166160
this.requestInternal = request;
167161
this.element.classList.add('network-item-view');
168162
this.headerElement().setAttribute('jslog', `${VisualLogging.toolbar('request-details').track({
@@ -230,7 +224,7 @@ export class NetworkItemView extends UI.TabbedPane.TabbedPane {
230224
}
231225
}
232226

233-
if (!this.isReactNative || Root.Runtime.experiments.isEnabled(Root.Runtime.RNExperimentName.ENABLE_NETWORK_PANEL)) {
227+
if (!Root.Runtime.conditions.reactNativeExpoNetworkPanel()) {
234228
this.appendTab(
235229
NetworkForward.UIRequestLocation.UIRequestTabs.INITIATOR, i18nString(UIStrings.initiator),
236230
new RequestInitiatorView(request), i18nString(UIStrings.requestInitiatorCallStack));

front_end/panels/network/NetworkPanel.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ describeWithMockConnection('NetworkPanel', () => {
7070
registerNoopActions(['inspector-main.reload']);
7171
UI.ActionRegistration.maybeRemoveActionExtension('network.toggle-recording');
7272
UI.ActionRegistration.maybeRemoveActionExtension('network.clear');
73-
Root.Runtime.experiments.register(Root.Runtime.RNExperimentName.ENABLE_NETWORK_PANEL, 'Network for test');
7473
await import('./network-meta.js');
7574
createTarget();
7675
const dummyStorage = new Common.Settings.SettingsStorage({});

front_end/panels/network/network-meta.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ const UIStrings = {
2424
*/
2525
network: 'Network',
2626
/**
27-
*@description Title of the Network tool (Expo, unstable)
27+
*@description Title of the Network tool (Expo implementation)
2828
*/
29-
networkExpoUnstable: 'Network (Expo, unstable)',
29+
networkExpoUnstable: 'Expo Network',
3030
/**
3131
*@description Command for showing the 'Network request blocking' tool
3232
*/
@@ -167,11 +167,10 @@ UI.ViewManager.registerViewExtension({
167167
location: UI.ViewManager.ViewLocationValues.PANEL,
168168
id: 'network',
169169
commandPrompt: i18nLazyString(UIStrings.showNetwork),
170-
title: () => Root.Runtime.experiments.isEnabled(Root.Runtime.RNExperimentName.ENABLE_NETWORK_PANEL) ?
171-
i18nString(UIStrings.network) :
172-
i18nString(UIStrings.networkExpoUnstable),
170+
title: () => Root.Runtime.conditions.reactNativeExpoNetworkPanel() ?
171+
i18nString(UIStrings.networkExpoUnstable) :
172+
i18nString(UIStrings.network),
173173
order: 40,
174-
isPreviewFeature: true,
175174
condition: Root.Runtime.conditions.reactNativeUnstableNetworkPanel,
176175
async loadView() {
177176
const Network = await loadNetworkModule();

0 commit comments

Comments
 (0)