Skip to content

Commit d3c5214

Browse files
authored
fix(report): dropdown filter not work in report (#1023)
* fix(report): dropdown filter not work in report * fix(report): add gap between loading text and icon
1 parent 9dae835 commit d3c5214

File tree

5 files changed

+21
-18
lines changed

5 files changed

+21
-18
lines changed

apps/chrome-extension/src/components/playground.less

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,6 @@
154154
color: rgba(0, 0, 0, 0.85);
155155
}
156156

157-
.loading-progress-text {
158-
margin-top: 8px;
159-
color: #888;
160-
font-size: 12px;
161-
}
162-
163157
.new-conversation-separator {
164158
flex-shrink: 0;
165159
padding: 20px 0;

apps/report/rsbuild.config.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,18 +100,13 @@ const copyReportTemplate = () => ({
100100
},
101101
});
102102

103-
let tooManyCases = allTestData;
104-
for (let i = 0; i < 3; i++) {
105-
tooManyCases = tooManyCases.concat(tooManyCases);
106-
}
107-
108103
export default defineConfig({
109104
html: {
110105
template: './template/index.html',
111106
inject: 'body',
112107
tags:
113108
process.env.NODE_ENV === 'development'
114-
? tooManyCases.map((item, index) => ({
109+
? allTestData.map((item, index) => ({
115110
tag: 'script',
116111
attrs: {
117112
type: 'midscene_web_dump',

apps/report/src/components/PlaywrightCaseSelector.less

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,8 @@
167167
cursor: pointer;
168168
transition: background-color 0.2s ease;
169169
line-height: 32px;
170-
white-space: nowrap;
171-
overflow: hidden;
172-
text-overflow: ellipsis;
170+
white-space: normal;
171+
overflow: visible;
173172

174173
&:hover {
175174
background: #f8f9fa;
@@ -195,6 +194,8 @@
195194
flex: 1;
196195
font-size: 14px;
197196
color: #333;
197+
white-space: normal;
198+
word-wrap: break-word;
198199

199200
.cost-str {
200201
color: #999;

apps/report/src/components/PlaywrightCaseSelector.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,15 @@ export function PlaywrightCaseSelector({
4646

4747
useEffect(() => {
4848
const handleClickOutside = (event: MouseEvent) => {
49+
// Check if click is on Select dropdown
50+
const target = event.target as HTMLElement;
51+
const isSelectDropdown = target.closest('.ant-select-dropdown');
52+
4953
if (
5054
isExpanded &&
5155
selectorRef.current &&
52-
!selectorRef.current.contains(event.target as Node)
56+
!selectorRef.current.contains(event.target as Node) &&
57+
!isSelectDropdown
5358
) {
5459
setIsExpanded(false);
5560
}
@@ -180,17 +185,19 @@ export function PlaywrightCaseSelector({
180185
}}
181186
>
182187
{/* Filter Controls */}
183-
<div className="filter-controls">
188+
<div className="filter-controls" onClick={(e) => e.stopPropagation()}>
184189
<div
185190
className={`search-container ${hasSearchText ? 'has-content' : ''}`}
186191
>
187192
<Select
188193
value={statusFilter}
189194
onChange={handleStatusChange}
190-
style={{ width: 80 }}
195+
style={{ width: 120 }}
191196
options={TEST_STATUS_OPTIONS}
192197
size="small"
193198
variant="borderless"
199+
popupMatchSelectWidth={false}
200+
getPopupContainer={() => document.body}
194201
/>
195202
<div className="search-input-container">
196203
<Input

packages/visualizer/src/component/playground/index.less

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,12 @@ body {
326326

327327
.loading-container {
328328
text-align: center;
329+
330+
.loading-progress-text {
331+
margin-top: 8px;
332+
color: #888;
333+
font-size: 12px;
334+
}
329335
}
330336

331337
pre {

0 commit comments

Comments
 (0)