mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix(trace-viewer): show warning when opening an empty trace (#9449)
This commit is contained in:
parent
82ff85b106
commit
34e933f474
@ -122,3 +122,15 @@
|
|||||||
.action-entry .codicon-warning {
|
.action-entry .codicon-warning {
|
||||||
color: darkorange;
|
color: darkorange;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.no-actions-entry {
|
||||||
|
height: 400px;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-actions-entry-text {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 1.3rem;
|
||||||
|
}
|
||||||
|
@ -45,7 +45,7 @@ export const ActionList: React.FC<ActionListProps> = ({
|
|||||||
}, [selectedAction, actionListRef]);
|
}, [selectedAction, actionListRef]);
|
||||||
|
|
||||||
return <div className='action-list vbox'>
|
return <div className='action-list vbox'>
|
||||||
<div className='.action-list-title tab-strip'>
|
<div className='action-list-title tab-strip'>
|
||||||
<div className='tab-element'>
|
<div className='tab-element'>
|
||||||
<div className='tab-label'>Actions</div>
|
<div className='tab-label'>Actions</div>
|
||||||
</div>
|
</div>
|
||||||
@ -72,6 +72,16 @@ export const ActionList: React.FC<ActionListProps> = ({
|
|||||||
}}
|
}}
|
||||||
ref={actionListRef}
|
ref={actionListRef}
|
||||||
>
|
>
|
||||||
|
{actions.length === 0 && <div className='no-actions-entry'>
|
||||||
|
<div>
|
||||||
|
<div className='no-actions-entry-text'>
|
||||||
|
No actions recorded
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Make sure that the right context was used when recording the trace.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>}
|
||||||
{actions.map(action => {
|
{actions.map(action => {
|
||||||
const { metadata } = action;
|
const { metadata } = action;
|
||||||
const selectedSuffix = action === selectedAction ? ' selected' : '';
|
const selectedSuffix = action === selectedAction ? ' selected' : '';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user