Skip to content
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

Change all antd icons #1680

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
32 changes: 15 additions & 17 deletions src/components/AffixButton/AffixButton.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import {
FileAddFilled,
PlusCircleFilled,
PlusOutlined,
UserAddOutlined,
} from "@ant-design/icons";
import {
NoteAdd,
AddCircle,
AddOutlined,
PersonAddAlt1Outlined,
Source,
Report
} from "@mui/icons-material";
import { useAtom } from "jotai";
import Cookies from "js-cookie";
import { Trans, useTranslation } from "next-i18next";
Expand All @@ -18,8 +20,6 @@ import Fab from "./Fab";
import { NameSpaceEnum } from "../../types/Namespace";
import { currentNameSpace } from "../../atoms/namespace";
import { useAppSelector } from "../../store/store";
import SourceIcon from "@mui/icons-material/Source";
import ReportIcon from "@mui/icons-material/Report";

interface AffixButtonProps {
personalitySlug?: string;
Expand All @@ -44,7 +44,7 @@ const AffixButton = ({ personalitySlug }: AffixButtonProps) => {
const { t } = useTranslation();
const actions = [
{
icon: <UserAddOutlined />,
icon: <PersonAddAlt1Outlined />,
tooltip: t("affix:affixButtonCreatePersonality"),
href:
nameSpace !== NameSpaceEnum.Main
Expand All @@ -61,7 +61,7 @@ const AffixButton = ({ personalitySlug }: AffixButtonProps) => {
userRole !== "regular" &&
actions.push(
{
icon: <FileAddFilled />,
icon: <NoteAdd />,
tooltip: t("affix:affixButtonCreateClaim"),
href:
nameSpace !== NameSpaceEnum.Main
Expand All @@ -70,7 +70,7 @@ const AffixButton = ({ personalitySlug }: AffixButtonProps) => {
dataCy: "testFloatButtonAddClaim",
},
{
icon: <SourceIcon />,
icon: <Source />,
tooltip: t("affix:affixButtonCreateVerifiedSources"),
href:
nameSpace !== NameSpaceEnum.Main
Expand All @@ -79,7 +79,7 @@ const AffixButton = ({ personalitySlug }: AffixButtonProps) => {
dataCy: "testFloatButtonAddSources",
},
{
icon: <ReportIcon />,
icon: <Report />,
tooltip: t("affix:affixButtonCreateVerificationRequest"),
href:
nameSpace !== NameSpaceEnum.Main
Expand Down Expand Up @@ -157,10 +157,8 @@ const AffixButton = ({ personalitySlug }: AffixButtonProps) => {
onClick={handleClick}
data-cy={"testFloatButton"}
icon={
<PlusOutlined
style={{
fontSize: "27px",
}}
<AddOutlined
fontSize="large"
/>
}
/>
Expand Down Expand Up @@ -196,7 +194,7 @@ const AffixButton = ({ personalitySlug }: AffixButtonProps) => {
>
<Trans
i18nKey={"tutorial:modalContent"}
components={[<PlusCircleFilled key={"icon"} />]}
components={[<AddCircle style={{marginBottom:"-5px",fontSize:"18px"}} key={"icon"} />]}
/>
</p>

Expand Down
19 changes: 5 additions & 14 deletions src/components/AffixButton/AffixCTAButton.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, { useEffect, useState } from "react";

import { CloseOutlined, QuestionCircleOutlined } from "@ant-design/icons";
import { CloseOutlined, HelpOutlineOutlined } from "@mui/icons-material";
import Fab from "../AffixButton/Fab";
import { AletheiaModal } from "../Modal/AletheiaModal.style";
import Banner from "../SentenceReport/Banner";
Expand All @@ -9,11 +8,11 @@ import Cookies from "js-cookie";
import CtaAnimation from "../CtaAnimation";
import { Tooltip } from "antd";
import colors from "../../styles/colors";
import { t } from "i18next";
import { trackUmamiEvent } from "../../lib/umami";
import { useAppSelector } from "../../store/store";

const CloseIcon = () => {
const { t } = useTranslation();
return (
<Tooltip
title={t("affix:AffixCloseTooltip")}
Expand All @@ -22,13 +21,7 @@ const CloseIcon = () => {
color={colors.white}
overlayInnerStyle={{ color: colors.black }}
>
<CloseOutlined
style={{
marginTop: 20,
paddingBottom: 20,
height: 20,
}}
/>
<CloseOutlined style={{margin:"10px", color:colors.white}} />
</Tooltip>
);
};
Expand Down Expand Up @@ -85,10 +78,8 @@ const AffixCTAButton = ({ copilotDrawerWidth }) => {
onClick={handleCTAClick}
data-cy={"testCTAFloatButton"}
icon={
<QuestionCircleOutlined
style={{
fontSize: "24px",
}}
<HelpOutlineOutlined
fontSize="medium"
/>
}
/>
Expand Down
6 changes: 4 additions & 2 deletions src/components/BackButton.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useTranslation } from "next-i18next";
import React, { CSSProperties } from "react";
import { ArrowLeftOutlined } from "@ant-design/icons";
import { ArrowBackOutlined } from "@mui/icons-material";
import { useRouter } from "next/router";
import colors from "../styles/colors";

Expand All @@ -13,6 +13,8 @@ function BackButton({ style, callback }: { style?: CSSProperties; callback?: ()
return (
<a
style={{
display:"flex",
alignContent:"center",
fontWeight: "bold",
color: colors.secondary,
...style
Expand All @@ -28,7 +30,7 @@ function BackButton({ style, callback }: { style?: CSSProperties; callback?: ()
}
}}
>
<ArrowLeftOutlined /> {t("common:back_button")}
<ArrowBackOutlined fontSize="small"/> {t("common:back_button")}
</a>
);
} else {
Expand Down
21 changes: 11 additions & 10 deletions src/components/Claim/CreateClaim/ClaimSelectType.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {
FileOutlined,
PictureOutlined,
VideoCameraOutlined,
} from "@ant-design/icons";
import {
InsertDriveFileOutlined,
PhotoSizeSelectActualOutlined,
VideocamOutlined
} from "@mui/icons-material";
import { Grid } from "@mui/material";
import { useAtom } from "jotai";
import { useTranslation } from "next-i18next";
Expand All @@ -16,12 +16,13 @@ import AletheiaButton from "../../Button";
const ClaimSelectType = () => {
const [, send] = useAtom(createClaimMachineAtom);
const { t } = useTranslation();
const Sizeicon = { fontSize:"22px", margin:"0 5 5 0"};

const icons = {
[ContentModelEnum.Image]: <PictureOutlined />,
[ContentModelEnum.Speech]: <FileOutlined />,
[ContentModelEnum.Debate]: <VideoCameraOutlined />,
[ContentModelEnum.Unattributed]: <FileOutlined />,
[ContentModelEnum.Image]: <PhotoSizeSelectActualOutlined style={Sizeicon}/>,
[ContentModelEnum.Speech]: <InsertDriveFileOutlined style={Sizeicon}/>,
[ContentModelEnum.Debate]: <VideocamOutlined style={Sizeicon}/>,
[ContentModelEnum.Unattributed]: <InsertDriveFileOutlined style={Sizeicon}/>,
};

const handleClickStart = (event) => {
Expand Down Expand Up @@ -64,7 +65,7 @@ const ClaimSelectType = () => {
{Object.keys(ContentModelEnum).map((key) => (
<AletheiaButton
onClick={() => handleClickStart(key)}
style={{ textTransform: "uppercase" }}
style={{ gap:"10px",textTransform: "uppercase" }}
data-cy={`testSelectType${key}`}
key={key}
>
Expand Down
6 changes: 3 additions & 3 deletions src/components/Claim/SentencePopover.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { InfoCircleOutlined, SecurityScanOutlined } from "@ant-design/icons";
import { InfoOutlined, SecurityOutlined } from "@mui/icons-material";
import { Popover } from "antd";
import React from "react";
import colors from "../../styles/colors";
Expand All @@ -18,14 +18,14 @@ const SentencePopover = () => {
gap: 4,
}}
>
<SecurityScanOutlined style={{ fontSize: 20 }} />
<SecurityOutlined fontSize="small" />
{t("reviewTask:sentenceInfo")}
</span>
);

return (
<Popover placement="top" content={content} trigger="hover">
<InfoCircleOutlined style={{ color: colors.neutralSecondary }} />
<InfoOutlined style={{fontSize:"18px", color: colors.neutralSecondary }} />
</Popover>
);
};
Expand Down
10 changes: 4 additions & 6 deletions src/components/ClaimReview/ClaimReviewDrawer.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {
ArrowLeftOutlined,
ExclamationCircleOutlined,
} from "@ant-design/icons";
import { ArrowBackOutlined, ErrorOutlineOutlined } from "@mui/icons-material";
import { Grid } from "@mui/material"
import { useTranslation } from "next-i18next";
import React, { useEffect, useState } from "react";
Expand Down Expand Up @@ -73,7 +70,7 @@ const ClaimReviewDrawer = () => {
>
<Grid item style={{ display: "flex", gap: 32 }}>
<AletheiaButton
icon={<ArrowLeftOutlined />}
icon={<ArrowBackOutlined style={{marginRight:"10px"}} fontSize="small"/>}
onClick={() =>
dispatch(actions.closeReviewDrawer())
}
Expand Down Expand Up @@ -111,9 +108,10 @@ const ClaimReviewDrawer = () => {
justifyContent: "center",
gap: 8,
alignItems: "center",
marginTop:"10px"
}}
>
<ExclamationCircleOutlined
<ErrorOutlineOutlined
style={{
fontSize: 16,
color: colors.secondary,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import AletheiaInput from "../../../../AletheiaInput";
import AletheiaButton from "../../../../Button";
import { DeleteOutlined, PlusOutlined } from "@ant-design/icons";
import { DeleteOutlined, AddOutlined } from "@mui/icons-material";
import colors from "../../../../../styles/colors";

const InsertSourceForm = ({
Expand Down Expand Up @@ -44,7 +44,7 @@ const InsertSourceForm = ({
}}
data-cy="testClaimReviewSourcesButton"
>
<PlusOutlined />
<AddOutlined fontSize="small"/>
</AletheiaButton>
{activeLink && (
<AletheiaButton
Expand All @@ -59,7 +59,7 @@ const InsertSourceForm = ({
boxShadow: "0px 2px 2px rgba(0, 0, 0, 0.4)",
}}
>
<DeleteOutlined />
<DeleteOutlined fontSize="small"/>
</AletheiaButton>
)}
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CloseOutlined } from "@ant-design/icons";
import { CloseOutlined } from "@mui/icons-material";
import { useTranslation } from "next-i18next";
import React from "react";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Col, Spin } from "antd";
import React, { useEffect, useMemo, useState } from "react";
import { LoadingOutlined } from "@ant-design/icons";
import { CircularProgress } from "@mui/material";
import MoreVertIcon from "@mui/icons-material/MoreVert";
import EditorSourcePopover from "./EditorSourcePopover";
import colors from "../../../../styles/colors";
Expand Down Expand Up @@ -52,7 +52,7 @@ const EditorSourceListItem = ({ node, sup, source }: EditorSouceListProps) => {
<Spin
spinning={isLoading}
indicator={
<LoadingOutlined
<CircularProgress
style={{
color:
nameSpace === NameSpaceEnum.Main
Expand Down
4 changes: 2 additions & 2 deletions src/components/Collaborative/Form/QuestionCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useCallback, useContext } from "react";
import { Grid } from "@mui/material";
import Button from "../../Button";
import { useCommands } from "@remirror/react";
import { DeleteOutlined } from "@ant-design/icons";
import { DeleteOutlined } from "@mui/icons-material";
import { useTranslation } from "next-i18next";
import { ReviewTaskMachineContext } from "../../../machines/reviewTask/ReviewTaskMachineProvider";
import { reviewingSelector } from "../../../machines/reviewTask/selectors";
Expand Down Expand Up @@ -41,7 +41,7 @@ const QuestionCard = ({ forwardRef, node, initialPosition }) => {
disabled={editable}
data-cy="testClaimReviewquestionsRemove1"
>
<DeleteOutlined />
<DeleteOutlined fontSize="small"/>
</Button>
</Grid>
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/Copilot/CopilotConversationLoading.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React from "react";
import { LoadingOutlined } from "@ant-design/icons";
import { CircularProgress } from "@mui/material";
import CopilotConversationLoadingStyle from "./CopilotConversationLoading.style";
import { useTranslation } from "next-i18next";

const CopilotConversationLoading = () => {
const { t } = useTranslation();
return (
<CopilotConversationLoadingStyle>
<LoadingOutlined className="loading" spin />
<CircularProgress className="loading" />
<span className="loading-text">
{t("copilotChatBot:agentLoadingThoughts")}
</span>
Expand Down
Loading
Loading