Skip to content

Commit 6bef38a

Browse files
Connor ClarkDevtools-frontend LUCI CQ
authored andcommitted
[RPP] Remove insights experiment
We shipped this months ago. Bug: 366379943 Change-Id: I6829531ac2cc53b8595ea0f5265471b5a0e3f7fb Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6072708 Auto-Submit: Connor Clark <[email protected]> Commit-Queue: Paul Irish <[email protected]> Reviewed-by: Paul Irish <[email protected]>
1 parent 6d2fd47 commit 6bef38a

File tree

14 files changed

+11
-64
lines changed

14 files changed

+11
-64
lines changed

front_end/core/host/UserMetrics.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,6 @@ export enum DevtoolsExperiments {
983983
'timeline-enhanced-traces' = 90,
984984
'timeline-compiled-sources' = 91,
985985
'timeline-debug-mode' = 93,
986-
'timeline-rpp-sidebar' = 95,
987986
'timeline-server-timings' = 98,
988987
'floating-entry-points-for-ai-assistance' = 101,
989988
'timeline-experimental-insights' = 102,

front_end/core/root/Runtime.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,6 @@ export const enum ExperimentName {
293293
NETWORK_PANEL_FILTER_BAR_REDESIGN = 'network-panel-filter-bar-redesign',
294294
AUTOFILL_VIEW = 'autofill-view',
295295
TIMELINE_SHOW_POST_MESSAGE_EVENTS = 'timeline-show-postmessage-events',
296-
TIMELINE_INSIGHTS = 'timeline-rpp-sidebar',
297296
TIMELINE_DEBUG_MODE = 'timeline-debug-mode',
298297
TIMELINE_ENHANCED_TRACES = 'timeline-enhanced-traces',
299298
TIMELINE_SERVER_TIMINGS = 'timeline-server-timings',

front_end/entrypoints/main/MainImpl.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -379,11 +379,6 @@ export class MainImpl {
379379
'Performance panel: show postMessage dispatch and handling flows',
380380
);
381381

382-
Root.Runtime.experiments.register(
383-
Root.Runtime.ExperimentName.TIMELINE_INSIGHTS,
384-
'Performance panel: enable performance insights',
385-
);
386-
387382
Root.Runtime.experiments.register(
388383
Root.Runtime.ExperimentName.TIMELINE_SERVER_TIMINGS,
389384
'Performance panel: enable server timings in the timeline',
@@ -416,7 +411,6 @@ export class MainImpl {
416411
Root.Runtime.experiments.enableExperimentsByDefault([
417412
'css-type-component-length-deprecate',
418413
Root.Runtime.ExperimentName.AUTOFILL_VIEW,
419-
Root.Runtime.ExperimentName.TIMELINE_INSIGHTS,
420414
Root.Runtime.ExperimentName.NETWORK_PANEL_FILTER_BAR_REDESIGN,
421415
Root.Runtime.ExperimentName.FLOATING_ENTRY_POINTS_FOR_AI_ASSISTANCE,
422416
...(Root.Runtime.Runtime.queryParam('isChromeForTesting') ? ['protocol-monitor'] : []),

front_end/panels/timeline/LayoutShiftsTrackAppender.ts

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// found in the LICENSE file.
44
import * as Common from '../../core/common/common.js';
55
import * as i18n from '../../core/i18n/i18n.js';
6-
import * as Root from '../../core/root/root.js';
76
import * as Trace from '../../models/trace/trace.js';
87
import * as ComponentHelpers from '../../ui/components/helpers/helpers.js';
98
import * as UI from '../../ui/legacy/legacy.js';
@@ -100,13 +99,10 @@ export class LayoutShiftsTrackAppender implements TrackAppender {
10099
* layout shifts (the first available level to append more data).
101100
*/
102101
#appendLayoutShiftsAtLevel(currentLevel: number): number {
103-
const allLayoutShifts = this.#parsedTrace.LayoutShifts.clusters.flatMap(cluster => cluster.events);
104-
105-
if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.TIMELINE_INSIGHTS)) {
106-
const allClusters = this.#parsedTrace.LayoutShifts.clusters;
107-
this.#compatibilityBuilder.appendEventsAtLevel(allClusters, currentLevel, this);
108-
}
102+
const allClusters = this.#parsedTrace.LayoutShifts.clusters;
103+
this.#compatibilityBuilder.appendEventsAtLevel(allClusters, currentLevel, this);
109104

105+
const allLayoutShifts = this.#parsedTrace.LayoutShifts.clusters.flatMap(cluster => cluster.events);
110106
void this.preloadScreenshots(allLayoutShifts);
111107
return this.#compatibilityBuilder.appendEventsAtLevel(allLayoutShifts, currentLevel, this);
112108
}
@@ -165,25 +161,6 @@ export class LayoutShiftsTrackAppender implements TrackAppender {
165161
}
166162

167163
getDrawOverride(event: Trace.Types.Events.Event): DrawOverride|undefined {
168-
if (!Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.TIMELINE_INSIGHTS)) {
169-
// If the new CLS experience isn't on.. Continue to present that Shifts are 5ms long. (but now via drawOverrides)
170-
// TODO: Remove this when the experiment ships
171-
if (Trace.Types.Events.isLayoutShift(event)) {
172-
return (context, x, y, _width, levelHeight, timeToPosition, transformColor) => {
173-
const fakeDurMs = Trace.Helpers.Timing.microSecondsToMilliseconds(
174-
Trace.Types.Timing.MicroSeconds(event.ts + LAYOUT_SHIFT_SYNTHETIC_DURATION));
175-
const barEnd = timeToPosition(fakeDurMs);
176-
const barWidth = barEnd - x;
177-
context.fillStyle = transformColor(this.colorForEvent(event));
178-
context.fillRect(x, y, barWidth - 0.5, levelHeight - 1);
179-
return {
180-
x,
181-
width: barWidth,
182-
};
183-
};
184-
}
185-
}
186-
187164
if (Trace.Types.Events.isLayoutShift(event)) {
188165
const score = event.args.data?.weighted_score_delta || 0;
189166

front_end/panels/timeline/TimelineDetailsView.test.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
import * as Root from '../../core/root/root.js';
65
import * as Trace from '../../models/trace/trace.js';
76
import {doubleRaf} from '../../testing/DOMHelpers.js';
87
import {describeWithEnvironment} from '../../testing/EnvironmentHelpers.js';
@@ -67,8 +66,6 @@ describeWithEnvironment('TimelineDetailsView', function() {
6766
});
6867

6968
it('renders the layout shift component for a single layout shift', async function() {
70-
Root.Runtime.experiments.enableForTest(Root.Runtime.ExperimentName.TIMELINE_INSIGHTS);
71-
7269
const {parsedTrace} = await TraceLoader.traceEngine(this, 'shift-attribution.json.gz');
7370
const detailsView = new Timeline.TimelineDetailsView.TimelineDetailsView(mockViewDelegate);
7471
await detailsView.setModel(
@@ -86,8 +83,6 @@ describeWithEnvironment('TimelineDetailsView', function() {
8683
});
8784

8885
it('renders the layout shift component for a selected cluster', async function() {
89-
Root.Runtime.experiments.enableForTest(Root.Runtime.ExperimentName.TIMELINE_INSIGHTS);
90-
9186
const {parsedTrace} = await TraceLoader.traceEngine(this, 'shift-attribution.json.gz');
9287
const detailsView = new Timeline.TimelineDetailsView.TimelineDetailsView(mockViewDelegate);
9388
await detailsView.setModel(

front_end/panels/timeline/TimelineDetailsView.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import * as Common from '../../core/common/common.js';
66
import * as i18n from '../../core/i18n/i18n.js';
7-
import * as Root from '../../core/root/root.js';
87
import * as SDK from '../../core/sdk/sdk.js';
98
import * as TimelineModel from '../../models/timeline_model/timeline_model.js';
109
import * as Trace from '../../models/trace/trace.js';
@@ -340,11 +339,9 @@ export class TimelineDetailsView extends
340339
this.#relatedInsightChips.eventToRelatedInsightsMap = this.#eventToRelatedInsightsMap;
341340
}
342341

343-
// Special case: if Insights experiment is enabled (on by default in M131)
344-
// and the user selects a layout shift or a layout shift cluster, render
345-
// the new layout shift details component.
346-
if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.TIMELINE_INSIGHTS) &&
347-
(Trace.Types.Events.isSyntheticLayoutShift(event) || Trace.Types.Events.isSyntheticLayoutShiftCluster(event))) {
342+
// Special case: if the user selects a layout shift or a layout shift cluster,
343+
// render the new layout shift details component.
344+
if (Trace.Types.Events.isSyntheticLayoutShift(event) || Trace.Types.Events.isSyntheticLayoutShiftCluster(event)) {
348345
const isFreshRecording = Boolean(this.#parsedTrace && Tracker.instance().recordingIsFresh(this.#parsedTrace));
349346
this.#layoutShiftDetails.setData(event, this.#traceInsightsSets, this.#parsedTrace, isFreshRecording);
350347
this.setContent(this.#layoutShiftDetails);

front_end/panels/timeline/components/Sidebar.test.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
import * as Root from '../../../core/root/root.js';
65
import type * as Trace from '../../../models/trace/trace.js';
76
import {raf, renderElementIntoDOM} from '../../../testing/DOMHelpers.js';
8-
import {describeWithEnvironment, enableFeatureForTest} from '../../../testing/EnvironmentHelpers.js';
7+
import {describeWithEnvironment} from '../../../testing/EnvironmentHelpers.js';
98
import {TraceLoader} from '../../../testing/TraceLoader.js';
109

1110
import * as Components from './components.js';
@@ -26,10 +25,6 @@ describeWithEnvironment('Sidebar', () => {
2625
return sidebar;
2726
}
2827

29-
beforeEach(() => {
30-
enableFeatureForTest(Root.Runtime.ExperimentName.TIMELINE_INSIGHTS);
31-
});
32-
3328
it('renders with two tabs for insights & annotations', async function() {
3429
const {parsedTrace, insights} = await TraceLoader.traceEngine(this, 'web-dev-with-commit.json.gz');
3530

front_end/panels/timeline/components/Sidebar.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// found in the LICENSE file.
44

55
import * as Common from '../../../core/common/common.js';
6-
import * as Root from '../../../core/root/root.js';
76
import type * as Trace from '../../../models/trace/trace.js';
87
import * as Adorners from '../../../ui/components/adorners/adorners.js';
98
import * as UI from '../../../ui/legacy/legacy.js';
@@ -72,11 +71,9 @@ export class SidebarWidget extends UI.Widget.VBox {
7271
constructor() {
7372
super();
7473
this.setMinimumSize(MIN_SIDEBAR_WIDTH_PX, 0);
75-
if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.TIMELINE_INSIGHTS)) {
76-
this.#tabbedPane.appendTab(
77-
SidebarTabs.INSIGHTS, 'Insights', this.#insightsView, undefined, undefined, false, false, 0,
78-
'timeline.insights-tab');
79-
}
74+
this.#tabbedPane.appendTab(
75+
SidebarTabs.INSIGHTS, 'Insights', this.#insightsView, undefined, undefined, false, false, 0,
76+
'timeline.insights-tab');
8077
this.#tabbedPane.appendTab(
8178
SidebarTabs.ANNOTATIONS, 'Annotations', this.#annotationsView, undefined, undefined, false, false, 1,
8279
'timeline.annotations-tab');

front_end/panels/timeline/overlays/OverlaysImpl.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ describeWithEnvironment('Overlays', () => {
726726
await overlays.update();
727727
const overlayDOM = container.querySelector<HTMLElement>('.overlay-type-ENTRY_SELECTED');
728728
assert.isOk(overlayDOM);
729-
assert.strictEqual(window.parseInt(overlayDOM.style.width), 2);
729+
assert.strictEqual(window.parseInt(overlayDOM.style.width), 17);
730730
});
731731

732732
it('renders the duration and label for a time range overlay', async function() {

front_end/testing/EnvironmentHelpers.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ const REGISTERED_EXPERIMENTS = [
123123
'font-editor',
124124
Root.Runtime.ExperimentName.NETWORK_PANEL_FILTER_BAR_REDESIGN,
125125
Root.Runtime.ExperimentName.AUTOFILL_VIEW,
126-
Root.Runtime.ExperimentName.TIMELINE_INSIGHTS,
127126
Root.Runtime.ExperimentName.TIMELINE_DEBUG_MODE,
128127
Root.Runtime.ExperimentName.TIMELINE_SERVER_TIMINGS,
129128
Root.Runtime.ExperimentName.FULL_ACCESSIBILITY_TREE,

0 commit comments

Comments
 (0)