Skip to content

Commit 64ca989

Browse files
committed
Fixes stray gap in Commit Graph header for published branches
The publish button host remained in the flex row even when it rendered nothing (branch already has an upstream), and the parent's `min-width: 3.1rem` icon-only floor forced the empty host to occupy that width. Gate `gl-publish-button` in the parent so it's only in the DOM when the branch has no upstream, mirroring the component's own render guard.
1 parent 7615620 commit 64ca989

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
2525
- Fixes pushing a branch that needs a force-push (e.g. after an amend or rebase) silently reporting success without updating the remote — a non-fast-forward (_tip of your current branch is behind_) rejection is now surfaced as an error instead of being swallowed as non-fatal ([#5364](https://github.com/gitkraken/vscode-gitlens/issues/5364))
2626
- Fixes _Fetch_, _Pull_, _Switch_, _Reset_, and _Restore_ operations silently reporting success when the underlying Git command failed with a message Git treats as a warning (e.g. an unreachable remote, or an invalid ref/revision) — these failures are now surfaced as errors instead of being swallowed as non-fatal
2727
- Fixes the working changes (WIP) stats tooltip in the details header duplicating the visible stats pill instead of describing the change breakdown — the tooltip now reads e.g. _1 file added, 2 files changed in the working tree_
28+
- Fixes a stray gap in the _Commit Graph_ header next to the fetch and sync actions when the current branch is already published — the publish action no longer reserves empty space once the branch has an upstream
2829

2930
## [18.2.0] - 2026-06-15
3031

src/webviews/apps/plus/graph/actions/gitActionsButtons.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,12 @@ export class GitActionsButtons extends LitElement {
150150
.fetchedText=${this.fetchedText}
151151
.branchName=${this.branchName}
152152
></gl-push-pull-button>
153-
<gl-publish-button .branchState=${this.branchState} .branchName=${this.branchName}></gl-publish-button>
153+
${this.branchState != null && this.branchState.upstream == null
154+
? html`<gl-publish-button
155+
.branchState=${this.branchState}
156+
.branchName=${this.branchName}
157+
></gl-publish-button>`
158+
: nothing}
154159
<gl-fetch-button
155160
.branchState=${this.branchState}
156161
.fetchedText=${this.fetchedText}

0 commit comments

Comments
 (0)