chore: replace MUI icons - 1 (#17731)

1. Replaced MUI StopOutlined with Lucide SquareIcon in:
    - workspace.tsx
    - WorkspacesPageView.tsx
    - BuildIcon.tsx
    
 2. Replaced MUI PlayArrowOutlined with Lucide PlayIcon in:
    - workspace.tsx
    - WorkspacesPageView.tsx
    - BuildIcon.tsx
    
 3. Replaced MUI DeleteOutlined with Lucide TrashIcon in:
    - WorkspacesPageView.tsx
    - WorkspaceActions.tsx
    - TemplatePageHeader.tsx
    - BuildIcon.tsx
This commit is contained in:
Bruno Quaresma
2025-05-09 11:16:46 -03:00
committed by GitHub
parent 0b8fd7e403
commit 9d7630bf4b
5 changed files with 15 additions and 20 deletions

View File

@ -1,17 +1,15 @@
import DeleteOutlined from "@mui/icons-material/DeleteOutlined";
import PlayArrowOutlined from "@mui/icons-material/PlayArrowOutlined";
import StopOutlined from "@mui/icons-material/StopOutlined";
import type { WorkspaceTransition } from "api/typesGenerated"; import type { WorkspaceTransition } from "api/typesGenerated";
import { PlayIcon, SquareIcon, TrashIcon } from "lucide-react";
import type { ComponentProps } from "react"; import type { ComponentProps } from "react";
type SVGIcon = typeof PlayArrowOutlined; type SVGIcon = typeof PlayIcon;
type SVGIconProps = ComponentProps<SVGIcon>; type SVGIconProps = ComponentProps<SVGIcon>;
const iconByTransition: Record<WorkspaceTransition, SVGIcon> = { const iconByTransition: Record<WorkspaceTransition, SVGIcon> = {
start: PlayArrowOutlined, start: PlayIcon,
stop: StopOutlined, stop: SquareIcon,
delete: DeleteOutlined, delete: TrashIcon,
}; };
export const BuildIcon = ( export const BuildIcon = (

View File

@ -1,5 +1,4 @@
import AddIcon from "@mui/icons-material/AddOutlined"; import AddIcon from "@mui/icons-material/AddOutlined";
import DeleteIcon from "@mui/icons-material/DeleteOutlined";
import EditIcon from "@mui/icons-material/EditOutlined"; import EditIcon from "@mui/icons-material/EditOutlined";
import CopyIcon from "@mui/icons-material/FileCopyOutlined"; import CopyIcon from "@mui/icons-material/FileCopyOutlined";
import SettingsIcon from "@mui/icons-material/SettingsOutlined"; import SettingsIcon from "@mui/icons-material/SettingsOutlined";
@ -30,6 +29,7 @@ import {
} from "components/PageHeader/PageHeader"; } from "components/PageHeader/PageHeader";
import { Pill } from "components/Pill/Pill"; import { Pill } from "components/Pill/Pill";
import { Stack } from "components/Stack/Stack"; import { Stack } from "components/Stack/Stack";
import { TrashIcon } from "lucide-react";
import { EllipsisVertical } from "lucide-react"; import { EllipsisVertical } from "lucide-react";
import { linkToTemplate, useLinks } from "modules/navigation"; import { linkToTemplate, useLinks } from "modules/navigation";
import type { WorkspacePermissions } from "modules/permissions/workspaces"; import type { WorkspacePermissions } from "modules/permissions/workspaces";
@ -105,7 +105,7 @@ const TemplateMenu: FC<TemplateMenuProps> = ({
className="text-content-destructive focus:text-content-destructive" className="text-content-destructive focus:text-content-destructive"
onClick={dialogState.openDeleteConfirmation} onClick={dialogState.openDeleteConfirmation}
> >
<DeleteIcon /> <TrashIcon />
Delete&hellip; Delete&hellip;
</DropdownMenuItem> </DropdownMenuItem>
</DropdownMenuContent> </DropdownMenuContent>

View File

@ -1,4 +1,3 @@
import DeleteIcon from "@mui/icons-material/DeleteOutlined";
import DownloadOutlined from "@mui/icons-material/DownloadOutlined"; import DownloadOutlined from "@mui/icons-material/DownloadOutlined";
import DuplicateIcon from "@mui/icons-material/FileCopyOutlined"; import DuplicateIcon from "@mui/icons-material/FileCopyOutlined";
import HistoryIcon from "@mui/icons-material/HistoryOutlined"; import HistoryIcon from "@mui/icons-material/HistoryOutlined";
@ -13,6 +12,7 @@ import {
DropdownMenuTrigger, DropdownMenuTrigger,
} from "components/DropdownMenu/DropdownMenu"; } from "components/DropdownMenu/DropdownMenu";
import { useAuthenticated } from "hooks/useAuthenticated"; import { useAuthenticated } from "hooks/useAuthenticated";
import { TrashIcon } from "lucide-react";
import { EllipsisVertical } from "lucide-react"; import { EllipsisVertical } from "lucide-react";
import { import {
type ActionType, type ActionType,
@ -227,7 +227,7 @@ export const WorkspaceActions: FC<WorkspaceActionsProps> = ({
onClick={handleDelete} onClick={handleDelete}
data-testid="delete-button" data-testid="delete-button"
> >
<DeleteIcon /> <TrashIcon />
Delete&hellip; Delete&hellip;
</DropdownMenuItem> </DropdownMenuItem>
</DropdownMenuContent> </DropdownMenuContent>

View File

@ -1,8 +1,5 @@
import CloudQueue from "@mui/icons-material/CloudQueue"; import CloudQueue from "@mui/icons-material/CloudQueue";
import DeleteOutlined from "@mui/icons-material/DeleteOutlined";
import KeyboardArrowDownOutlined from "@mui/icons-material/KeyboardArrowDownOutlined"; import KeyboardArrowDownOutlined from "@mui/icons-material/KeyboardArrowDownOutlined";
import PlayArrowOutlined from "@mui/icons-material/PlayArrowOutlined";
import StopOutlined from "@mui/icons-material/StopOutlined";
import LoadingButton from "@mui/lab/LoadingButton"; import LoadingButton from "@mui/lab/LoadingButton";
import { hasError, isApiValidationError } from "api/errors"; import { hasError, isApiValidationError } from "api/errors";
import type { Template, Workspace } from "api/typesGenerated"; import type { Template, Workspace } from "api/typesGenerated";
@ -22,6 +19,7 @@ import { PaginationHeader } from "components/PaginationWidget/PaginationHeader";
import { PaginationWidgetBase } from "components/PaginationWidget/PaginationWidgetBase"; import { PaginationWidgetBase } from "components/PaginationWidget/PaginationWidgetBase";
import { Stack } from "components/Stack/Stack"; import { Stack } from "components/Stack/Stack";
import { TableToolbar } from "components/TableToolbar/TableToolbar"; import { TableToolbar } from "components/TableToolbar/TableToolbar";
import { PlayIcon, SquareIcon, TrashIcon } from "lucide-react";
import { WorkspacesTable } from "pages/WorkspacesPage/WorkspacesTable"; import { WorkspacesTable } from "pages/WorkspacesPage/WorkspacesTable";
import type { FC } from "react"; import type { FC } from "react";
import type { UseQueryResult } from "react-query"; import type { UseQueryResult } from "react-query";
@ -160,7 +158,7 @@ export const WorkspacesPageView: FC<WorkspacesPageViewProps> = ({
} }
onClick={onStartAll} onClick={onStartAll}
> >
<PlayArrowOutlined /> Start <PlayIcon /> Start
</DropdownMenuItem> </DropdownMenuItem>
<DropdownMenuItem <DropdownMenuItem
disabled={ disabled={
@ -170,7 +168,7 @@ export const WorkspacesPageView: FC<WorkspacesPageViewProps> = ({
} }
onClick={onStopAll} onClick={onStopAll}
> >
<StopOutlined /> Stop <SquareIcon /> Stop
</DropdownMenuItem> </DropdownMenuItem>
<DropdownMenuSeparator /> <DropdownMenuSeparator />
<DropdownMenuItem onClick={onUpdateAll}> <DropdownMenuItem onClick={onUpdateAll}>
@ -180,7 +178,7 @@ export const WorkspacesPageView: FC<WorkspacesPageViewProps> = ({
className="text-content-destructive focus:text-content-destructive" className="text-content-destructive focus:text-content-destructive"
onClick={onDeleteAll} onClick={onDeleteAll}
> >
<DeleteOutlined /> Delete&hellip; <TrashIcon /> Delete&hellip;
</DropdownMenuItem> </DropdownMenuItem>
</DropdownMenuContent> </DropdownMenuContent>
</DropdownMenu> </DropdownMenu>

View File

@ -1,14 +1,13 @@
import type { Theme } from "@emotion/react"; import type { Theme } from "@emotion/react";
import ErrorIcon from "@mui/icons-material/ErrorOutline"; import ErrorIcon from "@mui/icons-material/ErrorOutline";
import QueuedIcon from "@mui/icons-material/HourglassEmpty"; import QueuedIcon from "@mui/icons-material/HourglassEmpty";
import PlayIcon from "@mui/icons-material/PlayArrowOutlined";
import StopIcon from "@mui/icons-material/StopOutlined";
import type * as TypesGen from "api/typesGenerated"; import type * as TypesGen from "api/typesGenerated";
import { PillSpinner } from "components/Pill/Pill"; import { PillSpinner } from "components/Pill/Pill";
import dayjs from "dayjs"; import dayjs from "dayjs";
import duration from "dayjs/plugin/duration"; import duration from "dayjs/plugin/duration";
import minMax from "dayjs/plugin/minMax"; import minMax from "dayjs/plugin/minMax";
import utc from "dayjs/plugin/utc"; import utc from "dayjs/plugin/utc";
import { PlayIcon, SquareIcon } from "lucide-react";
import semver from "semver"; import semver from "semver";
import { getPendingStatusLabel } from "./provisionerJob"; import { getPendingStatusLabel } from "./provisionerJob";
@ -215,7 +214,7 @@ export const getDisplayWorkspaceStatus = (
return { return {
type: "inactive", type: "inactive",
text: "Stopped", text: "Stopped",
icon: <StopIcon />, icon: <SquareIcon />,
} as const; } as const;
case "deleting": case "deleting":
return { return {