diff --git a/app/.eslintrc.js b/app/.eslintrc.js index 68c0375f57..ec93a7489d 100644 --- a/app/.eslintrc.js +++ b/app/.eslintrc.js @@ -8,7 +8,7 @@ module.exports = { "eslint:recommended", "plugin:react/recommended", "plugin:@typescript-eslint/recommended", - "plugin:storybook/recommended" + "plugin:storybook/recommended", ], overrides: [], parser: "@typescript-eslint/parser", @@ -22,6 +22,7 @@ module.exports = { "simple-import-sort", "@typescript-eslint", "eslint-plugin-react-compiler", + "deprecate", ], rules: { "react/no-unknown-property": ["error", { ignore: ["css"] }], @@ -51,6 +52,14 @@ module.exports = { ], }, ], + "deprecate/import": [ + "error", + { + name: "Button", + module: "@arizeai/components", + use: "@phoenix/components/button", + }, + ], }, settings: { react: { diff --git a/app/global-setup.ts b/app/global-setup.ts index 92a4705391..7b4f779e86 100644 --- a/app/global-setup.ts +++ b/app/global-setup.ts @@ -7,7 +7,7 @@ async function globalSetup(config: FullConfig) { page.goto(`${baseURL}/login`); await page.getByLabel("Email").fill("admin@localhost"); await page.getByLabel("Password").fill("admin"); - await page.getByRole("button", { name: "Login", exact: true }).click(); + await page.getByRole("button", { name: "Log In", exact: true }).click(); // Reset admin password await page.waitForURL("**/reset-password"); @@ -15,12 +15,11 @@ async function globalSetup(config: FullConfig) { await page.getByLabel("New Password").fill("admin123"); await page.getByLabel("Confirm Password").fill("admin123"); await page.getByRole("button", { name: "Reset Password" }).click(); - await page.goto(`${baseURL}/login`); await page.getByLabel("Email").fill("admin@localhost"); await page.getByLabel("Password").fill("admin123"); - await page.getByRole("button", { name: "Login", exact: true }).click(); + await page.getByRole("button", { name: "Log In", exact: true }).click(); await page.waitForURL("**/projects"); await page.goto(`${baseURL}/settings`); await page.waitForURL("**/settings"); @@ -46,7 +45,7 @@ async function globalSetup(config: FullConfig) { page.goto(`${baseURL}/login`); await page.getByLabel("Email").fill("member@localhost.com"); await page.getByLabel("Password").fill("member"); - await page.getByRole("button", { name: "Login", exact: true }).click(); + await page.getByRole("button", { name: "Log In", exact: true }).click(); // Reset member password await page.waitForURL("**/reset-password"); diff --git a/app/package.json b/app/package.json index fa7af4e0d4..078a743fdf 100644 --- a/app/package.json +++ b/app/package.json @@ -92,6 +92,7 @@ "chromatic": "^11.20.0", "cpy-cli": "^5.0.0", "eslint": "^8.57.0", + "eslint-plugin-deprecate": "^0.8.5", "eslint-plugin-react": "^7.34.4", "eslint-plugin-react-compiler": "0.0.0-experimental-42acc6a-20241001", "eslint-plugin-react-hooks": "^4.6.2", diff --git a/app/pnpm-lock.yaml b/app/pnpm-lock.yaml index 47e5b6f2bf..5d5556058e 100644 --- a/app/pnpm-lock.yaml +++ b/app/pnpm-lock.yaml @@ -264,6 +264,9 @@ importers: eslint: specifier: ^8.57.0 version: 8.57.0 + eslint-plugin-deprecate: + specifier: ^0.8.5 + version: 0.8.5(eslint@8.57.0) eslint-plugin-react: specifier: ^7.34.4 version: 7.34.4(eslint@8.57.0) @@ -3055,6 +3058,11 @@ packages: peerDependencies: eslint: '>=7.0.0' + eslint-plugin-deprecate@0.8.5: + resolution: {integrity: sha512-nBH14smi2O1qsQY/deVf1xg1XPMB5ADPPcXWpUDp5ptGrWuNGD7Ghe0mIQKmsoFr6VjjDxJZ5tt78hb5GaCScA==} + peerDependencies: + eslint: '>=2.x' + eslint-plugin-react-compiler@0.0.0-experimental-42acc6a-20241001: resolution: {integrity: sha512-pzkTsWowlHK4yKHsK1d9tTKOUtApZzL7wI6jT5iN31d00DhI9JGDD0pkLohQ6Wfkll+2aiqTPGj9esJoGYmRaw==} engines: {node: ^14.17.0 || ^16.0.0 || >= 18.0.0} @@ -8851,6 +8859,10 @@ snapshots: dependencies: eslint: 8.57.0 + eslint-plugin-deprecate@0.8.5(eslint@8.57.0): + dependencies: + eslint: 8.57.0 + eslint-plugin-react-compiler@0.0.0-experimental-42acc6a-20241001(eslint@8.57.0): dependencies: '@babel/core': 7.24.9 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/CopyToClipboardButton.tsx b/app/src/components/CopyToClipboardButton.tsx index c769f56c83..15ee613fdf 100644 --- a/app/src/components/CopyToClipboardButton.tsx +++ b/app/src/components/CopyToClipboardButton.tsx @@ -1,33 +1,35 @@ import React, { useCallback, useState } from "react"; import copy from "copy-to-clipboard"; -import { - Button, - ButtonProps, - Icon, - Icons, - Tooltip, - TooltipTrigger, -} from "@arizeai/components"; +import { Icon, Icons, Tooltip, TooltipTrigger } from "@arizeai/components"; const SHOW_COPIED_TIMEOUT_MS = 2000; +import { Button, ButtonProps } from "@phoenix/components"; + +export type CopyToClipboardButtonProps = Omit< + ButtonProps, + "icon" | "onPress" | "size" +> & { + /** + * The size of the button + * @default S + */ + size?: ButtonProps["size"]; + /** + * The text to copy to the clipboard + */ + text: string; +}; + /** * An Icon button that copies the given text to the clipboard when clicked. */ -export function CopyToClipboardButton({ - text, - size = "compact", - disabled = false, -}: { - text: string; - - size?: ButtonProps["size"]; - disabled?: boolean; -}) { +export function CopyToClipboardButton(props: CopyToClipboardButtonProps) { + const { text, size = "S", ...otherProps } = props; const [isCopied, setIsCopied] = useState(false); - const onClick = useCallback(() => { + const onPress = useCallback(() => { copy(text); setIsCopied(true); setTimeout(() => { @@ -38,15 +40,14 @@ export function CopyToClipboardButton({
diff --git a/app/src/components/auth/DeleteAPIKeyButton.tsx b/app/src/components/auth/DeleteAPIKeyButton.tsx index 346b25c719..3a5d4a066b 100644 --- a/app/src/components/auth/DeleteAPIKeyButton.tsx +++ b/app/src/components/auth/DeleteAPIKeyButton.tsx @@ -1,7 +1,6 @@ import React, { ReactNode, useState } from "react"; import { - Button, Dialog, DialogContainer, Flex, @@ -11,6 +10,8 @@ import { View, } from "@arizeai/components"; +import { Button } from "@phoenix/components"; + export function DeleteAPIKeyButton({ handleDelete, }: { @@ -36,7 +37,7 @@ export function DeleteAPIKeyButton({ 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/index.tsx b/app/src/components/index.tsx index aff57eeed2..640f378814 100644 --- a/app/src/components/index.tsx +++ b/app/src/components/index.tsx @@ -5,4 +5,7 @@ export * from "./LoadingMask"; export * from "./Loading"; export * from "./ViewSummaryAside"; export * from "./CopyToClipboardButton"; + +// design system based components export * from "./combobox"; +export * from "./button"; 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/PointCloud.tsx b/app/src/components/pointcloud/PointCloud.tsx index a58e49cde8..9586776a87 100644 --- a/app/src/components/pointcloud/PointCloud.tsx +++ b/app/src/components/pointcloud/PointCloud.tsx @@ -5,11 +5,11 @@ import { ThemeContext as EmotionThemeContext } from "@emotion/react"; import { ActionTooltip, - Button, Heading, Icon, InfoOutline, TooltipTrigger, + TriggerWrap, } from "@arizeai/components"; import { Axes, @@ -21,6 +21,7 @@ import { ThreeDimensionalControls, } from "@arizeai/point-cloud"; +import { Button } from "@phoenix/components"; import { UNKNOWN_COLOR } from "@phoenix/constants/pointCloudConstants"; import { InferencesContext, @@ -184,12 +185,13 @@ function CanvasTools() { function CanvasInfo() { return ( - diff --git a/app/src/components/table/CellWithControlsWrapper.tsx b/app/src/components/table/CellWithControlsWrapper.tsx index 0d5fa72309..2bfe78920c 100644 --- a/app/src/components/table/CellWithControlsWrapper.tsx +++ b/app/src/components/table/CellWithControlsWrapper.tsx @@ -14,7 +14,7 @@ const cellWithControlsWrapCSS = css` opacity: 1; display: flex; // make them stand out - .ac-button { + button { border-color: var(--ac-global-color-primary); } } diff --git a/app/src/components/table/Table.tsx b/app/src/components/table/Table.tsx index ff33afa07e..3ee6e12f15 100644 --- a/app/src/components/table/Table.tsx +++ b/app/src/components/table/Table.tsx @@ -8,7 +8,9 @@ import { useReactTable, } from "@tanstack/react-table"; -import { Button, Icon, Icons } from "@arizeai/components"; +import { Icon, Icons } from "@arizeai/components"; + +import { Button } from "@phoenix/components"; import { paginationCSS, tableCSS } from "./styles"; import { TableEmpty } from "./TableEmpty"; @@ -75,25 +77,24 @@ export function Table({ {body} - {/* + {/* TODO(mikeldking): style tables This is just a very basic UI implementation */}
+ New Annotation + diff --git a/app/src/components/trace/TraceTree.tsx b/app/src/components/trace/TraceTree.tsx index 7682876d65..a432b00d86 100644 --- a/app/src/components/trace/TraceTree.tsx +++ b/app/src/components/trace/TraceTree.tsx @@ -7,16 +7,17 @@ import React, { import { css } from "@emotion/react"; import { - Button, classNames, Flex, Icon, Icons, Tooltip, TooltipTrigger, + TriggerWrap, View, } from "@arizeai/components"; +import { Button } from "@phoenix/components"; import { TokenCount } from "@phoenix/components/trace/TokenCount"; import { usePreferencesContext } from "@phoenix/contexts/PreferencesContext"; @@ -89,25 +90,27 @@ function TraceTreeToolbar() { -
diff --git a/app/src/pages/auth/LoginForm.tsx b/app/src/pages/auth/LoginForm.tsx index a120fe74f3..a2fa61fd8a 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/auth/OAuth2Login.tsx b/app/src/pages/auth/OAuth2Login.tsx index ab711c252e..f59216b6e4 100644 --- a/app/src/pages/auth/OAuth2Login.tsx +++ b/app/src/pages/auth/OAuth2Login.tsx @@ -1,8 +1,7 @@ import React, { ReactNode } from "react"; import { css } from "@emotion/react"; -import { Button } from "@arizeai/components"; - +import { Button } from "@phoenix/components"; import { prependBasename } from "@phoenix/utils/routingUtils"; type OAuth2LoginProps = { diff --git a/app/src/pages/auth/ResetPasswordForm.tsx b/app/src/pages/auth/ResetPasswordForm.tsx index be4bafe127..870d3c2da4 100644 --- a/app/src/pages/auth/ResetPasswordForm.tsx +++ b/app/src/pages/auth/ResetPasswordForm.tsx @@ -4,8 +4,9 @@ import { graphql, useMutation } from "react-relay"; import { useNavigate } from "react-router"; import { css } from "@emotion/react"; -import { Button, Form, TextField, View } from "@arizeai/components"; +import { Form, TextField, View } from "@arizeai/components"; +import { Button } from "@phoenix/components"; import { useNotifyError } from "@phoenix/contexts"; import { createRedirectUrlWithReturn } from "@phoenix/utils/routingUtils"; @@ -162,14 +163,13 @@ export function ResetPasswordForm() { `} > - diff --git a/app/src/pages/auth/ResetPasswordWithTokenForm.tsx b/app/src/pages/auth/ResetPasswordWithTokenForm.tsx index 8ae00b82d2..1f825863c7 100644 --- a/app/src/pages/auth/ResetPasswordWithTokenForm.tsx +++ b/app/src/pages/auth/ResetPasswordWithTokenForm.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, TextField, View } from "@arizeai/components"; +import { Button } from "@phoenix/components"; import { prependBasename } from "@phoenix/utils/routingUtils"; const MIN_PASSWORD_LENGTH = 4; @@ -145,7 +146,7 @@ export function ResetPasswordWithTokenForm({ 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/DatasetCodeDropdown.tsx b/app/src/pages/dataset/DatasetCodeDropdown.tsx index cd338421c6..740c980e53 100644 --- a/app/src/pages/dataset/DatasetCodeDropdown.tsx +++ b/app/src/pages/dataset/DatasetCodeDropdown.tsx @@ -72,7 +72,7 @@ export function DatasetCodeDropdown() { width="100%" > - + @@ -105,7 +105,7 @@ export function DatasetCodeDropdown() {
- +
diff --git a/app/src/pages/dataset/DatasetHistoryButton.tsx b/app/src/pages/dataset/DatasetHistoryButton.tsx index 116cd3cea9..ea9141e994 100644 --- a/app/src/pages/dataset/DatasetHistoryButton.tsx +++ b/app/src/pages/dataset/DatasetHistoryButton.tsx @@ -1,7 +1,6 @@ import React, { ReactNode, Suspense, useState } from "react"; import { - Button, DialogContainer, Icon, Icons, @@ -9,6 +8,8 @@ import { TooltipTrigger, } from "@arizeai/components"; +import { Button } from "@phoenix/components"; + import { DatasetHistoryDialog } from "./DatasetHistoryDialog"; export function DatasetHistoryButton(props: { datasetId: string }) { @@ -18,10 +19,9 @@ export function DatasetHistoryButton(props: { datasetId: string }) { <> 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/datasets/DeleteDatasetDialog.tsx b/app/src/pages/datasets/DeleteDatasetDialog.tsx index b009e0eee1..36ffd7e7fb 100644 --- a/app/src/pages/datasets/DeleteDatasetDialog.tsx +++ b/app/src/pages/datasets/DeleteDatasetDialog.tsx @@ -2,7 +2,9 @@ import React, { startTransition, useCallback } from "react"; import { useMutation } from "react-relay"; import { graphql } from "relay-runtime"; -import { Button, Dialog, Flex, Text, View } from "@arizeai/components"; +import { Dialog, Flex, Icon, Icons, Text, View } from "@arizeai/components"; + +import { Button } from "@phoenix/components"; import { DeleteDatasetDialogMutation } from "./__generated__/DeleteDatasetDialogMutation.graphql"; @@ -58,11 +60,21 @@ export function DeleteDatasetDialog({ diff --git a/app/src/pages/embedding/ExportSelectionButton.tsx b/app/src/pages/embedding/ExportSelectionButton.tsx index 7de5243d4c..29827c6441 100644 --- a/app/src/pages/embedding/ExportSelectionButton.tsx +++ b/app/src/pages/embedding/ExportSelectionButton.tsx @@ -9,16 +9,17 @@ import { Accordion, AccordionItem, Alert, - Button, Dialog, DialogContainer, Download, Icon, + Icons, List, ListItem, View, } from "@arizeai/components"; +import { Button } from "@phoenix/components"; import { Loading } from "@phoenix/components"; import { useTheme } from "@phoenix/contexts"; import { usePointCloudContext } from "@phoenix/contexts"; @@ -71,7 +72,7 @@ export function ExportSelectionButton() { ` ); const [exportInfo, setExportInfo] = useState(null); - const onClick = useCallback(() => { + const onPress = useCallback(() => { commit({ variables: { eventIds: [...selectedEventIds], @@ -85,12 +86,15 @@ export function ExportSelectionButton() { return ( <> @@ -108,8 +112,8 @@ export function ExportSelectionButton() { extra={ 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 ? ( diff --git a/app/src/pages/experiments/ExperimentSelectionToolbar.tsx b/app/src/pages/experiments/ExperimentSelectionToolbar.tsx index ec42a40ce8..6d9883d952 100644 --- a/app/src/pages/experiments/ExperimentSelectionToolbar.tsx +++ b/app/src/pages/experiments/ExperimentSelectionToolbar.tsx @@ -4,7 +4,6 @@ import { useNavigate } from "react-router"; import { css } from "@emotion/react"; import { - Button, Dialog, DialogContainer, Flex, @@ -14,6 +13,7 @@ import { View, } from "@arizeai/components"; +import { Button } from "@phoenix/components"; import { useNotifyError, useNotifySuccess } from "@phoenix/contexts"; interface SelectedExperiment { @@ -84,7 +84,7 @@ export function ExperimentSelectionToolbar( selectedExperiments, ]); - const onClickDelete = useCallback(() => { + const onPressDelete = useCallback(() => { setDialog( @@ -102,7 +102,7 @@ export function ExperimentSelectionToolbar( - + 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} - )} - + {experimentIds.length > 0 && ( + + )} diff --git a/app/src/pages/playground/PlaygroundOutputMoveButton.tsx b/app/src/pages/playground/PlaygroundOutputMoveButton.tsx index 4aa41f0cf0..3a70ffe28f 100644 --- a/app/src/pages/playground/PlaygroundOutputMoveButton.tsx +++ b/app/src/pages/playground/PlaygroundOutputMoveButton.tsx @@ -1,13 +1,8 @@ import React from "react"; -import { - Button, - Icon, - Icons, - Tooltip, - TooltipTrigger, -} from "@arizeai/components"; +import { Icon, Icons, Tooltip, TooltipTrigger } from "@arizeai/components"; +import { Button } from "@phoenix/components"; import { usePlaygroundContext } from "@phoenix/contexts/PlaygroundContext"; import { ChatMessage, @@ -36,12 +31,10 @@ export const PlaygroundOutputMoveButton = ({ return ( diff --git a/app/src/pages/playground/PlaygroundTemplate.tsx b/app/src/pages/playground/PlaygroundTemplate.tsx index d07043664a..8b3bbb0595 100644 --- a/app/src/pages/playground/PlaygroundTemplate.tsx +++ b/app/src/pages/playground/PlaygroundTemplate.tsx @@ -1,7 +1,6 @@ import React, { Suspense } from "react"; import { - Button, Card, Content, Flex, @@ -12,7 +11,7 @@ import { TriggerWrap, } from "@arizeai/components"; -import { Loading } from "@phoenix/components"; +import { Button, Loading } from "@phoenix/components"; import { AlphabeticIndexIcon } from "@phoenix/components/AlphabeticIndexIcon"; import { usePlaygroundContext } from "@phoenix/contexts/PlaygroundContext"; @@ -80,10 +79,9 @@ function DeleteButton(props: PlaygroundInstanceProps) { } diff --git a/app/src/pages/project/ProjectTableEmpty.tsx b/app/src/pages/project/ProjectTableEmpty.tsx index f02ea2a8d3..2cc57e9701 100644 --- a/app/src/pages/project/ProjectTableEmpty.tsx +++ b/app/src/pages/project/ProjectTableEmpty.tsx @@ -2,7 +2,6 @@ import React, { ReactNode, useState } from "react"; import { css } from "@emotion/react"; import { - Button, Dialog, DialogContainer, Flex, @@ -11,6 +10,7 @@ import { View, } from "@arizeai/components"; +import { Button } from "@phoenix/components"; import { CodeLanguage, CodeLanguageRadioGroup } from "@phoenix/components/code"; import { PythonProjectGuide } from "@phoenix/components/project/PythonProjectGuide"; import { TypeScriptProjectGuide } from "@phoenix/components/project/TypeScriptProjectGuide"; @@ -35,7 +35,7 @@ function SetupProjectDialog({ projectName }: { projectName: string }) { export function ProjectTableEmpty({ projectName }: { projectName: string }) { const [dialog, setDialog] = useState(null); - const onGettingStartedClick = () => { + const onGettingStartedPress = () => { setDialog(); }; return ( @@ -53,7 +53,7 @@ export function ProjectTableEmpty({ projectName }: { projectName: string }) { diff --git a/app/src/pages/project/SessionsTableEmpty.tsx b/app/src/pages/project/SessionsTableEmpty.tsx index a6162ff1d2..263f1ff188 100644 --- a/app/src/pages/project/SessionsTableEmpty.tsx +++ b/app/src/pages/project/SessionsTableEmpty.tsx @@ -2,7 +2,6 @@ import React, { ReactNode, useState } from "react"; import { css } from "@emotion/react"; import { - Button, Dialog, DialogContainer, Flex, @@ -11,6 +10,7 @@ import { View, } from "@arizeai/components"; +import { Button } from "@phoenix/components"; import { CodeLanguage, CodeLanguageRadioGroup } from "@phoenix/components/code"; import { PythonSessionsGuide } from "./PythonSessionsGuide"; @@ -36,7 +36,7 @@ function SetupSessionsDialog() { export function SessionsTableEmpty() { const [dialog, setDialog] = useState(null); - const onGettingStartedClick = () => { + const onGettingStartedPress = () => { setDialog(); }; @@ -53,9 +53,8 @@ export function SessionsTableEmpty() { No sessions found for this project diff --git a/app/src/pages/project/SpanFilterConditionField.tsx b/app/src/pages/project/SpanFilterConditionField.tsx index ebf39711ab..da866e9916 100644 --- a/app/src/pages/project/SpanFilterConditionField.tsx +++ b/app/src/pages/project/SpanFilterConditionField.tsx @@ -18,7 +18,6 @@ import { css } from "@emotion/react"; import { AddonBefore, - Button, Field, Flex, Form, @@ -32,6 +31,7 @@ import { View, } from "@arizeai/components"; +import { Button } from "@phoenix/components"; import { useTheme } from "@phoenix/contexts"; import environment from "@phoenix/RelayEnvironment"; @@ -477,9 +477,9 @@ function FilterConditionSnippet(props: { /> - + { diff --git a/app/src/pages/projects/NewProjectButton.tsx b/app/src/pages/projects/NewProjectButton.tsx index 0253eac06b..0b688a4556 100644 --- a/app/src/pages/projects/NewProjectButton.tsx +++ b/app/src/pages/projects/NewProjectButton.tsx @@ -1,7 +1,6 @@ import React, { ReactNode, useState } from "react"; import { - Button, Dialog, DialogContainer, Icon, @@ -10,6 +9,7 @@ import { View, } from "@arizeai/components"; +import { Button } from "@phoenix/components"; import { ExternalLink } from "@phoenix/components"; import { CodeLanguage, CodeLanguageRadioGroup } from "@phoenix/components/code"; import { TypeScriptProjectGuide } from "@phoenix/components/project/TypeScriptProjectGuide"; @@ -24,9 +24,8 @@ export function NewProjectButton() { return (
diff --git a/app/src/pages/settings/DeleteUserDialog.tsx b/app/src/pages/settings/DeleteUserDialog.tsx index 5329cda4d6..dfcaf1cb83 100644 --- a/app/src/pages/settings/DeleteUserDialog.tsx +++ b/app/src/pages/settings/DeleteUserDialog.tsx @@ -1,8 +1,9 @@ import React, { useCallback } from "react"; import { graphql, useMutation } from "react-relay"; -import { Button, Dialog, Flex, Text, View } from "@arizeai/components"; +import { Dialog, Flex, Text, View } from "@arizeai/components"; +import { Button } from "@phoenix/components"; import { useNotifyError, useNotifySuccess } from "@phoenix/contexts"; export function DeleteUserDialog({ @@ -61,15 +62,15 @@ export function DeleteUserDialog({ borderTopWidth="thin" > - diff --git a/app/src/pages/settings/ResetPasswordDialog.tsx b/app/src/pages/settings/ResetPasswordDialog.tsx index 6f2d893da6..7948a6b7a3 100644 --- a/app/src/pages/settings/ResetPasswordDialog.tsx +++ b/app/src/pages/settings/ResetPasswordDialog.tsx @@ -2,15 +2,9 @@ import React, { useCallback } from "react"; import { Controller, useForm } from "react-hook-form"; import { graphql, useMutation } from "react-relay"; -import { - Button, - Dialog, - Flex, - Form, - TextField, - View, -} from "@arizeai/components"; +import { Dialog, Flex, Form, TextField, View } from "@arizeai/components"; +import { Button } from "@phoenix/components"; import { useNotifyError, useNotifySuccess } from "@phoenix/contexts"; import { ResetPasswordDialogMutation } from "./__generated__/ResetPasswordDialogMutation.graphql"; @@ -144,8 +138,8 @@ export function ResetPasswordDialog({ diff --git a/app/src/pages/settings/SettingsPage.tsx b/app/src/pages/settings/SettingsPage.tsx index 0d36194c3b..7903436cc8 100644 --- a/app/src/pages/settings/SettingsPage.tsx +++ b/app/src/pages/settings/SettingsPage.tsx @@ -87,7 +87,7 @@ export function SettingsPage() { function CopyToClipboardButtonWithPadding(props: { text: string }) { return ( - + ); } diff --git a/app/src/pages/settings/UserRoleChangeDialog.tsx b/app/src/pages/settings/UserRoleChangeDialog.tsx index b91fec219d..ba475fb4ba 100644 --- a/app/src/pages/settings/UserRoleChangeDialog.tsx +++ b/app/src/pages/settings/UserRoleChangeDialog.tsx @@ -1,8 +1,9 @@ import React, { useCallback } from "react"; import { graphql, useMutation } from "react-relay"; -import { Button, Dialog, Flex, Text, View } from "@arizeai/components"; +import { Dialog, Flex, Text, View } from "@arizeai/components"; +import { Button } from "@phoenix/components"; import { normalizeUserRole } from "@phoenix/constants"; import { useNotifyError, useNotifySuccess } from "@phoenix/contexts"; @@ -88,15 +89,16 @@ export function UserRoleChangeDialog({ borderTopWidth="thin" > - diff --git a/app/src/pages/settings/UsersCard.tsx b/app/src/pages/settings/UsersCard.tsx index 8c80baa0bd..362ad23381 100644 --- a/app/src/pages/settings/UsersCard.tsx +++ b/app/src/pages/settings/UsersCard.tsx @@ -1,15 +1,9 @@ import React, { ReactNode, Suspense, useState } from "react"; import { graphql, useLazyLoadQuery } from "react-relay"; -import { - Button, - Card, - DialogContainer, - Icon, - Icons, - View, -} from "@arizeai/components"; +import { Card, DialogContainer, Icon, Icons, View } from "@arizeai/components"; +import { Button } from "@phoenix/components"; import { Loading } from "@phoenix/components"; import { useNotifyError, useNotifySuccess } from "@phoenix/contexts"; @@ -44,7 +38,7 @@ export function UsersCard() { bodyStyle={{ padding: 0, overflowX: "auto" }} extra={ diff --git a/app/src/pages/trace/SpanImage.tsx b/app/src/pages/trace/SpanImage.tsx index 7b51837765..94ac518185 100644 --- a/app/src/pages/trace/SpanImage.tsx +++ b/app/src/pages/trace/SpanImage.tsx @@ -1,7 +1,9 @@ import React, { ReactNode, useState } from "react"; import { css } from "@emotion/react"; -import { Button, classNames, Icon, Icons } from "@arizeai/components"; +import { classNames, Icon, Icons } from "@arizeai/components"; + +import { Button } from "@phoenix/components"; type SpanImageProps = { /** @@ -77,8 +79,8 @@ export function SpanImage(props: SpanImageProps) { {!isRedacted && ( diff --git a/app/tests/admin-access.ts b/app/tests/admin-access.ts index 8319d731b4..4c2cec600b 100644 --- a/app/tests/admin-access.ts +++ b/app/tests/admin-access.ts @@ -6,7 +6,7 @@ test.beforeEach(async ({ page }) => { await page.getByLabel("Email").fill("admin@localhost"); await page.getByLabel("Password").fill("admin123"); - await page.getByRole("button", { name: "Login", exact: true }).click(); + await page.getByRole("button", { name: "Log In", exact: true }).click(); await page.waitForURL("**/projects"); }); diff --git a/app/tests/login.rate-limit.spec.ts b/app/tests/login.rate-limit.spec.ts index ab7f82e0a2..ba1c4ed61d 100644 --- a/app/tests/login.rate-limit.spec.ts +++ b/app/tests/login.rate-limit.spec.ts @@ -13,7 +13,7 @@ test("that login gets rate limited after too many attempts", async ({ const numberOfAttempts = 10; for (let i = 0; i < numberOfAttempts; i++) { - await page.getByRole("button", { name: "Login", exact: true }).click(); + await page.getByRole("button", { name: "Log In", exact: true }).click(); } await expect( page.getByText("Too many requests. Please try again later.") diff --git a/app/tests/member-access.spec.ts b/app/tests/member-access.spec.ts index e3ab8e6392..25bdf92c24 100644 --- a/app/tests/member-access.spec.ts +++ b/app/tests/member-access.spec.ts @@ -5,7 +5,7 @@ test.beforeEach(async ({ page }) => { page.goto(`/login`); await page.getByLabel("Email").fill("member@localhost.com"); await page.getByLabel("Password").fill("member123"); - await page.getByRole("button", { name: "Login", exact: true }).click(); + await page.getByRole("button", { name: "Log In", exact: true }).click(); await page.waitForURL("**/projects"); }); diff --git a/app/tests/user-management.spec.ts b/app/tests/user-management.spec.ts index 041a5cc776..df1f6423bb 100644 --- a/app/tests/user-management.spec.ts +++ b/app/tests/user-management.spec.ts @@ -6,7 +6,7 @@ test.beforeEach(async ({ page }) => { await page.getByLabel("Email").fill("admin@localhost"); await page.getByLabel("Password").fill("admin123"); - await page.getByRole("button", { name: "Login", exact: true }).click(); + await page.getByRole("button", { name: "Log In", exact: true }).click(); await page.waitForURL("**/projects"); }); diff --git a/cspell.json b/cspell.json index f880d8fb7d..965cfa180f 100644 --- a/cspell.json +++ b/cspell.json @@ -33,6 +33,7 @@ "LLAMATRACE", "LOOKBACK", "mistralai", + "multimodal", "ndcg", "NDJSON", "numpy",