Skip to content

Commit 0bdde89

Browse files
committed
Removes the option to associate an issue from cards in the RECENT section
(#4333, #4362)
1 parent d7e4dc1 commit 0bdde89

File tree

3 files changed

+24
-13
lines changed

3 files changed

+24
-13
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
99
### Changed
1010

1111
- Automatically stashes (and pops) uncommitted changes on Pull ([#4296](https://github.com/gitkraken/vscode-gitlens/issues/4296))
12+
- Removes the option to associate an issue from cards in the RECENT section of the _Home_ view ([#4333](https://github.com/gitkraken/vscode-gitlens/issues/4333))
1213

1314
### Fixed
1415

src/webviews/apps/plus/home/components/active-work.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { css, html, LitElement, nothing } from 'lit';
55
import { customElement, state } from 'lit/decorators.js';
66
import { ifDefined } from 'lit/directives/if-defined.js';
77
import { isSubscriptionTrialOrPaidFromState } from '../../../../../plus/gk/utils/subscription.utils';
8+
import type { AssociateIssueWithBranchCommandArgs } from '../../../../../plus/startWork/startWork';
89
import { createCommandLink } from '../../../../../system/commands';
910
import { createWebviewCommandLink } from '../../../../../system/webview';
1011
import type {
@@ -511,4 +512,25 @@ export class GlActiveBranchCard extends GlBranchCardBase {
511512
protected getCollapsedActions(): TemplateResult[] {
512513
return [];
513514
}
515+
516+
protected override renderIssuesItem(): TemplateResult | NothingType {
517+
const issues = [...(this.issues ?? []), ...(this.autolinks ?? [])];
518+
if (!issues.length) {
519+
if (!this.expanded) return nothing;
520+
521+
return html`<gl-button
522+
class="branch-item__missing"
523+
appearance="secondary"
524+
full
525+
href=${this.createCommandLink<AssociateIssueWithBranchCommandArgs>('gitlens.associateIssueWithBranch', {
526+
branch: this.branch.reference,
527+
source: 'home',
528+
})}
529+
>Associate an Issue</gl-button
530+
>`;
531+
}
532+
return super.renderIssuesItem();
533+
}
514534
}
535+
536+
type NothingType = typeof nothing;

src/webviews/apps/plus/home/components/branch-card.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import {
1212
launchpadGroupIconMap,
1313
launchpadGroupLabelMap,
1414
} from '../../../../../plus/launchpad/models/launchpad';
15-
import type { AssociateIssueWithBranchCommandArgs } from '../../../../../plus/startWork/startWork';
1615
import { createCommandLink } from '../../../../../system/commands';
1716
import { fromNow } from '../../../../../system/date';
1817
import { interpolate, pluralize } from '../../../../../system/string';
@@ -916,18 +915,7 @@ export abstract class GlBranchCardBase extends GlElement {
916915
protected renderIssuesItem(): TemplateResult | NothingType {
917916
const issues = [...(this.issues ?? []), ...(this.autolinks ?? [])];
918917
if (!issues.length) {
919-
if (!this.expanded) return nothing;
920-
921-
return html`<gl-button
922-
class="branch-item__missing"
923-
appearance="secondary"
924-
full
925-
href=${this.createCommandLink<AssociateIssueWithBranchCommandArgs>('gitlens.associateIssueWithBranch', {
926-
branch: this.branch.reference,
927-
source: 'home',
928-
})}
929-
>Associate an Issue</gl-button
930-
>`;
918+
return nothing;
931919
}
932920

933921
const indicator: GlCard['indicator'] = this.branch.opened ? 'base' : undefined;

0 commit comments

Comments
 (0)