Skip to content

Commit 568a530

Browse files
link batch comment dialog window with button
1 parent 2711d11 commit 568a530

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

apps/opik-frontend/src/components/pages/TracesPage/TracesSpansTab/TracesActionsPanel.tsx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ import ExportToButton from "@/components/shared/ExportToButton/ExportToButton";
1616
import AddTagDialog from "@/components/pages-shared/traces/AddTagDialog/AddTagDialog";
1717

1818
import { PencilLine } from "lucide-react";
19+
import { MessageSquarePlus } from "lucide-react";
1920
import BatchAnnotateDialog from "@/components/pages-shared/traces/BatchAnnotateDialog/BatchAnnotateDialog";
21+
import BatchCommentDialog from "@/components/pages-shared/traces/BatchCommentDialog/BatchCommentDialog";
2022

2123
type TracesActionsPanelProps = {
2224
type: TRACE_DATA_TYPE;
@@ -117,6 +119,15 @@ const TracesActionsPanel: React.FunctionComponent<TracesActionsPanelProps> = ({
117119
projectId={projectId}
118120
onSuccess={onClearSelection}
119121
/>
122+
<BatchCommentDialog
123+
key={`comment-${resetKeyRef.current}`}
124+
rows={rows}
125+
type={type}
126+
projectId={projectId}
127+
open={open === 5}
128+
setOpen={setOpen}
129+
onSuccess={onClearSelection}
130+
/>
120131
<TooltipWrapper content="Add to dataset">
121132
<Button
122133
variant="outline"
@@ -159,6 +170,21 @@ const TracesActionsPanel: React.FunctionComponent<TracesActionsPanelProps> = ({
159170
Annotate
160171
</Button>
161172
</TooltipWrapper>
173+
174+
<TooltipWrapper content="Comment">
175+
<Button
176+
variant="outline"
177+
size="sm"
178+
onClick={() => {
179+
setOpen(5);
180+
resetKeyRef.current = resetKeyRef.current + 1;
181+
}}
182+
disabled={disabled}
183+
>
184+
<MessageSquarePlus className="mr-2 size-4" />
185+
Comment
186+
</Button>
187+
</TooltipWrapper>
162188
<ExportToButton
163189
disabled={disabled || columnsToExport.length === 0}
164190
getData={mapRowData}

0 commit comments

Comments
 (0)