Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/trace-viewer/src/ui/callTab.css
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ a.call-value:hover {

.call-value.datetime,
.call-value.string,
.call-value.literal,
.call-value.locator {
color: var(--vscode-charts-orange);
}
Expand Down
10 changes: 4 additions & 6 deletions packages/trace-viewer/src/ui/callTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ export const CallTab: React.FunctionComponent<{
<div className='call-tab'>
<div className='call-line'>{action.title}</div>
<div className='call-section'>Time</div>
<DateTimeCallLine name='start:' value={startTime} />
<DateTimeCallLine name='duration:' value={renderDuration(action)} />
{renderProperty({ name: 'start', type: 'literal', text: startTime })}
Copy link
Member

@pavelfeldman pavelfeldman Oct 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean to say 'time' or 'ticks'? Not quite sure what literal conveys in this context.

{renderProperty({ name: 'duration', type: 'literal', text: renderDuration(action) })}
{
!!paramKeys.length && <>
<div className='call-section'>Parameters</div>
Expand All @@ -64,11 +64,9 @@ export const CallTab: React.FunctionComponent<{
);
};

const DateTimeCallLine: React.FC<{ name: string, value: string }> = ({ name, value }) => <div className='call-line'>{name}<span className='call-value datetime' title={value}>{value}</span></div>;

type Property = {
name: string;
type: 'string' | 'number' | 'object' | 'locator' | 'handle' | 'bigint' | 'boolean' | 'symbol' | 'undefined' | 'function';
type: 'literal' | 'string' | 'number' | 'object' | 'locator' | 'handle' | 'bigint' | 'boolean' | 'symbol' | 'undefined' | 'function';
text: string;
};

Expand All @@ -88,7 +86,7 @@ function renderProperty(property: Property) {
return (
<div key={property.name} className='call-line'>
{property.name}:<span className={clsx('call-value', property.type)} title={property.text}>{text}</span>
{ ['string', 'number', 'object', 'locator'].includes(property.type) &&
{ ['literal', 'string', 'number', 'object', 'locator'].includes(property.type) &&
<CopyToClipboard value={property.text} />
}
</div>
Expand Down
Loading