Skip to content

Commit e8ecac6

Browse files
Copilotalexr00
andcommitted
Make base branch clickable instead of using edit icon button
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
1 parent 0633130 commit e8ecac6

File tree

3 files changed

+32
-4
lines changed

3 files changed

+32
-4
lines changed

src/@types/vscode.proposed.chatSessionsProvider.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ declare module 'vscode' {
9595
*/
9696
description?: string | MarkdownString;
9797

98+
/**
99+
* An optional badge that provides additional context about the chat session.
100+
*/
101+
badge?: string | MarkdownString;
102+
98103
/**
99104
* An optional status indicating the current state of the session.
100105
*/

webviews/components/header.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,12 +275,18 @@ function Subtitle({ state, stateReason, isDraft, isIssue, author, base, head, co
275275
<div className="merge-branches">
276276
<AuthorLink for={author} /> {!isIssue ? (<>
277277
{getActionText(state)} into{' '}
278-
<code className="branch-tag">{base}</code>
279278
{canEdit && state === GithubItemStateEnum.Open ? (
280-
<button title="Change base branch" onClick={changeBaseBranch} className="icon-button">
281-
{editIcon}
279+
<button
280+
title="Change base branch"
281+
onClick={changeBaseBranch}
282+
className="branch-tag branch-tag-button"
283+
aria-label="Change base branch"
284+
>
285+
{base}
282286
</button>
283-
) : null}
287+
) : (
288+
<code className="branch-tag">{base}</code>
289+
)}
284290
{' '}from <code className="branch-tag">{head}</code>
285291
</>) : null}
286292
</div>

webviews/editorWebview/index.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,23 @@ body button .icon {
541541
border-radius: 4px;
542542
}
543543

544+
.branch-tag-button {
545+
border: 1px solid transparent;
546+
cursor: pointer;
547+
font-family: inherit;
548+
font-size: inherit;
549+
}
550+
551+
.branch-tag-button:hover {
552+
background: var(--vscode-button-hoverBackground);
553+
color: var(--vscode-button-foreground);
554+
border-color: var(--vscode-button-border);
555+
}
556+
557+
.branch-tag-button:active {
558+
background: var(--vscode-button-background);
559+
}
560+
544561
.merge-branches .icon-button {
545562
margin-top: 4px;
546563
}

0 commit comments

Comments
 (0)