|
3 | 3 | // found in the LICENSE file.
|
4 | 4 |
|
5 | 5 | import * as Common from '../../../core/common/common.js';
|
| 6 | +import * as Root from '../../../core/root/root.js'; |
6 | 7 | import type * as Trace from '../../../models/trace/trace.js';
|
7 | 8 | import * as UI from '../../../ui/legacy/legacy.js';
|
8 | 9 |
|
@@ -68,16 +69,21 @@ export class SidebarWidget extends UI.Widget.VBox {
|
68 | 69 | constructor() {
|
69 | 70 | super();
|
70 | 71 | this.setMinimumSize(MIN_SIDEBAR_WIDTH_PX, 0);
|
71 |
| - this.#tabbedPane.appendTab( |
72 |
| - SidebarTabs.INSIGHTS, 'Insights', this.#insightsView, undefined, undefined, false, false, 0, |
73 |
| - 'timeline.insights-tab'); |
| 72 | + |
| 73 | + // [RN] Disable Insights tab |
| 74 | + const showInsightsTab = !Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.REACT_NATIVE_SPECIFIC_UI); |
| 75 | + |
| 76 | + if (showInsightsTab) { |
| 77 | + this.#tabbedPane.appendTab( |
| 78 | + SidebarTabs.INSIGHTS, 'Insights', this.#insightsView, undefined, undefined, false, false, 0, |
| 79 | + 'timeline.insights-tab'); |
| 80 | + } |
| 81 | + |
74 | 82 | this.#tabbedPane.appendTab(
|
75 | 83 | SidebarTabs.ANNOTATIONS, 'Annotations', this.#annotationsView, undefined, undefined, false, false, 1,
|
76 | 84 | 'timeline.annotations-tab');
|
77 | 85 |
|
78 |
| - // Default the selected tab to Insights. In wasShown() we will change this |
79 |
| - // if this is a trace that has no insights. |
80 |
| - this.#tabbedPane.selectTab(SidebarTabs.INSIGHTS); |
| 86 | + this.#tabbedPane.selectTab(showInsightsTab ? SidebarTabs.INSIGHTS : SidebarTabs.ANNOTATIONS); |
81 | 87 | }
|
82 | 88 |
|
83 | 89 | override wasShown(): void {
|
|
0 commit comments