Skip to content

Commit 3fe70d5

Browse files
committed
chore: add status ellipsis
1 parent 697caae commit 3fe70d5

File tree

2 files changed

+36
-25
lines changed

2 files changed

+36
-25
lines changed

packages/trace-viewer/src/ui/statusLine.css

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,41 @@
1+
/**
2+
* Copyright (c) Microsoft Corporation.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116

217
.status-line {
3-
flex: auto;
4-
align-items: center;
18+
display: block;
19+
width: 100%;
520
white-space: nowrap;
6-
line-height: 22px;
7-
display: flex;
8-
flex-direction: row;
9-
height: 30px;
1021
overflow: hidden;
1122
text-overflow: ellipsis;
23+
line-height: 30px;
24+
height: 30px;
1225
padding-left: 5px;
13-
gap: 8px;
14-
}
15-
16-
.status-line > * {
17-
flex-shrink: 0;
26+
cursor: pointer;
1827
}
1928

20-
.status-line > div {
21-
display: flex;
29+
.status-line > span:not(:first-child) {
30+
display: inline-flex;
2231
align-items: center;
2332
gap: 4px;
24-
cursor: pointer;
2533
user-select: none;
34+
margin-left: 8px;
2635
}
2736

2837
.status-line-count {
29-
display: flex;
38+
display: inline-flex;
3039
align-items: center;
3140
gap: 8px;
3241
}

packages/trace-viewer/src/ui/statusLine.tsx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
import '@web/third_party/vscode/codicon.css';
1718
import '@web/common.css';
1819
import './statusLine.css';
1920
import React from 'react';
2021
import { clsx } from '@web/uiUtils';
2122
import { testStatusIcon } from './testUtils';
23+
2224
interface StatusLineProps {
2325
passed: number;
2426
failed: number;
@@ -32,18 +34,18 @@ export const StatusLine: React.FC<StatusLineProps> = ({ passed, failed, skipped,
3234
return (
3335
<div data-testid='status-line' className='status-line' title={`${passed} passed, ${failed} failed, ${skipped} skipped`}>
3436
<span className='status-line-count'>
35-
<span className={clsx('codicon', isRunning ? testStatusIcon('running') : testStatusIcon('none'))} />
37+
<i className={clsx('codicon', isRunning ? testStatusIcon('running') : testStatusIcon('none'))} />
3638
<span data-testid='test-count'>{count}/{total}</span>
3739
</span>
38-
<div className='status-passed'>
39-
<span className={clsx('codicon', testStatusIcon('passed'))} />{passed || 0}
40-
</div>
41-
<div className='status-failed'>
42-
<span className={clsx('codicon', testStatusIcon('failed'))} />{failed || 0}
43-
</div>
44-
<div className='status-skipped'>
45-
<span className={clsx('codicon', testStatusIcon('skipped'))} />{skipped || 0}
46-
</div>
40+
<span className='status-passed'>
41+
<i className={clsx('codicon', testStatusIcon('passed'))} />{passed || 0}
42+
</span>
43+
<span className='status-failed'>
44+
<i className={clsx('codicon', testStatusIcon('failed'))} />{failed || 0}
45+
</span>
46+
<span className='status-skipped'>
47+
<i className={clsx('codicon', testStatusIcon('skipped'))} />{skipped || 0}
48+
</span>
4749
</div>
4850
);
4951
};

0 commit comments

Comments
 (0)