Skip to content

Commit 4352acc

Browse files
AlinaVarkkiDevtools-frontend LUCI CQ
authored andcommitted
[RPP] Add logs for the timeline navigation setting
Add logs for opening the shortcuts dialog and selecting different navigation options from the dialog. Bug: 313757601 Change-Id: I3646fbfad73e9f8061c2e9c642f18b00de39b146 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6091588 Commit-Queue: Alina Varkki <[email protected]> Auto-Submit: Alina Varkki <[email protected]> Reviewed-by: Jack Franklin <[email protected]> Commit-Queue: Jack Franklin <[email protected]>
1 parent 4cda60e commit 4352acc

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

front_end/panels/timeline/TimelinePanel.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,6 +1115,8 @@ export class TimelinePanel extends UI.Panel.Panel implements Client, TimelineMod
11151115
this.#setupNavigationSetting();
11161116
this.#shortcutsDialog.prependElement(this.#navigationRadioButtons);
11171117
const dialogToolbarItem = new UI.Toolbar.ToolbarItem(this.#shortcutsDialog);
1118+
dialogToolbarItem.element.setAttribute(
1119+
'jslog', `${VisualLogging.action().track({click: true}).context('timeline.shortcuts-dialog-toggle')}`);
11181120
this.panelRightToolbar.appendToolbarItem(dialogToolbarItem);
11191121
// The setting could have been changed from the Devtools Settings. Therefore, we
11201122
// need to update the radio buttons selection when the dialog is open.
@@ -1131,15 +1133,19 @@ export class TimelinePanel extends UI.Panel.Panel implements Client, TimelineMod
11311133
// Change EventListener is only triggered when the radio button is selected
11321134
this.#modernNavRadioButton.radioElement.addEventListener('change', () => {
11331135
this.#shortcutsDialog.data = {shortcuts: this.#getShortcutsInfo(/* isNavClassic */ false)};
1134-
Common.Settings.moduleSetting('flamechart-selected-navigation').set('modern');
1136+
Common.Settings.moduleSetting('timeline.select-modern-navigation').set('modern');
11351137
});
11361138
this.#classicNavRadioButton.radioElement.addEventListener('change', () => {
11371139
this.#shortcutsDialog.data = {shortcuts: this.#getShortcutsInfo(/* isNavClassic */ true)};
1138-
Common.Settings.moduleSetting('flamechart-selected-navigation').set('classic');
1140+
Common.Settings.moduleSetting('timeline.select-classic-navigation').set('classic');
11391141
});
11401142

11411143
this.#navigationRadioButtons.appendChild(this.#modernNavRadioButton);
1144+
this.#modernNavRadioButton.setAttribute(
1145+
'jslog', `${VisualLogging.action().track({click: true}).context('flamechart-select-modern-navigation')}`);
11421146
this.#navigationRadioButtons.appendChild(this.#classicNavRadioButton);
1147+
this.#classicNavRadioButton.setAttribute(
1148+
'jslog', `${VisualLogging.action().track({click: true}).context('flamechart-select-classic-navigation')}`);
11431149

11441150
return this.#navigationRadioButtons;
11451151
}

front_end/ui/visual_logging/KnownContextValues.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1420,7 +1420,6 @@ export const knownContextValues = new Set([
14201420
'fix-this-issue',
14211421
'flame',
14221422
'flamechart-selected-navigation',
1423-
'flamechart-selected-navigation-modern',
14241423
'flex',
14251424
'flex-basis',
14261425
'flex-direction',
@@ -3490,8 +3489,11 @@ export const knownContextValues = new Set([
34903489
'timeline.save-to-file-more-options',
34913490
'timeline.save-to-file-with-annotations',
34923491
'timeline.save-to-file-without-annotations',
3492+
'timeline.select-classic-navigation',
3493+
'timeline.select-modern-navigation',
34933494
'timeline.settings',
34943495
'timeline.setup',
3496+
'timeline.shortcuts-dialog-toggle',
34953497
'timeline.show-history',
34963498
'timeline.sidebar',
34973499
'timeline.sidebar-insights-category-select',

0 commit comments

Comments
 (0)