Skip to content

Commit ce69985

Browse files
committed
Enhance dialog layout: update dimensions and overflow handling in AgentRunPage and RunsSidePanel components
Signed-off-by: Andre Bossard <anbossar@microsoft.com>
1 parent 5dda3b6 commit ce69985

2 files changed

Lines changed: 49 additions & 28 deletions

File tree

frontend/src/features/workbench/AgentRunPage.jsx

Lines changed: 36 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,25 @@
66
*/
77

88
import {
9-
Badge,
10-
Button,
11-
Card,
12-
Caption1,
13-
Dialog,
14-
DialogActions,
15-
DialogBody,
16-
DialogContent,
17-
DialogSurface,
18-
DialogTitle,
19-
Field,
20-
Spinner,
21-
Subtitle1,
22-
Subtitle2,
23-
Text,
24-
Textarea,
25-
Tooltip,
26-
makeStyles,
27-
tokens,
9+
Badge,
10+
Button,
11+
Caption1,
12+
Card,
13+
Dialog,
14+
DialogActions,
15+
DialogBody,
16+
DialogContent,
17+
DialogSurface,
18+
DialogTitle,
19+
Field,
20+
Spinner,
21+
Subtitle1,
22+
Subtitle2,
23+
Text,
24+
Textarea,
25+
Tooltip,
26+
makeStyles,
27+
tokens,
2828
} from '@fluentui/react-components'
2929
import { ArrowClockwise24Regular, Dismiss24Regular, Pulse20Regular } from '@fluentui/react-icons'
3030
import { useCallback, useEffect, useState } from 'react'
@@ -97,9 +97,21 @@ const useStyles = makeStyles({
9797
whiteSpace: 'nowrap',
9898
},
9999
dialogSurface: {
100-
maxWidth: '900px',
101-
width: '90vw',
102-
maxHeight: '85vh',
100+
maxWidth: '960px',
101+
width: 'min(96vw, 960px)',
102+
maxHeight: '92vh',
103+
display: 'flex',
104+
flexDirection: 'column',
105+
},
106+
dialogBody: {
107+
flex: '1 1 auto',
108+
minHeight: 0,
109+
overflow: 'hidden',
110+
},
111+
dialogContent: {
112+
flex: '1 1 auto',
113+
minHeight: 0,
114+
overflowY: 'auto',
103115
},
104116
})
105117

@@ -296,8 +308,8 @@ export default function AgentRunPage({ agent }) {
296308
>
297309
Run Result — {formatTime(selectedRun.created_at)}
298310
</DialogTitle>
299-
<DialogBody>
300-
<DialogContent style={{ overflowY: 'auto' }}>
311+
<DialogBody className={styles.dialogBody}>
312+
<DialogContent className={styles.dialogContent}>
301313
{selectedRun.error && (
302314
<Text style={{ color: tokens.colorPaletteRedForeground1, marginBottom: tokens.spacingVerticalM, display: 'block' }}>
303315
Error: {selectedRun.error}

frontend/src/features/workbench/RunsSidePanel.jsx

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,20 @@ const useStyles = makeStyles({
112112
color: tokens.colorNeutralForeground3,
113113
},
114114
dialogSurface: {
115-
maxWidth: '900px',
116-
width: '90vw',
117-
maxHeight: '85vh',
115+
maxWidth: '960px',
116+
width: 'min(96vw, 960px)',
117+
maxHeight: '92vh',
118+
display: 'flex',
119+
flexDirection: 'column',
120+
},
121+
dialogBody: {
122+
flex: '1 1 auto',
123+
minHeight: 0,
124+
overflow: 'hidden',
118125
},
119126
dialogContent: {
127+
flex: '1 1 auto',
128+
minHeight: 0,
120129
overflowY: 'auto',
121130
},
122131
})
@@ -256,7 +265,7 @@ export default function RunsSidePanel({ runs = [], agents = [], selectedRunId, o
256265
>
257266
{resolveAgentName(agentMap, selectedRun)} — Result
258267
</DialogTitle>
259-
<DialogBody>
268+
<DialogBody className={styles.dialogBody}>
260269
<DialogContent className={styles.dialogContent}>
261270
<div data-testid={`run-detail-${selectedRun.id}`}>
262271
{selectedRun.error && (

0 commit comments

Comments
 (0)