-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: adding test run outputs UX/UI improvements #1896
Conversation
res.Add(output.Name, model.RunOutput{ | ||
Value: output.Value, | ||
Name: output.Name, | ||
SpanID: output.SpanId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding span id as part of the output object
@@ -166,6 +166,7 @@ const RunDetailTest = ({run, testId}: IProps) => { | |||
{!isTestSpecFormOpen && !isTestOutputFormOpen && ( | |||
<S.TabsContainer> | |||
<Tabs | |||
activeKey={query.get('tab') || TABS.SPECS} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allowing update based on the url change
@@ -67,7 +69,7 @@ const SpanDetail = ({onCreateTestSpec = noop, searchText, span}: IProps) => { | |||
value: `attr:${key}`, | |||
}); | |||
|
|||
onNavigateAndOpen(output); | |||
onNavigateAndOpen({...output, spanId: span!.id}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding the spanId
$isDeleted={isDeleted} | ||
data-cy="output-item-container" | ||
$isSelected={isSelected} | ||
onClick={handleOutputClick} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Including click event
} | ||
|
||
const TestOutputMark = ({className, outputs}: IProps) => { | ||
const {onSelectedOutputs} = useTestOutput(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updates the selected outputs on click
const isDraftMode = useAppSelector(selectIsPending); | ||
|
||
useEffect(() => { | ||
dispatch(outputsInitiated(testOutputs)); | ||
|
||
return () => { | ||
dispatch(outputsReseted()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resets the outputs so we don't show them in following tests or other contexts
selectSelectedEnvironmentValues, | ||
selectOutputs, | ||
withOutputsSelector, | ||
(environmentValues, outputs, withOutputs) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Including outputs into the mix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job @xoscar
@@ -48,6 +48,7 @@ const TestOutputForm = ({isEditing = false, isLoading = false, onCancel, onSubmi | |||
onFinish={values => onSubmit(values, spanIdList[0])} | |||
onValuesChange={onValidate} | |||
> | |||
<Form.Item name="spanId" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to send the spanID from the client?
This PR updates the outputs UX/UI to be more interactive as now you can select spans based on outputs and vice-versa.
Changes
Fixes
Checklist
https://www.loom.com/share/cbc55581cbfc45108f4b3b9cd0a1a820