Skip to content
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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
1 change: 0 additions & 1 deletion src/vs/sessions/browser/menus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ export const Menus = {
SessionConversations: new MenuId('SessionsSessionConversations'),
SessionChatTab: new MenuId('SessionsSessionChatTab'),
SessionsEditorHeaderPrimary: new MenuId('SessionsEditorHeaderPrimary'),
SessionsEditorHeaderSecondary: new MenuId('SessionsEditorHeaderSecondary'),
SessionsEditorHeaderLayout: new MenuId('SessionsEditorHeaderLayout'),
SessionsEditorTitle: new MenuId('SessionsEditorTitle'),
SessionsEditorTabsBarContext: new MenuId('SessionsEditorTabsBarContext'),
Expand Down
25 changes: 19 additions & 6 deletions src/vs/sessions/browser/parts/media/editorPart.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
padding-right: 0;
}

.agent-sessions-workbench .part.editor > .content .editor-group-container > .title > .title-actions {
padding: 0 0 0 var(--vscode-spacing-size40);
}

.agent-sessions-workbench.dock-detail-panel .part.editor > .content .editor-group-container > .title:not(.tabs) > .label-container > .single-tab.title-label {
padding-left: var(--vscode-spacing-size80);
}
Expand All @@ -35,16 +39,25 @@
display: none;
}

.agent-sessions-workbench.dock-detail-panel .part.editor > .content .editor-group-container > .title:not(.tabs) > .tabs-bar-add-tab {
.agent-sessions-workbench.dock-detail-panel .part.editor > .content .editor-group-container > .title:not(.tabs) > .label-container > .tabs-bar-add-tab {
display: flex;
align-items: center;
flex: 0 0 auto;
height: var(--editor-group-tab-height);
}

.agent-sessions-workbench.dock-detail-panel .part.editor > .content .editor-group-container > .title:not(.tabs) > .tabs-bar-add-tab .action-label:not(.separator) {
width: 22px;
height: 22px;
.agent-sessions-workbench.dock-detail-panel .part.editor > .content .editor-group-container > .title:not(.tabs) > .label-container > .tabs-bar-add-tab::after {
content: '';
width: var(--vscode-strokeThickness);
height: var(--vscode-spacing-size160);
margin: 0 var(--vscode-spacing-size40);
background-color: var(--vscode-titleBar-activeForeground);
opacity: 0.3;
}

.agent-sessions-workbench.dock-detail-panel .part.editor > .content .editor-group-container > .title:not(.tabs) > .label-container > .tabs-bar-add-tab .action-label:not(.separator) {
width: var(--vscode-codiconFontSize);
height: var(--vscode-codiconFontSize);
margin: 0 var(--vscode-spacing-size40);
display: flex;
align-items: center;
Expand All @@ -53,12 +66,12 @@
color: var(--chat-tab-inactive-foreground, currentColor);
}

.agent-sessions-workbench.dock-detail-panel .part.editor > .content .editor-group-container > .title:not(.tabs) > .tabs-bar-add-tab .action-label:not(.separator):not(.disabled):hover {
.agent-sessions-workbench.dock-detail-panel .part.editor > .content .editor-group-container > .title:not(.tabs) > .label-container > .tabs-bar-add-tab .action-label:not(.separator):not(.disabled):hover {
background-color: var(--vscode-toolbar-hoverBackground);
color: var(--chat-tab-active-foreground, currentColor);
}

.agent-sessions-workbench.dock-detail-panel .part.editor > .content .editor-group-container > .title:not(.tabs) > .tabs-bar-add-tab .action-label:not(.separator):focus-visible {
.agent-sessions-workbench.dock-detail-panel .part.editor > .content .editor-group-container > .title:not(.tabs) > .label-container > .tabs-bar-add-tab .action-label:not(.separator):focus-visible {
outline: var(--vscode-strokeThickness) solid var(--vscode-focusBorder);
outline-offset: calc(-1 * var(--vscode-strokeThickness));
}
Expand Down
8 changes: 3 additions & 5 deletions src/vs/sessions/browser/parts/singlePaneEditorPart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ import { SinglePaneAuxiliaryBarPart } from './singlePaneAuxiliaryBarPart.js';
* the editor part share one instance) and the {@link DockedAuxiliaryBarController}
* that docks and sizes the auxiliary bar inside the editor part. The full-width
* header itself is rendered by the editor group from the group's configured header
* menus ({@link Menus.SessionsEditorHeaderPrimary} / {@link Menus.SessionsEditorHeaderSecondary},
* supplied via {@link getGroupViewOptions}) and also hosts breadcrumbs in that row
* for text file editors. The part only reacts to the header's height to reposition
* the docked auxiliary bar.
* menus, supplied via {@link getGroupViewOptions}, and also hosts breadcrumbs in
* that row for text file editors. The part only reacts to the header's height to
* reposition the docked auxiliary bar.
*/
export class SinglePaneMainEditorPart extends MainEditorPart {

Expand All @@ -42,7 +41,6 @@ export class SinglePaneMainEditorPart extends MainEditorPart {
return {
menuIds: {
headerPrimary: Menus.SessionsEditorHeaderPrimary,
headerSecondary: Menus.SessionsEditorHeaderSecondary,
headerLayout: Menus.SessionsEditorHeaderLayout,
editorActions: Menus.SessionsEditorTitle,
tabsBarContext: Menus.SessionsEditorTabsBarContext,
Expand Down
31 changes: 10 additions & 21 deletions src/vs/sessions/contrib/changes/browser/changesViewActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,8 @@ class SetChangesListViewModeAction extends Action2 {
icon: Codicon.listFlat,
f1: false,
menu: {
// Always in the overflow ("…") of the right header, whether the editor
// area is visible or collapsed (as long as the changes list is shown).
id: Menus.SessionsEditorHeaderSecondary,
group: 'secondary/2_viewMode',
id: Menus.SessionsEditorTitle,
group: '2_viewMode',
order: 20,
when: ContextKeyExpr.and(
singlePaneDiffEditorTitle,
Expand Down Expand Up @@ -239,10 +237,8 @@ class SetChangesTreeViewModeAction extends Action2 {
icon: Codicon.listTree,
f1: false,
menu: {
// Always in the overflow ("…") of the right header, whether the editor
// area is visible or collapsed (as long as the changes list is shown).
id: Menus.SessionsEditorHeaderSecondary,
group: 'secondary/2_viewMode',
id: Menus.SessionsEditorTitle,
group: '2_viewMode',
order: 20,
when: ContextKeyExpr.and(
singlePaneDiffEditorTitle,
Expand Down Expand Up @@ -270,7 +266,7 @@ class CollapseAllSessionChangesDiffsAction extends Action2 {
icon: Codicon.collapseAll,
f1: false,
menu: {
id: Menus.SessionsEditorHeaderSecondary,
id: Menus.SessionsEditorTitle,
group: '1_diff',
order: 10,
when: ContextKeyExpr.and(
Expand Down Expand Up @@ -300,7 +296,7 @@ class ExpandAllSessionChangesDiffsAction extends Action2 {
icon: Codicon.expandAll,
f1: false,
menu: {
id: Menus.SessionsEditorHeaderSecondary,
id: Menus.SessionsEditorTitle,
group: '1_diff',
order: 10,
when: ContextKeyExpr.and(
Expand Down Expand Up @@ -329,20 +325,13 @@ registerAction2(ExpandAllSessionChangesDiffsAction);

// The action changes the preferred layout. Side by side still falls back to inline
// when the editor is narrow, so the label must not promise an immediate layout.
MenuRegistry.appendMenuItem(Menus.SessionsEditorHeaderSecondary, {
MenuRegistry.appendMenuItem(Menus.SessionsEditorTitle, {
command: {
id: TOGGLE_DIFF_SIDE_BY_SIDE,
title: localize('preferSideBySideDiff', "Prefer Side by Side Diff"),
tooltip: localize('preferSideBySideDiff.tooltip', "Uses inline layout when space is limited unless screen reader optimized mode is enabled."),
title: localize('alwaysShowInlineDiff', "Always Show Inline Diff"),
tooltip: localize('alwaysShowInlineDiff.tooltip', "Always uses inline layout."),
icon: Codicon.diffSidebyside,
toggled: {
condition: ContextKeyExpr.or(
ContextKeyExpr.and(singlePaneChangesEditorActive, SessionsDiffRenderSideBySideContext),
ContextKeyExpr.and(singlePaneFileDiffEditorActive, SessionsDiffRenderSideBySideContext)
)!,
title: localize('preferInlineDiff', "Prefer Inline Diff"),
tooltip: localize('preferInlineDiff.tooltip', "Always uses inline layout."),
},
toggled: SessionsDiffRenderSideBySideContext.negate(),
},
group: '1_diff',
order: 20,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { IAccessibleViewImplementation } from '../../../../platform/accessibilit
import { IViewsService } from '../../../../workbench/services/views/common/viewsService.js';
import { AccessibilityVerbositySettingId } from '../../../../workbench/contrib/accessibility/browser/accessibilityConfiguration.js';
import { FocusedViewContext } from '../../../../workbench/common/contextkeys.js';
import { IAgentWorkbenchLayoutService } from '../../../browser/workbench.js';
import { CHANGES_VIEW_ID } from '../common/changes.js';
import { ChangesViewPane } from './changesView.js';

Expand All @@ -26,6 +27,7 @@ export class SessionsChangesAccessibilityHelp implements IAccessibleViewImplemen

getProvider(accessor: ServicesAccessor) {
const viewsService = accessor.get(IViewsService);
const layoutService = accessor.get(IAgentWorkbenchLayoutService);

const content: string[] = [];
content.push(localize('sessionsChanges.overview', "You are in the Changes view. It shows the files changed by the current session as a tree, followed by two collapsible sections: Other Files and Checks."));
Expand All @@ -35,7 +37,9 @@ export class SessionsChangesAccessibilityHelp implements IAccessibleViewImplemen
content.push(localize('sessionsChanges.checks', "The Checks section lists the continuous integration checks for the session's pull request. Its header is a button: press Enter or Space to collapse or expand it{0}.", '<keybinding:sessions.action.revealCIChecks>'));
content.push(localize('sessionsChanges.viewMode', "The Changes view can show files as a tree or a flat list. Use the view's toolbar actions to switch between Tree and List modes."));
content.push(localize('sessionsChanges.operations', "When available, the toolbar also provides actions to commit, merge, sync, or create a pull request. Use Tab and Shift+Tab to move between the file list and toolbar actions."));
content.push(localize('sessionsChanges.diffView', "File diffs can prefer side-by-side or inline layout. Unless screen reader optimized mode is enabled, side-by-side diffs automatically use inline layout when space is limited. Use the Toggle Preferred Diff View command to switch the preference{0}.", '<keybinding:toggle.diff.renderSideBySide>'));
content.push(layoutService.isSinglePaneLayoutEnabled
? localize('sessionsChanges.diffView.singlePane', "File diffs can prefer side-by-side or inline layout. Unless screen reader optimized mode is enabled, side-by-side diffs automatically use inline layout when space is limited. Use Always Show Inline Diff in the editor title bar's More Actions menu, or use the Toggle Preferred Diff View command to switch the preference{0}.", '<keybinding:toggle.diff.renderSideBySide>')
: localize('sessionsChanges.diffView.classic', "File diffs can use side-by-side or inline layout. Use Inline View in the editor title area's More Actions menu, or use the Toggle Inline View command to switch the layout{0}.", '<keybinding:toggle.diff.renderSideBySide>'));

return new AccessibleContentProvider(
AccessibleViewProviderId.SessionsChanges,
Expand Down
Loading
Loading