Skip to content

Commit

Permalink
docs(annotations): add a feedback tooltip (#4116)
Browse files Browse the repository at this point in the history
* docs(annotations): add a feedback tooltip

* fix spelling

* add tooltips to spans
  • Loading branch information
mikeldking authored Aug 2, 2024
1 parent 5aa79c4 commit 490ed44
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 6 deletions.
25 changes: 23 additions & 2 deletions app/src/pages/project/SpansTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,15 @@ import {
} from "@tanstack/react-table";
import { css } from "@emotion/react";

import { Flex, Icon, Icons, View } from "@arizeai/components";
import {
Content,
ContextualHelp,
Flex,
Heading,
Icon,
Icons,
View,
} from "@arizeai/components";

import {
AnnotationLabel,
Expand Down Expand Up @@ -185,7 +193,20 @@ export function SpansTable(props: SpansTableProps) {

const annotationColumns: ColumnDef<TableRow>[] = [
{
header: "feedback",
header: () => (
<Flex direction="row" gap="size-50">
<span>feedback</span>
<ContextualHelp>
<Heading level={3} weight="heavy">
Feedback
</Heading>
<Content>
Feedback includes evaluations and human annotations logged via the
API or set via the UI.
</Content>
</ContextualHelp>
</Flex>
),
accessorKey: "spanAnnotations",
enableSorting: false,

Expand Down
29 changes: 25 additions & 4 deletions app/src/pages/project/TracesTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,15 @@ import {
} from "@tanstack/react-table";
import { css } from "@emotion/react";

import { Flex, Icon, Icons, View } from "@arizeai/components";
import {
Content,
ContextualHelp,
Flex,
Heading,
Icon,
Icons,
View,
} from "@arizeai/components";

import {
AnnotationLabel,
Expand Down Expand Up @@ -256,9 +264,22 @@ export function TracesTable(props: TracesTableProps) {
};
});

const annoationColumns: ColumnDef<TableRow>[] = [
const annotationColumns: ColumnDef<TableRow>[] = [
{
header: "feedback",
header: () => (
<Flex direction="row" gap="size-50">
<span>feedback</span>
<ContextualHelp>
<Heading level={3} weight="heavy">
Feedback
</Heading>
<Content>
Feedback includes evaluations and human annotations logged via the
API or set via the UI.
</Content>
</ContextualHelp>
</Flex>
),
accessorKey: "spanAnnotations",
enableSorting: false,
cell: ({ row }) => {
Expand Down Expand Up @@ -408,7 +429,7 @@ export function TracesTable(props: TracesTableProps) {
enableSorting: false,
cell: TextCell,
},
...annoationColumns, // TODO: consider hiding this column is there is no evals. For now show it
...annotationColumns, // TODO: consider hiding this column is there is no evals. For now show it
{
header: "start time",
accessorKey: "startTime",
Expand Down

0 comments on commit 490ed44

Please sign in to comment.