Refactor theme and layout for sidebar, panel, and auxiliary components#304447
Refactor theme and layout for sidebar, panel, and auxiliary components#304447
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adjusts the Agent Sessions window’s visual styling (spacing, borders, and background colors) to better align the sidebar/panel/auxiliary bar with the updated card-like layout, and ensures the terminal background resolves appropriately in the sessions window.
Changes:
- Update sessions window part margins/padding and introduce/align inset borders for consistent card spacing.
- Shift several sessions window backgrounds to use
editorBackground/SIDE_BAR_BACKGROUNDfor more cohesive theming. - Add a sessions-window-specific terminal background fallback via
IWorkbenchEnvironmentService.isSessionsWindow.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/terminal/browser/terminalInstance.ts | Sessions window-specific terminal background fallback. |
| src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css | Increase scrollable padding in sessions workbench context. |
| src/vs/sessions/contrib/sessions/browser/media/sessionsViewPane.css | Adjust bottom spacing and button container padding. |
| src/vs/sessions/contrib/sessions/browser/media/customizationsToolbar.css | Update toolbar inset spacing and border token usage. |
| src/vs/sessions/contrib/accountMenu/browser/media/accountWidget.css | Hide toolbar’s default action label to avoid duplicate UI. |
| src/vs/sessions/common/theme.ts | Make sessions sidebar/chat title backgrounds default to editorBackground; remove sidebar border token. |
| src/vs/sessions/browser/parts/sidebarPart.ts | Update sidebar colors/border behavior and footer sizing constants. |
| src/vs/sessions/browser/parts/panelPart.ts | Adjust panel card margins, background/border tokens, and layout sizing. |
| src/vs/sessions/browser/parts/media/sidebarPart.css | Sessions sidebar footer inset styling + pane header inset border pseudo-element. |
| src/vs/sessions/browser/parts/media/panelPart.css | Force panel title/editor/terminal backgrounds to match sidebar background token. |
| src/vs/sessions/browser/parts/media/auxiliaryBarPart.css | Force auxiliary bar title/editor backgrounds to match sidebar background token. |
| src/vs/sessions/browser/parts/chatBarPart.ts | Align chat bar margins and border token usage with updated card layout behavior. |
| src/vs/sessions/browser/parts/auxiliaryBarPart.ts | Align auxiliary bar margins and border token usage; adjust layout sizing. |
| src/vs/sessions/browser/media/style.css | Update global sessions layout margins/backgrounds and sidebar-hidden margin behavior. |
benibenj
left a comment
There was a problem hiding this comment.
Wasn't really possible to override colors in the sessions window before but now that should be possible. I think we should use the correct variable name for each part, like var(--vscode-sideBar-background) for sidebar. In some cases it might not be possible and I think we should just create a new sidebar color var(--vscode-sessions-sideBar-background). And we should just make sure the correct default value/inheritance is set
| if (terminalBackground) { | ||
| return terminalBackground; | ||
| } | ||
| if (this._environmentService.isSessionsWindow) { |
There was a problem hiding this comment.
This should not be done this way. Instead, the color of PANEL_BACKGROUND should be changed in the sessions windows to be a different color
There was a problem hiding this comment.
this._environmentService.isSessionsWindow should almost never be used
There was a problem hiding this comment.
Use colorRegistry.updateDefaultColor(PANEL_BACKGROUND, editorBackground); or whatever color you want
| .agent-sessions-workbench .part.sidebar { | ||
| background: var(--vscode-sideBar-background); | ||
| border-right: 1px solid var(--vscode-sideBar-border, transparent); | ||
| background: var(--vscode-editor-background); |
There was a problem hiding this comment.
can we instead have a sessions sidebar color which is registered and inherits from the editor background color. Same for other parts
| .agent-sessions-workbench .part.auxiliarybar > .content .monaco-editor, | ||
| .agent-sessions-workbench .part.auxiliarybar > .content .monaco-editor .margin, | ||
| .agent-sessions-workbench .part.auxiliarybar > .content .monaco-editor .monaco-editor-background { | ||
| background-color: var(--vscode-sideBar-background); |
There was a problem hiding this comment.
same, create seesion aux sidebar color
src/vs/sessions/common/theme.ts
Outdated
| export const sessionsSidebarHeaderBackground = registerColor( | ||
| 'sessionsSidebarHeader.background', | ||
| SIDE_BAR_BACKGROUND, | ||
| editorBackground, |
There was a problem hiding this comment.
inherit from sessionsSidebarBackground
src/vs/sessions/common/theme.ts
Outdated
| export const chatBarTitleBackground = registerColor( | ||
| 'chatBarTitle.background', | ||
| SIDE_BAR_BACKGROUND, | ||
| editorBackground, |
There was a problem hiding this comment.
inherit from sessionsSidebarBackground
| padding: 0 6px; | ||
| } | ||
|
|
||
| .agent-sessions-workbench .pane-body & .monaco-scrollable-element { |
There was a problem hiding this comment.
this also affects vscode, have you checked if it looks fine there too?
…omponents Co-authored-by: Copilot <copilot@github.com>
…components Co-authored-by: Copilot <copilot@github.com>
…nents Co-authored-by: Copilot <copilot@github.com>
… components Co-authored-by: Copilot <copilot@github.com>
…ew pane Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
…ground properties Co-authored-by: Copilot <copilot@github.com>
1cf3f64 to
66e2341
Compare
Co-authored-by: Copilot <copilot@github.com>
#304447) * refactor: update theme colors for sidebar, panel, and auxiliary bar components Co-authored-by: Copilot <copilot@github.com> * refactor: update sidebar and panel styles to remove right borders and adjust colors * refactor: adjust margin values for chatbar, auxiliary bar, and panel components Co-authored-by: Copilot <copilot@github.com> * refactor: adjust layout margins for chatbar, panel, and sidebar components Co-authored-by: Copilot <copilot@github.com> * refactor: update padding for account widget and agent sessions viewer components Co-authored-by: Copilot <copilot@github.com> * refactor: adjust footer margins and add bottom margin for sessions view pane Co-authored-by: Copilot <copilot@github.com> * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * refactor: remove unused imports in sidebarPart.ts Co-authored-by: Copilot <copilot@github.com> * refactor: update theme colors for sessions components and adjust background properties Co-authored-by: Copilot <copilot@github.com> --------- Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Update theme colors and layout margins for sidebar, panel, and auxiliary bar components to enhance visual consistency and usability. Adjust padding and margins across various components, ensuring a cohesive design throughout the application.