mirror of
https://github.com/microsoft/playwright.git
synced 2024-09-11 20:37:54 +03: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 {
|
||||
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]);
|
||||
|
||||
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-label'>Actions</div>
|
||||
</div>
|
||||
@ -72,6 +72,16 @@ export const ActionList: React.FC<ActionListProps> = ({
|
||||
}}
|
||||
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 => {
|
||||
const { metadata } = action;
|
||||
const selectedSuffix = action === selectedAction ? ' selected' : '';
|
||||
|
Loading…
Reference in New Issue
Block a user