Skip to content

Commit c0bf7a1

Browse files
committed
Ensures preview banner for old home view
1 parent 30d4150 commit c0bf7a1

File tree

1 file changed

+27
-31
lines changed

1 file changed

+27
-31
lines changed

src/webviews/apps/home/components/preview-banner.ts

Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -66,46 +66,42 @@ export class GlPreviewBanner extends LitElement {
6666
private _button!: HTMLButtonElement;
6767

6868
override render() {
69-
if (this.closed || this._state.previewCollapsed === true) {
70-
return nothing;
71-
}
72-
73-
if (this._state.previewEnabled === true) {
69+
if (this._state.previewEnabled !== true) {
7470
return html`
75-
<gl-card>
76-
<p><strong>Welcome to the new Home View!</strong></p>
77-
<p>
71+
<gl-tooltip placement="bottom">
72+
<button class="text-button text-button--end" @click=${() => this.togglePreview()}>
73+
New Home View <code-icon icon="arrow-right"></code-icon>
74+
</button>
75+
<p slot="content">
76+
<strong>Switch to the new Home View!</strong><br />
7877
We're reinventing GitLens' Home to be a more helpful daily workflow tool. We'll continue to
79-
refine this view and welcome your
80-
<a href="https://github.com/gitkraken/vscode-gitlens/discussions/3721">feedback</a>.
78+
refine this view and welcome your feedback.
8179
</p>
82-
<button-container>
83-
<gl-button appearance="secondary" @click=${() => this.togglePreview()} full
84-
><code-icon icon="arrow-left"></code-icon> Revert to Old Home View</gl-button
85-
>
86-
</button-container>
87-
<gl-button
88-
slot="actions"
89-
appearance="toolbar"
90-
tooltip="Dismiss Welcome"
91-
@click=${() => this.onClose()}
92-
><code-icon icon="close"></code-icon
93-
></gl-button>
94-
</gl-card>
80+
</gl-tooltip>
9581
`;
9682
}
9783

84+
if (this.closed || this._state.previewCollapsed === true) {
85+
return nothing;
86+
}
87+
9888
return html`
99-
<gl-tooltip placement="bottom">
100-
<button class="text-button text-button--end" @click=${() => this.togglePreview()}>
101-
New Home View <code-icon icon="arrow-right"></code-icon>
102-
</button>
103-
<p slot="content">
104-
<strong>Switch to the new Home View!</strong><br />
89+
<gl-card>
90+
<p><strong>Welcome to the new Home View!</strong></p>
91+
<p>
10592
We're reinventing GitLens' Home to be a more helpful daily workflow tool. We'll continue to refine
106-
this view and welcome your feedback.
93+
this view and welcome your
94+
<a href="https://github.com/gitkraken/vscode-gitlens/discussions/3721">feedback</a>.
10795
</p>
108-
</gl-tooltip>
96+
<button-container>
97+
<gl-button appearance="secondary" @click=${() => this.togglePreview()} full
98+
><code-icon icon="arrow-left"></code-icon> Revert to Old Home View</gl-button
99+
>
100+
</button-container>
101+
<gl-button slot="actions" appearance="toolbar" tooltip="Dismiss Welcome" @click=${() => this.onClose()}
102+
><code-icon icon="close"></code-icon
103+
></gl-button>
104+
</gl-card>
109105
`;
110106
}
111107

0 commit comments

Comments
 (0)