Skip to content

feature: allow copying ref names from commit info panel#2321

Open
ivnnv wants to merge 1 commit intosourcegit-scm:developfrom
ivnnv:pr/commit-refs-copy
Open

feature: allow copying ref names from commit info panel#2321
ivnnv wants to merge 1 commit intosourcegit-scm:developfrom
ivnnv:pr/commit-refs-copy

Conversation

@ivnnv
Copy link
Copy Markdown

@ivnnv ivnnv commented May 5, 2026

Adds a small copy button next to each ref pill in the commit info panel. Clicking it copies the ref name (e.g. main, origin/feature) to the clipboard, matching the existing copy affordance on the SHA row.

Screenshot 2026-05-05 at 14 02 30

The Histories grid is intentionally untouched (copy buttons there would clutter the dense rows). One side effect to flag: wrap in the REFS row now happens between [pill+button] groups instead of inside one continuous presenter, which is the natural behavior for an ItemsControl + WrapPanel layout.

Test plan

  • Select a commit with refs and click a copy icon in the INFORMATION panel's REFS row — the ref name lands in the clipboard.

Adds a small copy button next to each ref pill in the commit info
panel. Clicking it copies the ref name (e.g. "main", "origin/feature")
to the clipboard, matching the existing copy affordance on the SHA row.

CommitRefsPresenter gains an optional Decorator styled property. When
set, the presenter renders that single decorator instead of iterating
DataContext.Decorators. The existing multi-decorator path is unchanged,
so the Histories grid still renders refs the same way it did before.

CommitBaseInfo's REFS row, previously a single CommitRefsPresenter
rendering all decorators in one custom-drawn run, is now an
ItemsControl over Decorators where each item is a single-decorator
presenter plus a copy Button. The Button picks up Avalonia's standard
tooltip and hover styling. Wrap now happens between pill+button
groups instead of inside one continuous presenter.

Pill geometry, icons, fills and outlines are unchanged. The Histories
grid is intentionally untouched.
@ivnnv ivnnv changed the base branch from master to develop May 5, 2026 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant