Skip to content

Commit 1c36d74

Browse files
author
Eric Amodio
committed
Fixes microsoft#94091, microsoft#94092 - switches to pinned metaphor
1 parent 956f914 commit 1c36d74

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

src/vs/workbench/contrib/timeline/browser/timelinePane.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,8 @@ export class TimelinePane extends ViewPane {
272272
this._followActiveEditor = value;
273273
this.followActiveEditorContext.set(value);
274274

275+
this.titleDescription = this.titleDescription;
276+
275277
if (value) {
276278
this.onActiveEditorChanged();
277279
}
@@ -409,7 +411,11 @@ export class TimelinePane extends ViewPane {
409411

410412
set titleDescription(description: string | undefined) {
411413
this._titleDescription = description;
412-
this.$titleDescription.textContent = description ?? '';
414+
if (this.followActiveEditor || !description) {
415+
this.$titleDescription.textContent = description ?? '';
416+
} else {
417+
this.$titleDescription.textContent = `${description} (pinned)`;
418+
}
413419
}
414420

415421
private _message: string | undefined;
@@ -1180,8 +1186,8 @@ class TimelinePaneCommands extends Disposable {
11801186
this._register(MenuRegistry.appendMenuItem(MenuId.TimelineTitle, ({
11811187
command: {
11821188
id: 'timeline.toggleFollowActiveEditor',
1183-
title: { value: localize('timeline.toggleFollowActiveEditorCommand.follow', "Automatically Follows the Active Editor"), original: 'Automatically Follows the Active Editor' },
1184-
icon: { id: 'codicon/eye' },
1189+
title: { value: localize('timeline.toggleFollowActiveEditorCommand.follow', "Pin the Current Timeline"), original: 'Pin the Current Timeline' },
1190+
icon: { id: 'codicon/pin' },
11851191
category: { value: localize('timeline', "Timeline"), original: 'Timeline' },
11861192
},
11871193
group: 'navigation',
@@ -1192,8 +1198,8 @@ class TimelinePaneCommands extends Disposable {
11921198
this._register(MenuRegistry.appendMenuItem(MenuId.TimelineTitle, ({
11931199
command: {
11941200
id: 'timeline.toggleFollowActiveEditor',
1195-
title: { value: localize('timeline.toggleFollowActiveEditorCommand.unfollow', "Not Following Active Editor"), original: 'Not Following Active Editor' },
1196-
icon: { id: 'codicon/eye-closed' },
1201+
title: { value: localize('timeline.toggleFollowActiveEditorCommand.unfollow', "Unpin the Current Timeline"), original: 'Unpin the Current Timeline' },
1202+
icon: { id: 'codicon/pinned' },
11971203
category: { value: localize('timeline', "Timeline"), original: 'Timeline' },
11981204
},
11991205
group: 'navigation',

0 commit comments

Comments
 (0)