diff --git a/components/Footer.js b/components/Footer.js index 53db63215c4..05167078524 100644 --- a/components/Footer.js +++ b/components/Footer.js @@ -6,7 +6,7 @@ import { FaInstagram, FaTwitter, FaYoutube, -} from "react-icons/fa"; +} from "react-icons/fa6"; import RocketLaunchIcon from "@heroicons/react/20/solid/RocketLaunchIcon"; import Link from "@components/Link"; diff --git a/components/Icon.js b/components/Icon.js index 00fecb76a9b..5f683e41e1a 100644 --- a/components/Icon.js +++ b/components/Icon.js @@ -1,7 +1,7 @@ import dynamic from "next/dynamic"; function defaultIcon() { - return dynamic(() => import("react-icons/fa").then((mod) => mod.FaGlobe)); + return dynamic(() => import("react-icons/fa6").then((mod) => mod.FaGlobe)); } export default function getIcon(name = "FaGlobe") { @@ -10,7 +10,7 @@ export default function getIcon(name = "FaGlobe") { switch (name.slice(0, 2)) { case "Fa": icon = dynamic(() => - import("react-icons/fa").then((mod) => { + import("react-icons/fa6").then((mod) => { let node = mod[name]; if (!node) node = defaultIcon(); return node; diff --git a/components/IconSearch.js b/components/IconSearch.js index b89c3b8f1d5..d829f15ce02 100644 --- a/components/IconSearch.js +++ b/components/IconSearch.js @@ -1,6 +1,6 @@ import { useState } from "react"; import { Combobox } from "@headlessui/react"; -import * as FaIcons from "react-icons/fa"; +import * as FaIcons from "react-icons/fa6"; import * as SiIcons from "react-icons/si"; import getIcon from "./Icon"; import Label from "./form/Label"; diff --git a/components/event/EventCard.js b/components/event/EventCard.js index 802042c98af..ee2befd3c4a 100644 --- a/components/event/EventCard.js +++ b/components/event/EventCard.js @@ -1,5 +1,5 @@ import { useEffect, useState } from "react"; -import { FaMicrophoneAlt, FaMapPin, FaExternalLinkAlt } from "react-icons/fa"; +import { FaMicrophoneLines, FaMapPin, FaUpRightFromSquare } from "react-icons/fa6"; import { MdOutlineOnlinePrediction, MdOutlinePeople, @@ -44,7 +44,7 @@ export default function EventCard({ manage, event, usernames }) { )} {event.isInPerson && } - {event.date.cfpOpen && } + {event.date.cfpOpen && } {event.price?.startingFrom > 0 && } {event.price?.startingFrom === 0 && } @@ -62,7 +62,7 @@ export default function EventCard({ manage, event, usernames }) { target="_blank" aria-label={`Visit event ${event.name}`} > - + )} diff --git a/components/event/EventKey.js b/components/event/EventKey.js index b14a2506948..41a4de4a277 100644 --- a/components/event/EventKey.js +++ b/components/event/EventKey.js @@ -1,5 +1,5 @@ import { IconContext } from "react-icons"; -import { FaMicrophoneAlt } from "react-icons/fa"; +import { FaMicrophoneLines } from "react-icons/fa6"; import { TbCoin, TbCoinOff } from "react-icons/tb"; import { MdOutlineOnlinePrediction, @@ -27,7 +27,7 @@ export default function EventKey({ categorizedEvents, onToggleEventType }) { title: "CFP open", description: "You can submit a talk to this conference", key: "cfpOpen", - icon: FaMicrophoneAlt, + icon: FaMicrophoneLines, }, { title: "In person", diff --git a/components/navbar/Navbar.js b/components/navbar/Navbar.js index 26b5d824a80..a899b2e59d3 100644 --- a/components/navbar/Navbar.js +++ b/components/navbar/Navbar.js @@ -8,7 +8,7 @@ import Link from "@components/Link"; import { useTheme } from "next-themes"; import { classNames } from "@services/utils/classNames"; -import { FaGithub } from "react-icons/fa"; +import { FaGithub } from "react-icons/fa6"; import SunIcon from "@heroicons/react/20/solid/SunIcon"; import MoonIcon from "@heroicons/react/20/solid/MoonIcon"; import { BASE_GITHUB_PROJECT_URL } from "@constants/index"; diff --git a/components/user/UserMilestone.js b/components/user/UserMilestone.js index ce6dafbdde4..9044cafa32a 100644 --- a/components/user/UserMilestone.js +++ b/components/user/UserMilestone.js @@ -1,5 +1,5 @@ import { useEffect, useState } from "react"; -import { FaExternalLinkAlt } from "react-icons/fa"; +import { FaUpRightFromSquare } from "react-icons/fa6"; import { classNames } from "@services/utils/classNames"; import getIcon from "@components/Icon"; @@ -48,7 +48,7 @@ export default function UserMilestone({ milestone, isGoal, manage }) { aria-label="Milestone Related Link" target="_blank" > - + )}

diff --git a/components/user/UserProfile.js b/components/user/UserProfile.js index f942a5fe0bf..acb5b31c6f3 100644 --- a/components/user/UserProfile.js +++ b/components/user/UserProfile.js @@ -1,5 +1,5 @@ import React, { useRef, useState } from "react"; -import { FaShare } from "react-icons/fa"; +import { FaShare } from "react-icons/fa6"; import { QRCodeCanvas } from "qrcode.react"; import { saveAs } from "file-saver"; import { useRouter } from "next/router"; diff --git a/config/app.json b/config/app.json index fa0689333ae..2337795dad2 100644 --- a/config/app.json +++ b/config/app.json @@ -1,11 +1,12 @@ { "version": "2.18.0", - "alerts": [], - "layouts": [ - "classic", - "inline", - "column-2" + "alerts": [ + { + "type": "info", + "message": "The 'Font Awesome' library has been updated to v6. Some icons have been renamed or changed appearance. Check https://www.biodrop.io/icons for all available icons and update your Profile Links from the Manage Profile section." + } ], + "layouts": ["classic", "inline", "column-2"], "animations": { "none": "No Animation", "pulse": "Pulse", diff --git a/package-lock.json b/package-lock.json index 12dbcf66c3d..11a5c39e672 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "biodrop", - "version": "2.14.0", + "version": "2.15.8", "hasInstallScript": true, "license": "MIT", "dependencies": { @@ -36,7 +36,7 @@ "react": "^18.2.0", "react-children-utilities": "^2.9.0", "react-dom": "^18.2.0", - "react-icons": "^4.10.1", + "react-icons": "^4.11.0", "react-leaflet": "^4.2.1", "react-markdown": "^8.0.7", "react-sortablejs": "^6.1.4", @@ -20881,9 +20881,9 @@ "dev": true }, "node_modules/react-icons": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-4.10.1.tgz", - "integrity": "sha512-/ngzDP/77tlCfqthiiGNZeYFACw85fUjZtLbedmJ5DTlNDIwETxhwBzdOJ21zj4iJdvc0J3y7yOsX3PpxAJzrw==", + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-4.11.0.tgz", + "integrity": "sha512-V+4khzYcE5EBk/BvcuYRq6V/osf11ODUM2J8hg2FDSswRrGvqiYUYPRy4OdrWaQOBj4NcpJfmHZLNaD+VH0TyA==", "peerDependencies": { "react": "*" } @@ -40306,9 +40306,9 @@ } }, "react-icons": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-4.10.1.tgz", - "integrity": "sha512-/ngzDP/77tlCfqthiiGNZeYFACw85fUjZtLbedmJ5DTlNDIwETxhwBzdOJ21zj4iJdvc0J3y7yOsX3PpxAJzrw==" + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-4.11.0.tgz", + "integrity": "sha512-V+4khzYcE5EBk/BvcuYRq6V/osf11ODUM2J8hg2FDSswRrGvqiYUYPRy4OdrWaQOBj4NcpJfmHZLNaD+VH0TyA==" }, "react-inspector": { "version": "6.0.2", diff --git a/package.json b/package.json index 6a38f306adf..1d1fe9e520d 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "react": "^18.2.0", "react-children-utilities": "^2.9.0", "react-dom": "^18.2.0", - "react-icons": "^4.10.1", + "react-icons": "^4.11.0", "react-leaflet": "^4.2.1", "react-markdown": "^8.0.7", "react-sortablejs": "^6.1.4", diff --git a/pages/[username].js b/pages/[username].js index 34370f80173..bd0966f5926 100644 --- a/pages/[username].js +++ b/pages/[username].js @@ -1,5 +1,5 @@ import { IconContext } from "react-icons"; -import { FaRegComments } from "react-icons/fa"; +import { FaRegComments } from "react-icons/fa6"; import { remark } from "remark"; import strip from "strip-markdown"; import requestIp from "request-ip"; diff --git a/pages/account/statistics.js b/pages/account/statistics.js index 29e0b4f0785..4d3968a2e97 100644 --- a/pages/account/statistics.js +++ b/pages/account/statistics.js @@ -3,7 +3,7 @@ import { getServerSession } from "next-auth/next"; import dynamic from "next/dynamic"; import { useRouter } from "next/router"; import { useSession } from "next-auth/react"; -import { FaMapPin, FaMousePointer } from "react-icons/fa"; +import { FaMapPin, FaMousePointer } from "react-icons/fa6"; import ProgressBar from "@components/statistics/ProgressBar"; import { getUserApi } from "../api/profiles/[username]"; diff --git a/pages/events.js b/pages/events.js index e5509372f78..a4adfb057c7 100644 --- a/pages/events.js +++ b/pages/events.js @@ -1,5 +1,5 @@ import { useState } from "react"; -import { FaListUl, FaMicrophoneAlt } from "react-icons/fa"; +import { FaListUl, FaMicrophoneLines } from "react-icons/fa6"; import { MdOutlineOnlinePrediction, MdOutlinePeople } from "react-icons/md"; import { TbCoin, TbCoinOff } from "react-icons/tb"; @@ -41,7 +41,7 @@ export default function Events({ events }) { title: "CFP open", description: "You can submit a talk to this conference", key: "cfpOpen", - icon: FaMicrophoneAlt, + icon: FaMicrophoneLines, total: categorizedEvents.cfpOpen.length, }, { diff --git a/pages/icons.js b/pages/icons.js index a717289503a..6ec57e53f0c 100644 --- a/pages/icons.js +++ b/pages/icons.js @@ -1,5 +1,5 @@ import { useState } from "react"; -import * as FaIcons from "react-icons/fa"; +import * as FaIcons from "react-icons/fa6"; import * as SiIcons from "react-icons/si"; import Alert from "@components/Alert"; diff --git a/pages/index.js b/pages/index.js index 23822926b3b..c26828542aa 100644 --- a/pages/index.js +++ b/pages/index.js @@ -20,7 +20,7 @@ import ThemedImage from "@components/ThemedImage"; import { serverEnv } from "@config/schemas/serverSchema"; import { BASE_GITHUB_PROJECT_URL, PROJECT_NAME } from "@constants/index"; import Button from "@components/Button"; -import { FaDollarSign, FaGithub, FaLock } from "react-icons/fa"; +import { FaDollarSign, FaGithub, FaLock } from "react-icons/fa6"; export async function getStaticProps() { const pageConfig = config.isr.homepage; @@ -199,6 +199,10 @@ export default function Home({ <> + {alerts.map((alert, index) => ( + + ))} +
@@ -240,10 +244,6 @@ export default function Home({
- {alerts.map((alert, index) => ( - - ))} - { // 3. type in search and check that icons with the name exist and check a name doesn't exist const input = page.locator("[name='keyword']"); await input.type("mobile"); + const results = await page.locator("main ul li").count(); - await expect(page.locator("main ul li")).toHaveCount(defaultIcons); + await expect(results).toBeGreaterThanOrEqual(defaultIcons); }); test("Icon search page has default results when no search term used", async ({ @@ -51,7 +52,8 @@ test("Icon search page shows results after typing 3 characters", async ({ const input = page.locator("[name='keyword']"); await input.type("hand"); + const results = await page.locator("main ul li").count(); await expect(page.locator("main ul li")).toContainText(["hand"]); - await expect(page.locator("main ul li")).toHaveCount(41); + await expect(results).toBeGreaterThanOrEqual(defaultIcons); });