Skip to content

Commit 29e9c97

Browse files
olasunkanmi.raymondolasunkanmi.raymond
authored andcommitted
fix(ui): Improve responsiveness and content overflow in webview UI
* Add to various UI panels for better responsiveness. * Enable horizontal scrolling for code blocks, tables, and chat content. * Adjust code block styling to improve width handling.
1 parent 7ffa9d7 commit 29e9c97

11 files changed

Lines changed: 12 additions & 4 deletions

File tree

webviewUi/src/components/MessageRenderer.css

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@
7474
color: var(--vscode-editor-foreground, #bb9af7);
7575
display: block;
7676
white-space: pre;
77-
max-width: none !important;
78-
width: max-content;
7977
}
8078

8179
.doc-content strong {
@@ -169,7 +167,7 @@ code {
169167

170168
pre {
171169
overflow-x: auto !important;
172-
max-width: calc(100vw - 60px) !important;
170+
max-width: 100% !important;
173171
white-space: pre;
174172
box-sizing: border-box;
175173
}

webviewUi/src/components/browser/BrowserPanel.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ const PanelOverlay = styled.div<{ isOpen: boolean }>`
8888

8989
const PanelContainer = styled.div`
9090
width: 420px;
91+
max-width: 100%;
9192
height: 100%;
9293
background: var(--vscode-editor-background);
9394
border-left: 1px solid var(--vscode-widget-border);

webviewUi/src/components/cost/CostDashboardPanel.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ const PanelOverlay = styled.div<{ $isOpen: boolean }>`
4444

4545
const PanelContainer = styled.div`
4646
width: 420px;
47+
max-width: 100%;
4748
height: 100%;
4849
background: var(--vscode-editor-background);
4950
border-left: 1px solid var(--vscode-widget-border);

webviewUi/src/components/coworker/CoWorkerPanel.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ const PanelOverlay = styled.div<{ $isOpen: boolean }>`
3939

4040
const PanelContainer = styled.div`
4141
width: 420px;
42+
max-width: 100%;
4243
height: 100%;
4344
background: var(--vscode-editor-background);
4445
border-left: 1px solid var(--vscode-widget-border);

webviewUi/src/components/notifications/NotificationPanel.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const PanelOverlay = styled.div<{ isOpen: boolean }>`
2828

2929
const PanelContainer = styled.div`
3030
width: 350px;
31+
max-width: 100%;
3132
height: 100%;
3233
background: var(--vscode-editor-background);
3334
border-left: 1px solid var(--vscode-widget-border);

webviewUi/src/components/sessions/SessionsPanel.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ const Panel = styled.div<{ $isOpen: boolean }>`
5050
display: flex;
5151
flex-direction: column;
5252
box-shadow: -4px 0 24px rgba(0, 0, 0, 0.4);
53+
max-width: 100%;
5354
`;
5455

5556
const Header = styled.div`

webviewUi/src/components/team/TeamPanel.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ const PanelOverlay = styled.div<{ $isOpen: boolean }>`
3131

3232
const PanelContainer = styled.div`
3333
width: 460px;
34+
max-width: 100%;
3435
height: 100%;
3536
background: var(--vscode-editor-background);
3637
border-left: 1px solid var(--vscode-widget-border);

webviewUi/src/components/terminal/TerminalViewerPanel.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ const PanelOverlay = styled.div<{ $isOpen: boolean }>`
3333

3434
const PanelContainer = styled.div`
3535
width: 520px;
36+
max-width: 100%;
3637
height: 100%;
3738
background: var(--vscode-editor-background);
3839
border-left: 1px solid var(--vscode-widget-border);

webviewUi/src/components/updates/UpdatesPanel.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ const PanelOverlay = styled.div<{ isOpen: boolean }>`
3939

4040
const PanelContainer = styled.div`
4141
width: 450px; /* Slightly wider than notifications for news readability */
42+
max-width: 100%;
4243
height: 100%;
4344
background: var(--vscode-editor-background);
4445
border-left: 1px solid var(--vscode-widget-border);

webviewUi/src/components/webview.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
}
8080

8181
.chat-content {
82-
overflow: visible;
82+
overflow-x: auto;
8383
padding-bottom: 20px;
8484
max-width: 100%;
8585
width: 100%;

0 commit comments

Comments
 (0)