Skip to content

Commit

Permalink
cleanup the components
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeldking committed Oct 1, 2024
1 parent 917f712 commit cb3b6ff
Show file tree
Hide file tree
Showing 10 changed files with 69 additions and 61 deletions.
4 changes: 2 additions & 2 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "None",
"private": true,
"dependencies": {
"@arizeai/components": "^1.8.1",
"@arizeai/components": "^1.8.3",
"@arizeai/openinference-semantic-conventions": "^0.10.0",
"@arizeai/point-cloud": "^3.0.6",
"@codemirror/autocomplete": "6.12.0",
Expand Down Expand Up @@ -58,7 +58,7 @@
"@types/jest": "^29.5.12",
"@types/lodash": "^4.17.7",
"@types/node": "^22.5.4",
"@types/react": "18.2.48",
"@types/react": "^18.3.10",
"@types/react-dom": "^18.3.0",
"@types/react-relay": "^16.0.6",
"@types/recharts": "^1.8.29",
Expand Down
70 changes: 32 additions & 38 deletions app/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/src/components/auth/OneTimeAPIKeyDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function OneTimeAPIKeyDialog(props: { jwt: string }) {
<View padding="size-200">
<Flex direction="row" gap="size-100" alignItems="end">
<TextField label="API Key" isReadOnly value={jwt} minWidth="100%" />
<CopyToClipboardButton text={jwt} size="normal" />
<CopyToClipboardButton text={jwt} size="default" />
</Flex>
</View>
<View padding="size-200" borderTopColor="light" borderTopWidth="thin">
Expand Down
6 changes: 3 additions & 3 deletions app/src/pages/dataset/DatasetCodeDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export function DatasetCodeDropdown() {
width="100%"
>
<TextField label="Dataset ID" isReadOnly value={datasetId} />
<CopyToClipboardButton text={datasetId} size="normal" />
<CopyToClipboardButton text={datasetId} size="default" />
</Flex>
<Flex direction="row" gap="size-100" alignItems="end">
<TextField
Expand All @@ -84,7 +84,7 @@ export function DatasetCodeDropdown() {
<CopyToClipboardButton
text={version?.id || "No Versions"}
disabled={!version}
size="normal"
size="default"
/>
</Flex>
</Form>
Expand All @@ -105,7 +105,7 @@ export function DatasetCodeDropdown() {
<Form>
<Flex direction="row" gap="size-100" alignItems="end">
<TextField label="URL" isReadOnly value={datasetURL} />
<CopyToClipboardButton text={datasetURL} size="normal" />
<CopyToClipboardButton text={datasetURL} size="default" />
</Flex>
</Form>
</View>
Expand Down
2 changes: 1 addition & 1 deletion app/src/pages/playground/MessageRolePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function MessageRolePicker({
label="Role"
data-testid="inferences-time-range"
aria-label={`Time range for the primary inferences`}
addonBefore={"role"}
size="compact"
onSelectionChange={() => {}}
>
<Item key="system">System</Item>
Expand Down
1 change: 0 additions & 1 deletion app/src/pages/playground/PlaygroundChatTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export function PlaygroundChatTemplate(props: PlaygroundChatTemplateProps) {
return (
<li key={index}>
<Card
// @ts-expect-error allow the rendering of elements as titles
title={
<MessageRolePicker includeLabel={false} role={message.role} />
}
Expand Down
36 changes: 27 additions & 9 deletions app/src/pages/playground/PlaygroundTemplate.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
import React from "react";

import { Button, Card, Flex, Icon, Icons, View } from "@arizeai/components";
import {
Button,
Card,
Content,
Flex,
Icon,
Icons,
Tooltip,
TooltipTrigger,
TriggerWrap,
View,
} from "@arizeai/components";

import { usePlaygroundContext } from "@phoenix/contexts/PlaygroundContext";

Expand Down Expand Up @@ -83,13 +94,20 @@ function CompareButton() {
function DeleteButton(props: PlaygroundInstanceProps) {
const deleteInstance = usePlaygroundContext((state) => state.deleteInstance);
return (
<Button
variant="default"
size="compact"
icon={<Icon svg={<Icons.TrashOutline />} />}
onClick={() => {
deleteInstance(props.playgroundInstanceId);
}}
/>
<TooltipTrigger>
<TriggerWrap>
<Button
variant="default"
size="compact"
icon={<Icon svg={<Icons.TrashOutline />} />}
onClick={() => {
deleteInstance(props.playgroundInstanceId);
}}
/>
</TriggerWrap>
<Tooltip>
<Content>Delete this instance of the playground</Content>
</Tooltip>
</TooltipTrigger>
);
}
2 changes: 1 addition & 1 deletion app/src/pages/settings/SettingsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function SettingsPage() {
function CopyToClipboardButtonWithPadding(props: { text: string }) {
return (
<View paddingBottom="19px">
<CopyToClipboardButton text={props.text} size="normal" />
<CopyToClipboardButton text={props.text} size="default" />
</View>
);
}
4 changes: 2 additions & 2 deletions app/src/pages/trace/SpanCodeDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ export function SpanCodeDropdown(props: SpanCodeDropdownProps) {
<Form>
<Flex direction="row" gap="size-100" alignItems="end">
<TextField label="Span ID" isReadOnly value={spanId} />
<CopyToClipboardButton text={spanId} size="normal" />
<CopyToClipboardButton text={spanId} size="default" />
</Flex>
<Flex direction="row" gap="size-100" alignItems="end">
<TextField label="Trace ID" isReadOnly value={traceId} />
<CopyToClipboardButton text={traceId} size="normal" />
<CopyToClipboardButton text={traceId} size="default" />
</Flex>
</Form>
</View>
Expand Down
3 changes: 0 additions & 3 deletions app/src/pages/trace/SpanDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,6 @@ function LLMSpanInfo(props: { span: Span; spanAttributes: AttributeObject }) {
}}
titleSeparator={false}
variant="compact"
// @ts-expect-error force putting the title in as a string
title={modelNameTitleEl}
>
<Tabs>
Expand Down Expand Up @@ -1158,7 +1157,6 @@ function DocumentItem({
bodyStyle={{
padding: 0,
}}
// @ts-expect-error force putting the title in as a string
title={
<Flex direction="row" gap="size-50" alignItems="center">
<Icon svg={<Icons.FileOutline />} />
Expand Down Expand Up @@ -1404,7 +1402,6 @@ function LLMToolSchema({

return (
<Card
// @ts-expect-error force putting the title in as a string
title={titleEl}
titleExtra={<Counter variant="light">#{index + 1}</Counter>}
{...defaultCardProps}
Expand Down

0 comments on commit cb3b6ff

Please sign in to comment.