Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 26 additions & 12 deletions src/webviews/apps/plus/home/components/active-work.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,15 @@ export class GlActiveBranchCard extends GlBranchCardBase {
flex-direction: column;
gap: 0.8rem;
}

span.branch-item__missing {
color: var(--vscode-descriptionForeground);
font-style: italic;
}

gl-work-item {
--gl-card-vertical-padding: 0.4rem;
}
`,
];

Expand All @@ -243,9 +252,9 @@ export class GlActiveBranchCard extends GlBranchCardBase {

override render(): unknown {
return html`
${this.renderBranchIndicator()}${this.renderBranchItem(
${this.renderBranchIndicator()}${this.renderIssuesItem()}${this.renderBranchItem(
html`${this.renderBranchStateActions()}${this.renderBranchActions()}`,
)}${this.renderPrItem()}${this.renderIssuesItem()}
)}${this.renderPrItem()}
`;
}

Expand Down Expand Up @@ -518,16 +527,21 @@ export class GlActiveBranchCard extends GlBranchCardBase {
if (!issues.length) {
if (!this.expanded) return nothing;

return html`<gl-button
class="branch-item__missing"
appearance="secondary"
full
href=${this.createCommandLink<AssociateIssueWithBranchCommandArgs>('gitlens.associateIssueWithBranch', {
branch: this.branch.reference,
source: 'home',
})}
>Associate an Issue</gl-button
>`;
return html`<div class="branch-item__row" full>
<span class="branch-item__missing" full>Current work item</span>
<gl-tooltip hoist content="Associate an issue">
<a
href=${this.createCommandLink<AssociateIssueWithBranchCommandArgs>(
'gitlens.associateIssueWithBranch',
{
branch: this.branch.reference,
source: 'home',
},
)}
><span class="branch-item__icon"> <issue-icon></issue-icon> </span
></a>
</gl-tooltip>
</div>`;
}
return super.renderIssuesItem();
}
Expand Down
2 changes: 2 additions & 0 deletions src/webviews/apps/plus/home/components/branch-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1152,6 +1152,8 @@ export class GlWorkUnit extends LitElement {

gl-card::part(base) {
margin-block-end: 0;
padding-top: var(--gl-card-vertical-padding, 0.8rem);
padding-bottom: var(--gl-card-vertical-padding, 0.8rem);
}
`,
];
Expand Down