Skip to content

Commit c3d1901

Browse files
sergeibbbd13
authored andcommitted
Hides walkthrough link in featue-nav.ts
(#3837, #4390)
1 parent 0c49c30 commit c3d1901

File tree

3 files changed

+27
-15
lines changed

3 files changed

+27
-15
lines changed

src/webviews/apps/home/components/feature-nav.ts

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -196,21 +196,31 @@ export class GlFeatureNav extends GlElement {
196196
this.orgAllowsDrafts,
197197
() => html`
198198
<div class="nav-list__item">
199-
<a
200-
class="nav-list__link${this.blockRepoFeatures ? ' is-disabled' : ''}"
201-
href="${createCommandLink<OpenWalkthroughCommandArgs>('gitlens.openWalkthrough', {
202-
step: 'streamline-collaboration',
203-
source: { source: 'home', detail: 'old-home' },
204-
})}"
205-
data-requires="repo"
206-
data-org-requires="drafts"
207-
aria-label="Open Code Suggest walkthrough"
208-
><code-icon class="nav-list__icon" icon="gl-code-suggestion"></code-icon
209-
><gl-tooltip hoist class="nav-list__group" content="Open Code Suggest walkthrough"
210-
><span class="nav-list__label">Code Suggest</span
211-
><span class="nav-list__desc">New!</span></gl-tooltip
212-
>
213-
</a>
199+
${when(
200+
this._state.walkthroughSupported,
201+
() =>
202+
html` <a
203+
class="nav-list__link${this.blockRepoFeatures ? ' is-disabled' : ''}"
204+
href="${createCommandLink<OpenWalkthroughCommandArgs>(
205+
'gitlens.openWalkthrough',
206+
{
207+
step: 'streamline-collaboration',
208+
source: { source: 'home', detail: 'old-home' },
209+
},
210+
)}"
211+
data-requires="repo"
212+
data-org-requires="drafts"
213+
aria-label="Open Code Suggest walkthrough"
214+
><code-icon class="nav-list__icon" icon="gl-code-suggestion"></code-icon
215+
><gl-tooltip
216+
hoist
217+
class="nav-list__group"
218+
content="Open Code Suggest walkthrough"
219+
><span class="nav-list__label">Code Suggest</span
220+
><span class="nav-list__desc">New!</span></gl-tooltip
221+
>
222+
</a>`,
223+
)}
214224
<gl-feature-badge
215225
.source=${this.badgeSource}
216226
.subscription=${this._state.subscription}

src/webviews/home/homeWebview.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -808,6 +808,7 @@ export class HomeWebviewProvider implements WebviewProvider<State, State, HomeWe
808808
integrations: integrations,
809809
ai: ai,
810810
hasAnyIntegrationConnected: anyConnected,
811+
walkthroughSupported: this.container.walkthrough != null,
811812
walkthroughProgress:
812813
!this.getWalkthroughDismissed() && this.container.walkthrough != null
813814
? {

src/webviews/home/protocol.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export interface State extends WebviewState {
3737
ai: { model: AIModel | undefined };
3838
avatar?: string;
3939
organizationsCount?: number;
40+
walkthroughSupported: boolean;
4041
walkthroughProgress?: {
4142
doneCount: number;
4243
allCount: number;

0 commit comments

Comments
 (0)