Skip to content

chore: replace MUI icons with Lucide icons - update 18 #17958

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 21, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
chore: chore: replace MUI icons with Lucide icons - 18
  • Loading branch information
BrunoQuaresma committed May 20, 2025
commit e40229d5b7e63bdd84a63230e013b72d4c8ca31d
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import type { Theme } from "@emotion/react";
import { useTheme } from "@emotion/react";
import AppsIcon from "@mui/icons-material/Apps";
import CheckCircle from "@mui/icons-material/CheckCircle";
import ErrorIcon from "@mui/icons-material/Error";
import InsertDriveFile from "@mui/icons-material/InsertDriveFile";
import Warning from "@mui/icons-material/Warning";
import CircularProgress from "@mui/material/CircularProgress";
import type {
Expand All @@ -12,6 +10,8 @@ import type {
WorkspaceAgent,
WorkspaceApp,
} from "api/typesGenerated";
import { LayoutGridIcon } from "lucide-react";
import { FileIcon } from "lucide-react";
import { ExternalLinkIcon } from "lucide-react";
import { useAppLink } from "modules/apps/useAppLink";
import type { FC } from "react";
Expand Down Expand Up @@ -163,11 +163,11 @@ export const WorkspaceAppStatus = ({
...commonStyles,
}}
>
<InsertDriveFile
sx={{
fontSize: "11px",
<FileIcon
className="size-icon-xs"
css={{
opacity: 0.5,
mr: 0.25,
marginRight: "0.25rem",
Comment on lines +168 to +172
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Genuine question: Is there a reason why this wasn't switched over to Tailwind syntax? I know some of the icon libraries can be a little finicky with styling

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, wait, does this work as intended? I know that when you give a component a css prop, Emotion injects it via className. Does Emotion take the existing className and merge it with its version of className, or does it override the value?

}}
/>
<span>{formatURI(status.uri)}</span>
Expand Down Expand Up @@ -262,9 +262,9 @@ const AppLink: FC<AppLinkProps> = ({ app, workspace, agent }) => {
}}
/>
) : (
<AppsIcon
sx={{
fontSize: 14,
<LayoutGridIcon
className="size-icon-xs"
css={{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another potential area where css can be removed

opacity: 0.7,
}}
/>
Expand Down
4 changes: 2 additions & 2 deletions site/src/pages/ChatPage/ChatToolInvocation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import ArticleIcon from "@mui/icons-material/Article";
import BuildIcon from "@mui/icons-material/Build";
import CheckCircle from "@mui/icons-material/CheckCircle";
import CodeIcon from "@mui/icons-material/Code";
import DeleteIcon from "@mui/icons-material/Delete";
import ErrorIcon from "@mui/icons-material/Error";
import FileUploadIcon from "@mui/icons-material/FileUpload";
import PersonIcon from "@mui/icons-material/Person";
Expand All @@ -13,6 +12,7 @@ import CircularProgress from "@mui/material/CircularProgress";
import Tooltip from "@mui/material/Tooltip";
import type * as TypesGen from "api/typesGenerated";
import { Avatar } from "components/Avatar/Avatar";
import { TrashIcon } from "lucide-react";
import { InfoIcon } from "lucide-react";
import type React from "react";
import { type FC, memo, useMemo, useState } from "react";
Expand Down Expand Up @@ -533,7 +533,7 @@ const ChatToolInvocationResultPreview: FC<{
color: theme.palette.text.secondary,
}}
>
<DeleteIcon fontSize="small" />
<TrashIcon className="size-icon-xs" />
{toolInvocation.result}
</div>
);
Expand Down
6 changes: 4 additions & 2 deletions site/src/pages/HealthPage/DERPRegionPage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { type Interpolation, type Theme, useTheme } from "@emotion/react";
import TagOutlined from "@mui/icons-material/TagOutlined";
import Tooltip from "@mui/material/Tooltip";
import type {
DERPNodeReport,
Expand All @@ -9,6 +8,7 @@ import type {
HealthcheckReport,
} from "api/typesGenerated";
import { Alert } from "components/Alert/Alert";
import { TagIcon } from "lucide-react";
import { ChevronLeftIcon } from "lucide-react";
import { CodeIcon } from "lucide-react";
import type { FC } from "react";
Expand Down Expand Up @@ -92,7 +92,9 @@ const DERPRegionPage: FC = () => {
<section>
<div css={{ display: "flex", flexWrap: "wrap", gap: 12 }}>
<Tooltip title="Region ID">
<Pill icon={<TagOutlined />}>{region!.RegionID}</Pill>
<Pill icon={<TagIcon className="size-icon-sm" />}>
{region!.RegionID}
</Pill>
</Tooltip>
<Tooltip title="Region Code">
<Pill icon={<CodeIcon className="size-icon-sm" />}>
Expand Down
6 changes: 4 additions & 2 deletions site/src/pages/HealthPage/WorkspaceProxyPage.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { useTheme } from "@emotion/react";
import PublicOutlined from "@mui/icons-material/PublicOutlined";
import TagOutlined from "@mui/icons-material/TagOutlined";
import Tooltip from "@mui/material/Tooltip";
import type { HealthcheckReport } from "api/typesGenerated";
import { Alert } from "components/Alert/Alert";
import { TagIcon } from "lucide-react";
import type { FC } from "react";
import { Helmet } from "react-helmet-async";
import { useOutletContext } from "react-router-dom";
Expand Down Expand Up @@ -118,7 +118,9 @@ const WorkspaceProxyPage: FC = () => {
)}
{region.version && (
<Tooltip title="Version">
<Pill icon={<TagOutlined />}>{region.version}</Pill>
<Pill icon={<TagIcon className="size-icon-sm" />}>
{region.version}
</Pill>
</Tooltip>
)}
{region.derp_enabled && (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import UserIcon from "@mui/icons-material/PersonOutline";
import Checkbox from "@mui/material/Checkbox";
import Tooltip from "@mui/material/Tooltip";
import type { SlimRole } from "api/typesGenerated";
Expand All @@ -17,6 +16,7 @@ import {
PopoverContent,
PopoverTrigger,
} from "components/deprecated/Popover/Popover";
import { UserIcon } from "lucide-react";
import { type FC, useEffect, useState } from "react";

const roleDescriptions: Record<string, string> = {
Expand Down
4 changes: 2 additions & 2 deletions site/src/pages/UsersPage/UsersTable/UsersTableBody.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { Interpolation, Theme } from "@emotion/react";
import DeleteIcon from "@mui/icons-material/Delete";
import GitHub from "@mui/icons-material/GitHub";
import HideSourceOutlined from "@mui/icons-material/HideSourceOutlined";
import KeyOutlined from "@mui/icons-material/KeyOutlined";
Expand Down Expand Up @@ -29,6 +28,7 @@ import {
} from "components/TableLoader/TableLoader";
import dayjs from "dayjs";
import relativeTime from "dayjs/plugin/relativeTime";
import { TrashIcon } from "lucide-react";
import { EllipsisVertical } from "lucide-react";
import type { FC } from "react";
import { UserRoleCell } from "../../OrganizationSettingsPage/UserTable/UserRoleCell";
Expand Down Expand Up @@ -236,7 +236,7 @@ export const UsersTableBody: FC<UsersTableBodyProps> = ({
onClick={() => onDeleteUser(user)}
disabled={user.id === actorID}
>
<DeleteIcon />
<TrashIcon className="size-icon-xs" />
Delete&hellip;
</DropdownMenuItem>
</DropdownMenuContent>
Expand Down
11 changes: 7 additions & 4 deletions site/src/pages/WorkspacePage/AppStatuses.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import type { Theme } from "@emotion/react";
import { useTheme } from "@emotion/react";
import AppsIcon from "@mui/icons-material/Apps";
import CheckCircle from "@mui/icons-material/CheckCircle";
import ErrorIcon from "@mui/icons-material/Error";
import InsertDriveFile from "@mui/icons-material/InsertDriveFile";
import Warning from "@mui/icons-material/Warning";
import CircularProgress from "@mui/material/CircularProgress";
import Link from "@mui/material/Link";
Expand All @@ -15,6 +13,8 @@ import type {
WorkspaceApp,
} from "api/typesGenerated";
import { formatDistance, formatDistanceToNow } from "date-fns";
import { LayoutGridIcon } from "lucide-react";
import { FileIcon } from "lucide-react";
import { ExternalLinkIcon } from "lucide-react";
import { HourglassIcon } from "lucide-react";
import { CircleHelpIcon } from "lucide-react";
Expand Down Expand Up @@ -287,7 +287,10 @@ export const AppStatuses: FC<AppStatusesProps> = ({
},
}}
>
<InsertDriveFile sx={{ mr: 0.5 }} />
<FileIcon
className="size-icon-xs"
style={{ marginRight: "0.5rem" }}
/>
{formatURI(status.uri)}
</div>
</Tooltip>
Expand Down Expand Up @@ -397,7 +400,7 @@ const AppLink: FC<AppLinkProps> = ({ app, agent, workspace }) => {
style={{ borderRadius: "3px" }}
/>
) : (
<AppsIcon />
<LayoutGridIcon className="size-icon-xs" />
)}
{/* Keep app name short */}
<span
Expand Down
Loading