Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: replace MUI icons with Lucide icons - 11#17814

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
BrunoQuaresma merged 1 commit intomainfrombq/chore-replace-mui-icons-11
May 14, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
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
6 changes: 4 additions & 2 deletionssite/src/pages/HealthPage/DERPRegionPage.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
import { type Interpolation, type Theme, useTheme } from "@emotion/react";
import ArrowBackOutlined from "@mui/icons-material/ArrowBackOutlined";
import CodeOutlined from "@mui/icons-material/CodeOutlined";
import TagOutlined from "@mui/icons-material/TagOutlined";
import Tooltip from "@mui/material/Tooltip";
import type {
Expand All@@ -11,6 +10,7 @@ import type {
HealthcheckReport,
} from "api/typesGenerated";
import { Alert } from "components/Alert/Alert";
import { CodeIcon } from "lucide-react";
import type { FC } from "react";
import { Helmet } from "react-helmet-async";
import { Link, useOutletContext, useParams } from "react-router-dom";
Expand DownExpand Up@@ -94,7 +94,9 @@ const DERPRegionPage: FC = () => {
<Pill icon={<TagOutlined />}>{region!.RegionID}</Pill>
</Tooltip>
<Tooltip title="Region Code">
<Pill icon={<CodeOutlined />}>{region!.RegionCode}</Pill>
<Pill icon={<CodeIcon className="size-icon-sm" />}>
{region!.RegionCode}
</Pill>
</Tooltip>
<BooleanPill value={region!.EmbeddedRelay}>
Embedded Relay
Expand Down
6 changes: 4 additions & 2 deletionssite/src/pages/HealthPage/WebsocketPage.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
import { useTheme } from "@emotion/react";
import CodeOutlined from "@mui/icons-material/CodeOutlined";
import Tooltip from "@mui/material/Tooltip";
import type { HealthcheckReport } from "api/typesGenerated";
import { Alert } from "components/Alert/Alert";
import { CodeIcon } from "lucide-react";
import { Helmet } from "react-helmet-async";
import { useOutletContext } from "react-router-dom";
import { MONOSPACE_FONT_FAMILY } from "theme/constants";
Expand DownExpand Up@@ -49,7 +49,9 @@ const WebsocketPage = () => {

<section>
<Tooltip title="Code">
<Pill icon={<CodeOutlined />}>{websocket.code}</Pill>
<Pill icon={<CodeIcon className="size-icon-sm" />}>
{websocket.code}
</Pill>
</Tooltip>
</section>

Expand Down
4 changes: 2 additions & 2 deletionssite/src/pages/TemplatePage/TemplatePageHeader.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
import AddIcon from "@mui/icons-material/AddOutlined";
import EditIcon from "@mui/icons-material/EditOutlined";
import CopyIcon from "@mui/icons-material/FileCopyOutlined";
import SettingsIcon from "@mui/icons-material/SettingsOutlined";
import Button from "@mui/material/Button";
import { workspaces } from "api/queries/workspaces";
import type {
Expand DownExpand Up@@ -29,6 +28,7 @@ import {
} from "components/PageHeader/PageHeader";
import { Pill } from "components/Pill/Pill";
import { Stack } from "components/Stack/Stack";
import { SettingsIcon } from "lucide-react";
import { TrashIcon } from "lucide-react";
import { EllipsisVertical } from "lucide-react";
import { linkToTemplate, useLinks } from "modules/navigation";
Expand DownExpand Up@@ -79,7 +79,7 @@ const TemplateMenu: FC<TemplateMenuProps> = ({
<DropdownMenuItem
onClick={() => navigate(`${templateLink}/settings`)}
>
<SettingsIcon />
<SettingsIconclassName="size-icon-sm"/>
Settings
</DropdownMenuItem>

Expand Down
4 changes: 2 additions & 2 deletionssite/src/pages/TemplateSettingsPage/Sidebar.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
import VariablesIcon from "@mui/icons-material/CodeOutlined";
import ScheduleIcon from "@mui/icons-material/TimerOutlined";
import type { Template } from "api/typesGenerated";
import { Avatar } from "components/Avatar/Avatar";
import {
Sidebar as BaseSidebar,
SidebarHeader,
SidebarNavItem,
} from "components/Sidebar/Sidebar";
import { CodeIcon as VariablesIcon } from "lucide-react";
import { TimerIcon as ScheduleIcon } from "lucide-react";
import { SettingsIcon } from "lucide-react";
import { LockIcon } from "lucide-react";
import { linkToTemplate, useLinks } from "modules/navigation";
Expand Down
6 changes: 3 additions & 3 deletionssite/src/pages/WorkspaceSettingsPage/Sidebar.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
import ParameterIcon from "@mui/icons-material/CodeOutlined";
import GeneralIcon from "@mui/icons-material/SettingsOutlined";
import ScheduleIcon from "@mui/icons-material/TimerOutlined";
import type { Workspace } from "api/typesGenerated";
import { Avatar } from "components/Avatar/Avatar";
import {
Sidebar as BaseSidebar,
SidebarHeader,
SidebarNavItem,
} from "components/Sidebar/Sidebar";
import { CodeIcon as ParameterIcon } from "lucide-react";
import { SettingsIcon as GeneralIcon } from "lucide-react";
import { TimerIcon as ScheduleIcon } from "lucide-react";
import type { FC } from "react";

interface SidebarProps {
Expand Down
13 changes: 5 additions & 8 deletionssite/src/pages/WorkspacesPage/BatchDeleteConfirmation.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
import { type Interpolation, type Theme, useTheme } from "@emotion/react";
import PersonOutlinedIcon from "@mui/icons-material/PersonOutlined";
import ScheduleIcon from "@mui/icons-material/Schedule";
import { visuallyHidden } from "@mui/utils";
import type { Workspace } from "api/typesGenerated";
import { ConfirmDialog } from "components/Dialogs/ConfirmDialog/ConfirmDialog";
import { ExternalImage } from "components/ExternalImage/ExternalImage";
import { Stack } from "components/Stack/Stack";
import dayjs from "dayjs";
import relativeTime from "dayjs/plugin/relativeTime";
import { ClockIcon, UserIcon } from "lucide-react";
import { type FC, type ReactNode, useState } from "react";
import { getResourceIconPath } from "utils/workspace";

Expand DownExpand Up@@ -190,7 +189,7 @@ const Workspaces: FC<StageProps> = ({ workspaces }) => {
>
{dayjs(workspace.last_used_at).fromNow()}
</span>
<ScheduleIcon css={styles.summaryIcon} />
<ClockIcon className="size-icon-xs" />

Choose a reason for hiding this comment

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

nit: Now that I look at both of the dialogs...why does the delete dialog show icons on the right, while the update dialog shows icons on the left? IMO the icons should be on the left in both dialogs, to keep consistency with themostRecent info below

Screenshot 2025-05-13 at 9 13 42 PM

Copy link
CollaboratorAuthor

Choose a reason for hiding this comment

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

I do agree with you, but since it is not in the scope of this PR, I will leave as it is ok?

</Stack>
</Stack>
</Stack>
Expand All@@ -209,7 +208,7 @@ const Workspaces: FC<StageProps> = ({ workspaces }) => {
</Stack>
{mostRecent && (
<Stack direction="row" alignItems="center" spacing={1}>
<ScheduleIcon css={styles.summaryIcon} />
<ClockIcon className="size-icon-xs" />
<span>Last used {dayjs(mostRecent.last_used_at).fromNow()}</span>
</Stack>
)}
Expand DownExpand Up@@ -264,10 +263,8 @@ const Resources: FC<StageProps> = ({ workspaces }) => {
};

const PersonIcon: FC = () => {
// This size doesn't match the rest of the icons because MUI is just really
// inconsistent. We have to make it bigger than the rest, and pull things in
// on the sides to compensate.
return <PersonOutlinedIcon css={{ width: 18, height: 18, margin: -1 }} />;
// Using the Lucide icon with appropriate size class
return <UserIcon className="size-icon-sm" css={{ margin: -1 }} />;

Choose a reason for hiding this comment

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

Suggested change
return<UserIconclassName="size-icon-sm"css={{margin:-1}}/>;
return<UserIconclassName="size-icon-xs"/>;

See my other comment in BatchUpdateConfirmation.tsx

};

const styles = {
Expand Down
16 changes: 6 additions & 10 deletionssite/src/pages/WorkspacesPage/BatchUpdateConfirmation.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
import type { Interpolation, Theme } from "@emotion/react";
import InstallDesktopIcon from "@mui/icons-material/InstallDesktop";
import PersonOutlinedIcon from "@mui/icons-material/PersonOutlined";
import ScheduleIcon from "@mui/icons-material/Schedule";
import SettingsSuggestIcon from "@mui/icons-material/SettingsSuggest";
import { API } from "api/api";
import type { TemplateVersion, Workspace } from "api/typesGenerated";
import { ErrorAlert } from "components/Alert/ErrorAlert";
Expand All@@ -12,6 +9,7 @@ import { MemoizedInlineMarkdown } from "components/Markdown/Markdown";
import { Stack } from "components/Stack/Stack";
import dayjs from "dayjs";
import relativeTime from "dayjs/plugin/relativeTime";
import { ClockIcon, SettingsIcon, UserIcon } from "lucide-react";
import { type FC, type ReactNode, useEffect, useMemo, useState } from "react";
import { useQueries } from "react-query";

Expand DownExpand Up@@ -293,7 +291,7 @@ const DormantWorkspaces: FC<DormantWorkspacesProps> = ({ workspaces }) => {
</span>
</Stack>
<Stack direction="row" alignItems="center" spacing={1}>
<ScheduleIcon css={styles.summaryIcon} />
<ClockIcon className="size-icon-xs" />
<span
css={{ whiteSpace: "nowrap", textOverflow: "ellipsis" }}
>
Expand All@@ -317,7 +315,7 @@ const DormantWorkspaces: FC<DormantWorkspacesProps> = ({ workspaces }) => {
</Stack>
{mostRecent && (
<Stack direction="row" alignItems="center" spacing={1}>
<ScheduleIcon css={styles.summaryIcon} />
<ClockIcon className="size-icon-xs" />
<span>Last used {lastUsed(mostRecent.last_used_at)}</span>
</Stack>
)}
Expand DownExpand Up@@ -358,7 +356,7 @@ const Updates: FC<UpdatesProps> = ({ workspaces, updates, error }) => {
</Stack>
{updateCount && (
<Stack direction="row" alignItems="center" spacing={1}>
<SettingsSuggestIcon css={styles.summaryIcon} />
<SettingsIcon className="size-icon-xs" />
<span>{updateCount}</span>
</Stack>
)}
Expand DownExpand Up@@ -433,10 +431,8 @@ const lastUsed = (time: string) => {
};

const PersonIcon: FC = () => {
// This size doesn't match the rest of the icons because MUI is just really
// inconsistent. We have to make it bigger than the rest, and pull things in
// on the sides to compensate.
return <PersonOutlinedIcon css={{ width: 18, height: 18, margin: -1 }} />;
// Using the Lucide icon with appropriate size class
return <UserIcon className="size-icon-sm" css={{ margin: -1 }} />;

Choose a reason for hiding this comment

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

Suggested change
return<UserIconclassName="size-icon-sm"css={{margin:-1}}/>;
return<UserIconclassName="size-icon-xs"/>;

What's the reason for usingsize-icon-sm onUserIcon?

This causes the text to be misaligned on the left side:
image

The text becomes left-aligned withsize-icon-xs:

image

Copy link
CollaboratorAuthor

Choose a reason for hiding this comment

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

I think the size-icon-xs looks better. Didn't you?

};

const styles = {
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp