Skip to content

chore: replace MUI icons with Lucide icons - 8 #17778

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 2 commits into from
May 13, 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: replace MUI icons with Lucide icons - 8
  • Loading branch information
BrunoQuaresma committed May 12, 2025
commit 57c6b0b1bf4c20c713100593861d75c4c560b2f9
10 changes: 5 additions & 5 deletions site/src/components/SelectMenu/SelectMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import CheckOutlined from "@mui/icons-material/CheckOutlined";
import Button, { type ButtonProps } from "@mui/material/Button";
import MenuItem, { type MenuItemProps } from "@mui/material/MenuItem";
import MenuList, { type MenuListProps } from "@mui/material/MenuList";
Expand All @@ -7,6 +6,7 @@ import {
SearchField,
type SearchFieldProps,
} from "components/SearchField/SearchField";
import { CheckIcon } from "lucide-react";
import {
Popover,
PopoverContent,
Expand Down Expand Up @@ -145,11 +145,11 @@ export const SelectMenuItem: FC<MenuItemProps> = (props) => {
>
{props.children}
{props.selected && (
<CheckOutlined
// TODO: Don't set the menu icon font size on default theme
css={{ marginLeft: "auto", fontSize: "inherit !important" }}
<CheckIcon
className="size-icon-xs"
css={{ marginLeft: "auto" }}
/>
)}
</MenuItem>
);
};
};
18 changes: 7 additions & 11 deletions site/src/components/Sidebar/Sidebar.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import ScheduleIcon from "@mui/icons-material/EditCalendarOutlined";
import FingerprintOutlinedIcon from "@mui/icons-material/FingerprintOutlined";
import SecurityIcon from "@mui/icons-material/LockOutlined";
import AccountIcon from "@mui/icons-material/Person";
import VpnKeyOutlined from "@mui/icons-material/VpnKeyOutlined";
import { CalendarCogIcon, FingerprintIcon, KeyIcon, LockIcon, UserIcon } from "lucide-react";
import type { Meta, StoryObj } from "@storybook/react";
import { Avatar } from "components/Avatar/Avatar";
import { Sidebar, SidebarHeader, SidebarNavItem } from "./Sidebar";
Expand All @@ -24,22 +20,22 @@ export const Default: Story = {
title="Jon"
subtitle="jon@coder.com"
/>
<SidebarNavItem href="account" icon={AccountIcon}>
<SidebarNavItem href="account" icon={UserIcon}>
Account
</SidebarNavItem>
<SidebarNavItem href="schedule" icon={ScheduleIcon}>
<SidebarNavItem href="schedule" icon={CalendarCogIcon}>
Schedule
</SidebarNavItem>
<SidebarNavItem href="security" icon={SecurityIcon}>
<SidebarNavItem href="security" icon={LockIcon}>
Security
</SidebarNavItem>
<SidebarNavItem href="ssh-keys" icon={FingerprintOutlinedIcon}>
<SidebarNavItem href="ssh-keys" icon={FingerprintIcon}>
SSH Keys
</SidebarNavItem>
<SidebarNavItem href="tokens" icon={VpnKeyOutlined}>
<SidebarNavItem href="tokens" icon={KeyIcon}>
Tokens
</SidebarNavItem>
</Sidebar>
),
},
};
};
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import CheckOutlined from "@mui/icons-material/CheckOutlined";
import FileCopyOutlined from "@mui/icons-material/FileCopyOutlined";
import Button from "@mui/material/Button";
import FormControlLabel from "@mui/material/FormControlLabel";
import Radio from "@mui/material/Radio";
import RadioGroup from "@mui/material/RadioGroup";
import { API } from "api/api";
import type { Template, TemplateVersionParameter } from "api/typesGenerated";
import { CheckIcon } from "lucide-react";
import { FormSection, VerticalForm } from "components/Form/Form";
import { Loader } from "components/Loader/Loader";
import { RichParameterInput } from "components/RichParameterInput/RichParameterInput";
Expand Down Expand Up @@ -187,7 +187,7 @@ export const TemplateEmbedPageView: FC<TemplateEmbedPageViewProps> = ({
css={{ borderRadius: 999 }}
startIcon={
clipboard.showCopiedSuccess ? (
<CheckOutlined />
<CheckIcon className="size-icon-sm" />
) : (
<FileCopyOutlined />
)
Expand All @@ -206,4 +206,4 @@ export const TemplateEmbedPageView: FC<TemplateEmbedPageViewProps> = ({
);
};

export default TemplateEmbedPage;
export default TemplateEmbedPage;
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import CheckOutlined from "@mui/icons-material/CheckOutlined";
import ExpandMoreOutlined from "@mui/icons-material/ExpandMoreOutlined";
import Button from "@mui/material/Button";
import Menu from "@mui/material/Menu";
import MenuItem from "@mui/material/MenuItem";
import { CheckIcon } from "lucide-react";
import { type FC, useRef, useState } from "react";

const insightsIntervals = {
Expand Down Expand Up @@ -72,7 +72,7 @@ export const IntervalMenu: FC<IntervalMenuProps> = ({ value, onChange }) => {
{label}
<div css={{ width: 16, height: 16 }}>
{value === interval && (
<CheckOutlined css={{ width: 16, height: 16 }} />
<CheckIcon className="size-icon-xs" />
)}
</div>
</MenuItem>
Expand All @@ -81,4 +81,4 @@ export const IntervalMenu: FC<IntervalMenuProps> = ({ value, onChange }) => {
</Menu>
</div>
);
};
};
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import CheckOutlined from "@mui/icons-material/CheckOutlined";
import ExpandMoreOutlined from "@mui/icons-material/ExpandMoreOutlined";
import Button from "@mui/material/Button";
import Menu from "@mui/material/Menu";
import MenuItem from "@mui/material/MenuItem";
import { differenceInWeeks } from "date-fns";
import { CheckIcon } from "lucide-react";
import { type FC, useRef, useState } from "react";
import type { DateRangeValue } from "./DateRange";
import { lastWeeks } from "./utils";
Expand Down Expand Up @@ -71,7 +71,7 @@ export const WeekPicker: FC<WeekPickerProps> = ({ value, onChange }) => {
Last {option} weeks
<div css={{ width: 16, height: 16 }}>
{numberOfWeeks === option && (
<CheckOutlined css={{ width: 16, height: 16 }} />
<CheckIcon className="size-icon-xs" />
)}
</div>
</MenuItem>
Expand All @@ -80,4 +80,4 @@ export const WeekPicker: FC<WeekPickerProps> = ({ value, onChange }) => {
</Menu>
</div>
);
};
};
6 changes: 3 additions & 3 deletions site/src/pages/TemplateSettingsPage/Sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import VariablesIcon from "@mui/icons-material/CodeOutlined";
import SecurityIcon from "@mui/icons-material/LockOutlined";
import GeneralIcon from "@mui/icons-material/SettingsOutlined";
import ScheduleIcon from "@mui/icons-material/TimerOutlined";
import { LockIcon } from "lucide-react";
import type { Template } from "api/typesGenerated";
import { Avatar } from "components/Avatar/Avatar";
import {
Expand Down Expand Up @@ -35,7 +35,7 @@ export const Sidebar: FC<SidebarProps> = ({ template }) => {
<SidebarNavItem href="" icon={GeneralIcon}>
General
</SidebarNavItem>
<SidebarNavItem href="permissions" icon={SecurityIcon}>
<SidebarNavItem href="permissions" icon={LockIcon}>
Permissions
</SidebarNavItem>
<SidebarNavItem href="variables" icon={VariablesIcon}>
Expand All @@ -46,4 +46,4 @@ export const Sidebar: FC<SidebarProps> = ({ template }) => {
</SidebarNavItem>
</BaseSidebar>
);
};
};
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import CheckIcon from "@mui/icons-material/CheckOutlined";
import QueuedIcon from "@mui/icons-material/HourglassEmpty";
import type { TemplateVersion } from "api/typesGenerated";
import { Pill, PillSpinner } from "components/Pill/Pill";
import { CircleAlertIcon } from "lucide-react";
import { CheckIcon, CircleAlertIcon } from "lucide-react";
import type { FC, ReactNode } from "react";
import type { ThemeRole } from "theme/roles";
import { getPendingStatusLabel } from "utils/provisionerJob";
Expand Down Expand Up @@ -70,7 +69,7 @@ const getStatus = (
return {
type: "success",
text: "Success",
icon: <CheckIcon />,
icon: <CheckIcon className="size-icon-sm" />,
};
}
};
};
18 changes: 7 additions & 11 deletions site/src/pages/UserSettingsPage/Sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import AppearanceIcon from "@mui/icons-material/Brush";
import ScheduleIcon from "@mui/icons-material/EditCalendarOutlined";
import FingerprintOutlinedIcon from "@mui/icons-material/FingerprintOutlined";
import SecurityIcon from "@mui/icons-material/LockOutlined";
import NotificationsIcon from "@mui/icons-material/NotificationsNoneOutlined";
import AccountIcon from "@mui/icons-material/Person";
import VpnKeyOutlined from "@mui/icons-material/VpnKeyOutlined";
import { CalendarCogIcon, FingerprintIcon, KeyIcon, LockIcon, UserIcon } from "lucide-react";
import type { User } from "api/typesGenerated";
import { Avatar } from "components/Avatar/Avatar";
import { GitIcon } from "components/Icons/GitIcon";
Expand Down Expand Up @@ -32,7 +28,7 @@ export const Sidebar: FC<SidebarProps> = ({ user }) => {
title={user.username}
subtitle={user.email}
/>
<SidebarNavItem href="account" icon={AccountIcon}>
<SidebarNavItem href="account" icon={UserIcon}>
Account
</SidebarNavItem>
<SidebarNavItem href="appearance" icon={AppearanceIcon}>
Expand All @@ -42,22 +38,22 @@ export const Sidebar: FC<SidebarProps> = ({ user }) => {
External Authentication
</SidebarNavItem>
{showSchedulePage && (
<SidebarNavItem href="schedule" icon={ScheduleIcon}>
<SidebarNavItem href="schedule" icon={CalendarCogIcon}>
Schedule
</SidebarNavItem>
)}
<SidebarNavItem href="security" icon={SecurityIcon}>
<SidebarNavItem href="security" icon={LockIcon}>
Security
</SidebarNavItem>
<SidebarNavItem href="ssh-keys" icon={FingerprintOutlinedIcon}>
<SidebarNavItem href="ssh-keys" icon={FingerprintIcon}>
SSH Keys
</SidebarNavItem>
<SidebarNavItem href="tokens" icon={VpnKeyOutlined}>
<SidebarNavItem href="tokens" icon={KeyIcon}>
Tokens
</SidebarNavItem>
<SidebarNavItem href="notifications" icon={NotificationsIcon}>
Notifications
</SidebarNavItem>
</BaseSidebar>
);
};
};
Loading