Remove "context" naming
This commit is contained in:
parent
0100f87e11
commit
9cb8d55bea
|
|
@ -70,17 +70,17 @@
|
||||||
flex: none;
|
flex: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.action-context {
|
.action-parameter {
|
||||||
display: inline;
|
display: inline;
|
||||||
flex: none;
|
flex: none;
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.action-locator-context {
|
.action-locator-parameter {
|
||||||
color: var(--vscode-charts-orange);
|
color: var(--vscode-charts-orange);
|
||||||
}
|
}
|
||||||
|
|
||||||
.action-generic-context {
|
.action-generic-parameter {
|
||||||
color: var(--vscode-charts-purple);
|
color: var(--vscode-charts-purple);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ import { TreeView } from '@web/components/treeView';
|
||||||
import type { ActionTraceEventInContext, ActionTreeItem } from './modelUtil';
|
import type { ActionTraceEventInContext, ActionTreeItem } from './modelUtil';
|
||||||
import type { Boundaries } from './geometry';
|
import type { Boundaries } from './geometry';
|
||||||
import { ToolbarButton } from '@web/components/toolbarButton';
|
import { ToolbarButton } from '@web/components/toolbarButton';
|
||||||
import { actionContextString } from './string';
|
import { actionParameterDisplayString } from './string';
|
||||||
|
|
||||||
export interface ActionListProps {
|
export interface ActionListProps {
|
||||||
actions: ActionTraceEventInContext[],
|
actions: ActionTraceEventInContext[],
|
||||||
|
|
@ -104,25 +104,25 @@ export const ActionList: React.FC<ActionListProps> = ({
|
||||||
</div>;
|
</div>;
|
||||||
};
|
};
|
||||||
|
|
||||||
const ActionContext: React.FC<{
|
const ActionParameterContext: React.FC<{
|
||||||
action: ActionTraceEvent;
|
action: ActionTraceEvent;
|
||||||
sdkLanguage: Language;
|
sdkLanguage: Language;
|
||||||
}> = ({ action, sdkLanguage }) => {
|
}> = ({ action, sdkLanguage }) => {
|
||||||
const contextString = actionContextString(action, sdkLanguage);
|
const parameterString = actionParameterDisplayString(action, sdkLanguage);
|
||||||
|
|
||||||
if (contextString === undefined)
|
if (parameterString === undefined)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={clsx(
|
className={clsx(
|
||||||
'action-context',
|
'action-parameter',
|
||||||
action.apiName.startsWith('locator')
|
action.apiName.startsWith('locator')
|
||||||
? 'action-locator-context'
|
? 'action-locator-parameter'
|
||||||
: 'action-generic-context',
|
: 'action-generic-parameter',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{contextString}
|
{parameterString}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
@ -151,7 +151,7 @@ export const renderAction = (
|
||||||
return <>
|
return <>
|
||||||
<div className='action-title' title={action.apiName}>
|
<div className='action-title' title={action.apiName}>
|
||||||
<span>{action.apiName}</span>
|
<span>{action.apiName}</span>
|
||||||
<ActionContext action={action} sdkLanguage={sdkLanguage || 'javascript'} />
|
<ActionParameterContext action={action} sdkLanguage={sdkLanguage || 'javascript'} />
|
||||||
{action.method === 'goto' && action.params.url && <div className='action-url' title={action.params.url}>{action.params.url}</div>}
|
{action.method === 'goto' && action.params.url && <div className='action-url' title={action.params.url}>{action.params.url}</div>}
|
||||||
{action.class === 'APIRequestContext' && action.params.url && <div className='action-url' title={action.params.url}>{excludeOrigin(action.params.url)}</div>}
|
{action.class === 'APIRequestContext' && action.params.url && <div className='action-url' title={action.params.url}>{excludeOrigin(action.params.url)}</div>}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ const formatTouchscreenParams = (params: {
|
||||||
return undefined;
|
return undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const actionContextString = (
|
export const actionParameterDisplayString = (
|
||||||
action: ActionTraceEvent,
|
action: ActionTraceEvent,
|
||||||
sdkLanguage: Language,
|
sdkLanguage: Language,
|
||||||
): string | undefined => {
|
): string | undefined => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue