Skip to content

Commit e6e89d1

Browse files
committed
Review feedback: Renames and build fix
1 parent ba6d7c6 commit e6e89d1

File tree

5 files changed

+22
-21
lines changed

5 files changed

+22
-21
lines changed

config/gni/devtools_grd_files.gni

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1941,10 +1941,11 @@ grd_files_debug_sources = [
19411941
"front_end/panels/timeline/components/NetworkThrottlingSelector.js",
19421942
"front_end/panels/timeline/components/OriginMap.js",
19431943
"front_end/panels/timeline/components/RelatedInsightChips.js",
1944+
"front_end/panels/timeline/components/RNPerfIssueTypes.js",
19441945
"front_end/panels/timeline/components/Sidebar.js",
19451946
"front_end/panels/timeline/components/SidebarAnnotationsTab.js",
19461947
"front_end/panels/timeline/components/SidebarInsightsTab.js",
1947-
"front_end/panels/timeline/components/SidebarRNPerfIssuesTab.js",
1948+
"front_end/panels/timeline/components/SidebarRNPerfSignalsTab.js",
19481949
"front_end/panels/timeline/components/SidebarRNPerfIssueItem.js",
19491950
"front_end/panels/timeline/components/SidebarSingleInsightSet.js",
19501951
"front_end/panels/timeline/components/TimelineSummary.js",

front_end/panels/timeline/components/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ devtools_module("components") {
5555
"SidebarAnnotationsTab.ts",
5656
"SidebarInsightsTab.ts",
5757
"SidebarRNPerfIssueItem.ts",
58-
"SidebarRNPerfIssuesTab.ts",
58+
"SidebarRNPerfSignalsTab.ts",
5959
"SidebarSingleInsightSet.ts",
6060
"TimelineSummary.ts",
6161
"Utils.ts",

front_end/panels/timeline/components/Sidebar.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import * as UI from '../../../ui/legacy/legacy.js';
99

1010
import {SidebarAnnotationsTab} from './SidebarAnnotationsTab.js';
1111
import {SidebarInsightsTab} from './SidebarInsightsTab.js';
12-
import {SidebarRNPerfIssuesTab} from './SidebarRNPerfIssuesTab.js';
12+
import {SidebarRNPerfSignalsTab} from './SidebarRNPerfSignalsTab.js';
1313

1414
export interface ActiveInsight {
1515
model: Trace.Insights.Types.InsightModel;
@@ -41,7 +41,7 @@ declare global {
4141
export const enum SidebarTabs {
4242
INSIGHTS = 'insights',
4343
ANNOTATIONS = 'annotations',
44-
PERF_ISSUES = 'perf-issues',
44+
PERF_SIGNALS = 'perf-signals',
4545
}
4646
export const DEFAULT_SIDEBAR_TAB = SidebarTabs.INSIGHTS;
4747

@@ -55,7 +55,7 @@ export class SidebarWidget extends UI.Widget.VBox {
5555
#annotationsView = new AnnotationsView();
5656

5757
#perfIssuesTabEnabled = false;
58-
#rnPerfIssuesView = new RNPerfIssuesView();
58+
#rnPerfSignalsView = new RNPerfSignalsView();
5959

6060
/**
6161
* Track if the user has opened the sidebar before. We do this so that the
@@ -121,25 +121,25 @@ export class SidebarWidget extends UI.Widget.VBox {
121121

122122
setParsedTrace(parsedTrace: Trace.Handlers.Types.ParsedTrace|null, metadata: Trace.Types.File.MetaData|null): void {
123123
this.#insightsView.setParsedTrace(parsedTrace, metadata);
124-
this.#rnPerfIssuesView.setParsedTrace(parsedTrace);
124+
this.#rnPerfSignalsView.setParsedTrace(parsedTrace);
125125

126126
// [RN] Show or remove the Perf Issues tab if there are issues present
127127
if (this.#perfIssuesTabEnabled) {
128-
const hasIssues = this.#rnPerfIssuesView.hasIssues();
129-
const tabExists = this.#tabbedPane.hasTab(SidebarTabs.PERF_ISSUES);
128+
const hasIssues = this.#rnPerfSignalsView.hasIssues();
129+
const tabExists = this.#tabbedPane.hasTab(SidebarTabs.PERF_SIGNALS);
130130

131131
if (hasIssues && !tabExists) {
132132
this.#tabbedPane.appendTab(
133-
SidebarTabs.PERF_ISSUES, 'Performance Signals', this.#rnPerfIssuesView, undefined, undefined, false, true);
134-
this.#tabbedPane.selectTab(SidebarTabs.PERF_ISSUES);
133+
SidebarTabs.PERF_SIGNALS, 'Performance Signals', this.#rnPerfSignalsView, undefined, undefined, false, true);
134+
this.#tabbedPane.selectTab(SidebarTabs.PERF_SIGNALS);
135135
} else if (!hasIssues && tabExists) {
136-
this.#tabbedPane.closeTab(SidebarTabs.PERF_ISSUES);
136+
this.#tabbedPane.closeTab(SidebarTabs.PERF_SIGNALS);
137137
}
138138
}
139139
}
140140

141141
setSelectTimelineEventCallback(callback: (event: Trace.Types.Events.Event) => void): void {
142-
this.#rnPerfIssuesView.setSelectTimelineEventCallback(callback);
142+
this.#rnPerfSignalsView.setSelectTimelineEventCallback(callback);
143143
}
144144

145145
setInsights(insights: Trace.Insights.Types.TraceInsightSets|null): void {
@@ -212,13 +212,13 @@ class AnnotationsView extends UI.Widget.VBox {
212212
}
213213
}
214214

215-
/** [RN] Experimental view for Performance Issues. */
216-
class RNPerfIssuesView extends UI.Widget.VBox {
217-
#component = new SidebarRNPerfIssuesTab();
215+
/** [RN] Experimental view for Performance Signals. */
216+
class RNPerfSignalsView extends UI.Widget.VBox {
217+
#component = new SidebarRNPerfSignalsTab();
218218

219219
constructor() {
220220
super();
221-
this.element.classList.add('sidebar-perf-issues');
221+
this.element.classList.add('sidebar-perf-signals');
222222
this.element.appendChild(this.#component);
223223
}
224224

front_end/panels/timeline/components/SidebarRNPerfIssuesTab.ts renamed to front_end/panels/timeline/components/SidebarRNPerfSignalsTab.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ const UIStrings = {
3131
emptyStateDetail: 'No issues found',
3232
} as const;
3333

34-
const str_ = i18n.i18n.registerUIStrings('panels/timeline/components/SidebarRNPerfIssuesTab.ts', UIStrings);
34+
const str_ = i18n.i18n.registerUIStrings('panels/timeline/components/SidebarRNPerfSignalsTab.ts', UIStrings);
3535
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
3636

37-
export class SidebarRNPerfIssuesTab extends HTMLElement {
37+
export class SidebarRNPerfSignalsTab extends HTMLElement {
3838
readonly #boundRender = this.#render.bind(this);
3939
readonly #shadow = this.attachShadow({mode: 'open'});
4040

@@ -162,10 +162,10 @@ export class SidebarRNPerfIssuesTab extends HTMLElement {
162162
}
163163
}
164164

165-
customElements.define('devtools-performance-sidebar-perf-issues', SidebarRNPerfIssuesTab);
165+
customElements.define('devtools-performance-sidebar-perf-signals', SidebarRNPerfSignalsTab);
166166

167167
declare global {
168168
interface HTMLElementTagNameMap {
169-
'devtools-performance-sidebar-perf-issues': SidebarRNPerfIssuesTab;
169+
'devtools-performance-sidebar-perf-signals': SidebarRNPerfSignalsTab;
170170
}
171171
}

scripts/eslint_rules/lib/check-license-header.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ const META_CODE_PATHS = [
8888
'panels/timeline/ReactNativeTimelineLandingPage.ts',
8989
'panels/timeline/components/RNPerfIssueTypes.ts',
9090
'panels/timeline/components/SidebarRNPerfIssueItem.ts',
91-
'panels/timeline/components/SidebarRNPerfIssuesTab.ts',
91+
'panels/timeline/components/SidebarRNPerfSignalsTab.ts',
9292
];
9393

9494
const OTHER_LICENSE_HEADERS = [

0 commit comments

Comments
 (0)