From 0b1fe169449dc1b385f063ff7693f7e51c2537a4 Mon Sep 17 00:00:00 2001 From: Mikyo King Date: Mon, 23 Dec 2024 16:19:39 -0700 Subject: [PATCH] finish migration --- app/src/components/ConfirmNavigation.tsx | 23 +++++---------- .../components/dataset/NewDatasetButton.tsx | 2 +- .../CanvasDisplaySettingsDropdown.tsx | 7 +++-- .../pointcloud/ClusteringSettings.tsx | 9 ++---- .../PointCloudParameterSettings.tsx | 2 +- app/src/components/settings/UserForm.tsx | 7 +++-- .../trace/EditSpanAnnotationsDialog.tsx | 19 ++++++------ .../trace/SpanAnnotationActionMenu.tsx | 13 +++------ .../components/trace/SpanAnnotationForm.tsx | 14 +++------ app/src/pages/auth/ForgotPasswordForm.tsx | 7 +++-- app/src/pages/auth/LoginForm.tsx | 12 +++++--- .../pages/dataset/AddDatasetExampleButton.tsx | 9 +++--- .../pages/dataset/AddDatasetExampleDialog.tsx | 14 +++++---- app/src/pages/dataset/DatasetPage.tsx | 6 ++-- app/src/pages/dataset/RunExperimentButton.tsx | 7 ++--- app/src/pages/datasets/DatasetFromCSVForm.tsx | 6 ++-- .../pages/example/ExampleDetailsDialog.tsx | 8 ++--- .../example/ExampleExperimentRunsTable.tsx | 15 ++++------ .../examples/ExampleSelectionToolbar.tsx | 23 ++++++++++----- app/src/pages/playground/Playground.tsx | 29 +++++++------------ .../playground/PlaygroundChatTemplate.tsx | 8 ++--- .../PlaygroundChatTemplateFooter.tsx | 20 ++++++------- 22 files changed, 117 insertions(+), 143 deletions(-) diff --git a/app/src/components/ConfirmNavigation.tsx b/app/src/components/ConfirmNavigation.tsx index 73e7a85405..1cdfaff679 100644 --- a/app/src/components/ConfirmNavigation.tsx +++ b/app/src/components/ConfirmNavigation.tsx @@ -1,30 +1,21 @@ import React, { ReactNode } from "react"; import { Blocker } from "react-router"; -import { - Button, - Dialog, - DialogContainer, - Flex, - Text, - View, -} from "@arizeai/components"; +import { Dialog, DialogContainer, Flex, Text, View } from "@arizeai/components"; + +import { Button } from "@phoenix/components"; function ConfirmNavigationDialogFooter({ blocker }: { blocker: Blocker }) { return ( - diff --git a/app/src/components/dataset/NewDatasetButton.tsx b/app/src/components/dataset/NewDatasetButton.tsx index 813f00ce13..2442c736d3 100644 --- a/app/src/components/dataset/NewDatasetButton.tsx +++ b/app/src/components/dataset/NewDatasetButton.tsx @@ -2,7 +2,6 @@ import React, { useState } from "react"; import { Alert, - Button, Card, Icon, Icons, @@ -10,6 +9,7 @@ import { View, } from "@arizeai/components"; +import { Button } from "@phoenix/components"; import { useNotifySuccess } from "@phoenix/contexts"; import { CreateDatasetForm } from "./CreateDatasetForm"; diff --git a/app/src/components/pointcloud/CanvasDisplaySettingsDropdown.tsx b/app/src/components/pointcloud/CanvasDisplaySettingsDropdown.tsx index 625565d112..1724565320 100644 --- a/app/src/components/pointcloud/CanvasDisplaySettingsDropdown.tsx +++ b/app/src/components/pointcloud/CanvasDisplaySettingsDropdown.tsx @@ -1,7 +1,8 @@ import React from "react"; +// eslint-disable-next-line deprecate/import import { - Button, + Button as LegacyButton, DropdownMenu, DropdownTrigger, Flex, @@ -20,8 +21,8 @@ export function CanvasDisplaySettingsDropdown() { const pointSizeScale = usePointCloudContext((state) => state.pointSizeScale); return ( - diff --git a/app/src/components/pointcloud/PointCloudParameterSettings.tsx b/app/src/components/pointcloud/PointCloudParameterSettings.tsx index f7413fcdad..d91a057334 100644 --- a/app/src/components/pointcloud/PointCloudParameterSettings.tsx +++ b/app/src/components/pointcloud/PointCloudParameterSettings.tsx @@ -3,7 +3,6 @@ import { Controller, useForm } from "react-hook-form"; import { css } from "@emotion/react"; import { - Button, Content, ContextualHelp, Form, @@ -12,6 +11,7 @@ import { TextField, } from "@arizeai/components"; +import { Button } from "@phoenix/components"; import { MAX_INFERENCES_SAMPLE_SIZE, MAX_MIN_DIST, diff --git a/app/src/components/settings/UserForm.tsx b/app/src/components/settings/UserForm.tsx index 1a72c8a54a..a3020f5399 100644 --- a/app/src/components/settings/UserForm.tsx +++ b/app/src/components/settings/UserForm.tsx @@ -2,8 +2,9 @@ import React from "react"; import { Controller, useForm } from "react-hook-form"; import { css } from "@emotion/react"; -import { Button, Flex, Form, TextField, View } from "@arizeai/components"; +import { Flex, Form, TextField, View } from "@arizeai/components"; +import { Button } from "@phoenix/components"; import { UserRole } from "@phoenix/constants"; import { RolePicker } from "./RolePicker"; @@ -193,8 +194,8 @@ export function UserForm({ diff --git a/app/src/components/trace/EditSpanAnnotationsDialog.tsx b/app/src/components/trace/EditSpanAnnotationsDialog.tsx index b0757bc320..f7472a34f3 100644 --- a/app/src/components/trace/EditSpanAnnotationsDialog.tsx +++ b/app/src/components/trace/EditSpanAnnotationsDialog.tsx @@ -13,9 +13,10 @@ import { } from "react-relay"; import { css } from "@emotion/react"; +// eslint-disable-next-line deprecate/import import { Alert, - Button, + Button as LegacyButton, Card, Dialog, Flex, @@ -29,6 +30,7 @@ import { View, } from "@arizeai/components"; +import { Button } from "@phoenix/components"; import { Empty } from "@phoenix/components/Empty"; import { useNotifySuccess } from "@phoenix/contexts"; import { formatFloat } from "@phoenix/utils/numberFormatUtils"; @@ -129,8 +131,8 @@ function NewAnnotationButton(props: NewAnnotationButtonProps) { setIsPopoverOpen(isOpen); }} > - + New Annotation + diff --git a/app/src/pages/auth/ForgotPasswordForm.tsx b/app/src/pages/auth/ForgotPasswordForm.tsx index b191eb41ad..da9e367d12 100644 --- a/app/src/pages/auth/ForgotPasswordForm.tsx +++ b/app/src/pages/auth/ForgotPasswordForm.tsx @@ -2,8 +2,9 @@ import React, { useCallback, useState } from "react"; import { Controller, useForm } from "react-hook-form"; import { css } from "@emotion/react"; -import { Alert, Button, Form, TextField, View } from "@arizeai/components"; +import { Alert, Form, TextField, View } from "@arizeai/components"; +import { Button } from "@phoenix/components"; import { prependBasename } from "@phoenix/utils/routingUtils"; type ForgotPasswordFormParams = { @@ -80,8 +81,8 @@ export function ForgotPasswordForm({ } `} > - diff --git a/app/src/pages/auth/LoginForm.tsx b/app/src/pages/auth/LoginForm.tsx index a120fe74f3..6c827dc2df 100644 --- a/app/src/pages/auth/LoginForm.tsx +++ b/app/src/pages/auth/LoginForm.tsx @@ -3,8 +3,9 @@ import { Controller, useForm } from "react-hook-form"; import { useNavigate } from "react-router"; import { css } from "@emotion/react"; -import { Alert, Button, Form, TextField, View } from "@arizeai/components"; +import { Alert, Form, Icon, Icons, TextField, View } from "@arizeai/components"; +import { Button } from "@phoenix/components"; import { Link } from "@phoenix/components"; import { prependBasename } from "@phoenix/utils/routingUtils"; import { getReturnUrl } from "@phoenix/utils/routingUtils"; @@ -129,10 +130,13 @@ export function LoginForm(props: LoginFormProps) { > diff --git a/app/src/pages/dataset/AddDatasetExampleButton.tsx b/app/src/pages/dataset/AddDatasetExampleButton.tsx index d872657340..4bf3335786 100644 --- a/app/src/pages/dataset/AddDatasetExampleButton.tsx +++ b/app/src/pages/dataset/AddDatasetExampleButton.tsx @@ -1,6 +1,8 @@ import React, { ReactNode, useCallback, useState } from "react"; -import { Button, DialogContainer, Icon, Icons } from "@arizeai/components"; +import { DialogContainer, Icon, Icons } from "@arizeai/components"; + +import { Button } from "@phoenix/components"; import { AddDatasetExampleDialog } from "./AddDatasetExampleDialog"; @@ -28,9 +30,8 @@ export function AddDatasetExampleButton(props: AddDatasetExampleButtonProps) { <> diff --git a/app/src/pages/dataset/AddDatasetExampleDialog.tsx b/app/src/pages/dataset/AddDatasetExampleDialog.tsx index a2a0f89d71..025e37d260 100644 --- a/app/src/pages/dataset/AddDatasetExampleDialog.tsx +++ b/app/src/pages/dataset/AddDatasetExampleDialog.tsx @@ -5,15 +5,17 @@ import { css } from "@emotion/react"; import { Alert, - Button, Card, CardProps, Dialog, Flex, + Icon, + Icons, TextArea, View, } from "@arizeai/components"; +import { Button } from "@phoenix/components"; import { JSONEditor } from "@phoenix/components/code"; import { isJSONObjectString } from "@phoenix/utils/jsonUtils"; @@ -226,12 +228,12 @@ export function AddDatasetExampleDialog(props: AddDatasetExampleDialogProps) { diff --git a/app/src/pages/dataset/DatasetPage.tsx b/app/src/pages/dataset/DatasetPage.tsx index ccb5051919..122aea84bc 100644 --- a/app/src/pages/dataset/DatasetPage.tsx +++ b/app/src/pages/dataset/DatasetPage.tsx @@ -4,7 +4,6 @@ import { css } from "@emotion/react"; import { ActionMenu, - Button, Counter, Flex, Icon, @@ -16,7 +15,7 @@ import { View, } from "@arizeai/components"; -import { Loading } from "@phoenix/components"; +import { Button, Loading } from "@phoenix/components"; import { useNotifySuccess } from "@phoenix/contexts"; import { DatasetProvider, @@ -164,9 +163,8 @@ function DatasetPageContent({ diff --git a/app/src/pages/datasets/DatasetFromCSVForm.tsx b/app/src/pages/datasets/DatasetFromCSVForm.tsx index 316e55d6bf..635d9026bf 100644 --- a/app/src/pages/datasets/DatasetFromCSVForm.tsx +++ b/app/src/pages/datasets/DatasetFromCSVForm.tsx @@ -3,7 +3,6 @@ import { Controller, useForm } from "react-hook-form"; import { css } from "@emotion/react"; import { - Button, Dropdown, DropdownProps, Field, @@ -17,6 +16,8 @@ import { View, } from "@arizeai/components"; +import { Button } from "@phoenix/components"; + type CreateDatasetFromCSVParams = { file: FileList; input_keys: string[]; @@ -263,8 +264,7 @@ export function DatasetFromCSVForm(props: CreateDatasetFromCSVFormProps) { type="submit" isDisabled={!isValid} variant={isDirty ? "primary" : "default"} - size="compact" - loading={false} + size="S" > Create Dataset diff --git a/app/src/pages/example/ExampleDetailsDialog.tsx b/app/src/pages/example/ExampleDetailsDialog.tsx index 0e14919875..cf257c6af8 100644 --- a/app/src/pages/example/ExampleDetailsDialog.tsx +++ b/app/src/pages/example/ExampleDetailsDialog.tsx @@ -5,7 +5,6 @@ import { useNavigate } from "react-router"; import { css } from "@emotion/react"; import { - Button, Card, CardProps, Dialog, @@ -15,7 +14,7 @@ import { View, } from "@arizeai/components"; -import { CopyToClipboardButton } from "@phoenix/components"; +import { Button, CopyToClipboardButton } from "@phoenix/components"; import { JSONBlock } from "@phoenix/components/code"; import { resizeHandleCSS } from "@phoenix/components/resize"; import { useNotifySuccess } from "@phoenix/contexts"; @@ -94,9 +93,8 @@ export function ExampleDetailsDialog({ {sourceSpanInfo ? ( - + Compare + ); } diff --git a/app/src/pages/playground/PlaygroundChatTemplate.tsx b/app/src/pages/playground/PlaygroundChatTemplate.tsx index 49cee0d59f..0c12bcd573 100644 --- a/app/src/pages/playground/PlaygroundChatTemplate.tsx +++ b/app/src/pages/playground/PlaygroundChatTemplate.tsx @@ -16,7 +16,6 @@ import { CSS } from "@dnd-kit/utilities"; import { css } from "@emotion/react"; import { - Button, Card, Field, Flex, @@ -27,7 +26,7 @@ import { View, } from "@arizeai/components"; -import { CopyToClipboardButton } from "@phoenix/components"; +import { Button, CopyToClipboardButton } from "@phoenix/components"; import { CodeWrap, JSONEditor } from "@phoenix/components/code"; import { DragHandle } from "@phoenix/components/dnd/DragHandle"; import { TemplateEditor } from "@phoenix/components/templateEditor"; @@ -453,9 +452,8 @@ function SortableMessageItem({ ) : null}