Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions front_end/core/rn_experiments/experimentsImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,6 @@ Instance.register({
enabledByDefault: ({ isReactNativeEntryPoint }) => isReactNativeEntryPoint,
});

Instance.register({
name: RNExperimentName.ENABLE_TIMELINE_FRAMES,
title: 'Enable performance frames track',
unstable: true,
});

Instance.register({
name: RNExperimentName.ENABLE_NETWORK_THROTTLING,
title: 'Enable network throttling (Network panel)',
Expand Down
2 changes: 0 additions & 2 deletions front_end/core/root/Runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,6 @@ export const experiments = new ExperimentsSupport();
export enum RNExperimentName {
REACT_NATIVE_SPECIFIC_UI = 'react-native-specific-ui',
JS_HEAP_PROFILER_ENABLE = 'js-heap-profiler-enable',
ENABLE_TIMELINE_FRAMES = 'enable-timeline-frames',
ENABLE_NETWORK_THROTTLING = 'enable-network-throttling',
}

Expand Down Expand Up @@ -341,7 +340,6 @@ export const enum ExperimentName {
JS_HEAP_PROFILER_ENABLE = RNExperimentName.JS_HEAP_PROFILER_ENABLE,
REACT_NATIVE_SPECIFIC_UI = RNExperimentName.REACT_NATIVE_SPECIFIC_UI,
NOT_REACT_NATIVE_SPECIFIC_UI = '!' + RNExperimentName.REACT_NATIVE_SPECIFIC_UI,
ENABLE_TIMELINE_FRAMES = RNExperimentName.ENABLE_TIMELINE_FRAMES,
ENABLE_NETWORK_THROTTLING = RNExperimentName.ENABLE_NETWORK_THROTTLING,
}

Expand Down
21 changes: 1 addition & 20 deletions front_end/entrypoints/rn_fusebox/FuseboxFeatureObserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ const UIStrings = {
*/
reloadRequiredForNetworkThrottlingMessage:
'Network throttling is now available in the Network panel. Please reload to enable.',
/**
* @description Message for the "settings changed" banner shown when a reload
* is required for frame timings in the Performance panel.
*/
reloadRequiredForTimelineFramesMessage:
'Frame timings and screenshots are now available in the Performance panel. Please reload to enable.',
/**
* @description Detail message shown when a feature is disabled due to multiple React Native hosts.
*/
Expand Down Expand Up @@ -87,8 +81,7 @@ export class FuseboxFeatureObserver implements
#handleMetadataUpdated(
event: Common.EventTarget.EventTargetEvent<Protocol.ReactNativeApplication.MetadataUpdatedEvent>): void {
// eslint-disable-next-line @typescript-eslint/naming-convention
const {unstable_isProfilingBuild, unstable_networkInspectionEnabled, unstable_frameRecordingEnabled, unstable_networkThrottlingEnabled} =
event.data;
const {unstable_isProfilingBuild, unstable_networkInspectionEnabled, unstable_networkThrottlingEnabled} = event.data;

if (unstable_isProfilingBuild) {
FuseboxWindowTitleManager.instance().setSuffix('[PROFILING]');
Expand All @@ -101,10 +94,6 @@ export class FuseboxFeatureObserver implements
this.#hideNetworkPanel();
}

if (unstable_frameRecordingEnabled) {
void this.#ensureTimelineFramesEnabled();
}

if (unstable_networkThrottlingEnabled) {
void this.#ensureNetworkThrottlingEnabled();
}
Expand Down Expand Up @@ -153,14 +142,6 @@ export class FuseboxFeatureObserver implements
});
}

async #ensureTimelineFramesEnabled(): Promise<void> {
if (!Root.Runtime.experiments.isEnabled(Root.Runtime.RNExperimentName.ENABLE_TIMELINE_FRAMES)) {
Root.Runtime.experiments.setEnabled(Root.Runtime.RNExperimentName.ENABLE_TIMELINE_FRAMES, true);
UI.InspectorView?.InspectorView?.instance()?.displayReloadRequiredWarning(
i18nString(UIStrings.reloadRequiredForTimelineFramesMessage));
}
}

async #ensureNetworkThrottlingEnabled(): Promise<void> {
if (!Root.Runtime.experiments.isEnabled(Root.Runtime.RNExperimentName.ENABLE_NETWORK_THROTTLING)) {
Root.Runtime.experiments.setEnabled(Root.Runtime.RNExperimentName.ENABLE_NETWORK_THROTTLING, true);
Expand Down
2 changes: 0 additions & 2 deletions front_end/global_typings/react_native.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ declare global {
// eslint-disable-next-line no-var
var enableDisplayingFullDisconnectedReason: boolean|undefined;
// eslint-disable-next-line no-var
var enableTimelineFrames: boolean|undefined;
// eslint-disable-next-line no-var
var reactNativeOpenInEditorButtonImage: string|undefined;
// eslint-disable-next-line no-var,@typescript-eslint/naming-convention
var FB_ONLY__reactNativeFeedbackLink: string|undefined;
Expand Down
11 changes: 1 addition & 10 deletions front_end/panels/timeline/TimelineFlameChartDataProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);

export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectWrapper<EventTypes> implements
PerfUI.FlameChart.FlameChartDataProvider {
private isReactNative = false;

private droppedFramePatternCanvas: HTMLCanvasElement;
private partialFramePatternCanvas: HTMLCanvasElement;
private timelineDataInternal: PerfUI.FlameChart.FlameChartTimelineData|null = null;
Expand Down Expand Up @@ -145,11 +143,6 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
constructor() {
super();

// [RN] Used to scope down available features for React Native targets
this.isReactNative = Root.Runtime.experiments.isEnabled(
Root.Runtime.ExperimentName.REACT_NATIVE_SPECIFIC_UI,
);

this.reset();

this.droppedFramePatternCanvas = document.createElement('canvas');
Expand Down Expand Up @@ -615,9 +608,7 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
// In CPU Profiles the trace data will not have frames nor
// screenshots, so we can keep this call as it will be a no-op in
// these cases.
if (Root.Runtime.experiments.isEnabled(Root.Runtime.RNExperimentName.ENABLE_TIMELINE_FRAMES) || !this.isReactNative) {
this.#appendFramesAndScreenshotsTrack();
}
this.#appendFramesAndScreenshotsTrack();

const weight = (track: {type?: string, forMainFrame?: boolean, appenderName?: TrackAppenderName}): number => {
switch (track.appenderName) {
Expand Down
4 changes: 2 additions & 2 deletions front_end/panels/timeline/TimelinePanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ export class TimelinePanel extends UI.Panel.Panel implements Client, TimelineMod
this.captureSelectorStatsSetting.setTitle(i18nString(UIStrings.enableSelectorStats));

this.showScreenshotsSetting =
Common.Settings.Settings.instance().createSetting('timeline-show-screenshots', isNode || isReactNative ? false : true);
Common.Settings.Settings.instance().createSetting('timeline-show-screenshots', isNode ? false : true);
this.showScreenshotsSetting.setTitle(i18nString(UIStrings.screenshots));
this.showScreenshotsSetting.addChangeListener(this.updateMiniMap, this);

Expand Down Expand Up @@ -1189,7 +1189,7 @@ export class TimelinePanel extends UI.Panel.Panel implements Client, TimelineMod

// View
this.panelToolbar.appendSeparator();
if (!isNode && (Root.Runtime.experiments.isEnabled(Root.Runtime.RNExperimentName.ENABLE_TIMELINE_FRAMES) || !isReactNative)) {
if (!isNode) {
this.showScreenshotsToolbarCheckbox =
this.createSettingCheckbox(this.showScreenshotsSetting, i18nString(UIStrings.captureScreenshots));
this.panelToolbar.appendToolbarItem(this.showScreenshotsToolbarCheckbox);
Expand Down
1 change: 0 additions & 1 deletion front_end/testing/EnvironmentHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ const REGISTERED_EXPERIMENTS = [
Root.Runtime.ExperimentName.TIMELINE_ALTERNATIVE_NAVIGATION,
Root.Runtime.ExperimentName.REACT_NATIVE_SPECIFIC_UI,
Root.Runtime.ExperimentName.NOT_REACT_NATIVE_SPECIFIC_UI,
Root.Runtime.ExperimentName.ENABLE_TIMELINE_FRAMES,
Root.Runtime.ExperimentName.ENABLE_NETWORK_THROTTLING,
];

Expand Down
Loading