mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-02 00:09:30 +01:00
Refactor button configuration and adjust CSS padding and gap for improved layout
This commit is contained in:
@@ -1000,13 +1000,7 @@ export class ChangesViewPane extends ViewPane {
|
||||
menuOptions: sessionResource
|
||||
? { args: [sessionResource, this.agentSessionsService.getSession(sessionResource)?.metadata] }
|
||||
: { shouldForwardArgs: true },
|
||||
buttonConfigProvider: (action) => {
|
||||
if (
|
||||
action.id === 'chatEditing.viewAllSessionChanges' ||
|
||||
action.id === 'github.copilot.chat.openPullRequestCopilotCLIAgentSession.openPR'
|
||||
) {
|
||||
return { showIcon: true, showLabel: false, isSecondary: true };
|
||||
}
|
||||
buttonConfigProvider: (action, index) => {
|
||||
if (action.id === 'github.copilot.chat.createPullRequestCopilotCLIAgentSession.updatePR') {
|
||||
const customLabel = outgoingChanges > 0
|
||||
? `${action.label} ${outgoingChanges}↑`
|
||||
@@ -1022,6 +1016,12 @@ export class ChangesViewPane extends ViewPane {
|
||||
}
|
||||
return { showIcon: true, showLabel: false, isSecondary: true };
|
||||
}
|
||||
if (
|
||||
action.id === 'chatEditing.viewAllSessionChanges' ||
|
||||
action.id === 'github.copilot.chat.openPullRequestCopilotCLIAgentSession.openPR'
|
||||
) {
|
||||
return { showIcon: true, showLabel: false, isSecondary: true };
|
||||
}
|
||||
if (
|
||||
action.id === 'github.copilot.chat.createPullRequestCopilotCLIAgentSession.createPR' ||
|
||||
action.id === 'github.copilot.chat.mergeCopilotCLIAgentSessionChanges.merge' ||
|
||||
@@ -1032,7 +1032,10 @@ export class ChangesViewPane extends ViewPane {
|
||||
return { showIcon: true, showLabel: true, isSecondary: false };
|
||||
}
|
||||
|
||||
return undefined;
|
||||
// Unknown actions (e.g. extension-contributed):
|
||||
// first action is primary, rest are icon-only secondary
|
||||
const isSecondary = index > 0;
|
||||
return { showIcon: true, showLabel: !isSecondary, isSecondary };
|
||||
}
|
||||
}
|
||||
));
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
padding: 8px;
|
||||
padding: 4px 8px 8px 8px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
gap: 6px;
|
||||
gap: 4px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user