π₯π₯π₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.
TypeScript boardsbug-trackerdjangodockerganttissue-trackerjirajira-alternativekanbanlinearpostgresqlproduct-managementproject-managementproject-planningpythonreactredistypesciptvitework-management
[WEB-5675] chore: implement `fontsource` as the fonts library (#8398)
Aaryan Khandelwal3876bf054cf5
diff --git a/apps/admin/app/root.tsx b/apps/admin/app/root.tsxindex cbae375398..6ac6531a37 100644--- a/apps/admin/app/root.tsx+++ b/apps/admin/app/root.tsx@@ -10,6 +10,11 @@ import { LogoSpinner } from "@/components/common/logo-spinner";import globalStyles from "@/styles/globals.css?url";import type { Route } from "./+types/root";import { AppProviders } from "./providers";+// fonts+import "@fontsource-variable/inter";+import interVariableWoff2 from "@fontsource-variable/inter/files/inter-latin-wght-normal.woff2?url";+import "@fontsource/material-symbols-rounded";+import "@fontsource/ibm-plex-mono";const APP_TITLE = "Plane | Simple, extensible, open-source project management tool.";const APP_DESCRIPTION =@@ -22,6 +27,13 @@ export const links: LinksFunction = () => [{ rel: "shortcut icon", href: faviconIco },{ rel: "manifest", href: `/site.webmanifest.json` },{ rel: "stylesheet", href: globalStyles },+ {+ rel: "preload",+ href: interVariableWoff2,+ as: "font",+ type: "font/woff2",+ crossOrigin: "anonymous",+ },];export function Layout({ children }: { children: ReactNode }) {diff --git a/apps/admin/package.json b/apps/admin/package.jsonindex 6f6f768824..25f0076f63 100644--- a/apps/admin/package.json+++ b/apps/admin/package.json@@ -19,6 +19,9 @@},"dependencies": {"@bprogress/core": "catalog:",+ "@fontsource-variable/inter": "5.2.8",+ "@fontsource/ibm-plex-mono": "5.2.7",+ "@fontsource/material-symbols-rounded": "5.2.30","@headlessui/react": "^1.7.19","@plane/constants": "workspace:*","@plane/hooks": "workspace:*",diff --git a/apps/admin/styles/globals.css b/apps/admin/styles/globals.cssindex be8c75a0a8..7f7f2483a5 100644--- a/apps/admin/styles/globals.css+++ b/apps/admin/styles/globals.css@@ -1,5 +1,4 @@@import "@plane/tailwind-config/index.css";-@import "@plane/propel/styles/fonts";.shadow-custom {box-shadow: 2px 2px 8px 2px rgba(234, 231, 250, 0.3); /* Convert #EAE7FA4D to rgba */diff --git a/apps/space/app/root.tsx b/apps/space/app/root.tsxindex ad5e8fff22..ca0651042e 100644--- a/apps/space/app/root.tsx+++ b/apps/space/app/root.tsx@@ -13,6 +13,11 @@ import type { Route } from "./+types/root";// local importsimport ErrorPage from "./error";import { AppProviders } from "./providers";+// fonts+import "@fontsource-variable/inter";+import interVariableWoff2 from "@fontsource-variable/inter/files/inter-latin-wght-normal.woff2?url";+import "@fontsource/material-symbols-rounded";+import "@fontsource/ibm-plex-mono";const APP_TITLE = "Plane Publish | Make your Plane boards public with one-click";const APP_DESCRIPTION = "Plane Publish is a customer feedback management tool built on top of plane.so";@@ -24,6 +29,13 @@ export const links: Route.LinksFunction = () => [{ rel: "shortcut icon", href: faviconIco },{ rel: "manifest", href: siteWebmanifest },{ rel: "stylesheet", href: globalStyles },+ {+ rel: "preload",+ href: interVariableWoff2,+ as: "font",+ type: "font/woff2",+ crossOrigin: "anonymous",+ },];export const headers: Route.HeadersFunction = () => ({diff --git a/apps/space/package.json b/apps/space/package.jsonindex 774b08b4b7..f1fef4b763 100644--- a/apps/space/package.json+++ b/apps/space/package.json@@ -18,6 +18,9 @@},"dependencies": {"@bprogress/core": "catalog:",+ "@fontsource-variable/inter": "5.2.8",+ "@fontsource/ibm-plex-mono": "5.2.7",+ "@fontsource/material-symbols-rounded": "5.2.30","@headlessui/react": "^1.7.19","@plane/constants": "workspace:*","@plane/editor": "workspace:*",diff --git a/apps/space/styles/globals.css b/apps/space/styles/globals.cssindex e77a5c236c..ba7f052d19 100644--- a/apps/space/styles/globals.css+++ b/apps/space/styles/globals.css@@ -1,6 +1,5 @@@import "@plane/tailwind-config/index.css";@import "@plane/editor/styles";-@import "@plane/propel/styles/fonts";@import "@plane/propel/styles/react-day-picker.css";@plugin "@tailwindcss/typography";diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsxindex 47acca9984..04a46a2058 100644--- a/apps/web/app/layout.tsx+++ b/apps/web/app/layout.tsx@@ -2,8 +2,6 @@ import Script from "next/script";// stylesimport "@/styles/globals.css";-import "@/styles/power-k.css";-import "@/styles/emoji.css";import { SITE_DESCRIPTION, SITE_NAME } from "@plane/constants";diff --git a/apps/web/app/root.tsx b/apps/web/app/root.tsxindex a525bf3c6c..7ce3d16ff5 100644--- a/apps/web/app/root.tsx+++ b/apps/web/app/root.tsx@@ -20,6 +20,11 @@ import type { Route } from "./+types/root";// localimport { CustomErrorComponent } from "./error";import { AppProvider } from "./provider";+// fonts+import "@fontsource-variable/inter";+import interVariableWoff2 from "@fontsource-variable/inter/files/inter-latin-wght-normal.woff2?url";+import "@fontsource/material-symbols-rounded";+import "@fontsource/ibm-plex-mono";const APP_TITLE = "Plane | Simple, extensible, open-source project management tool.";@@ -33,6 +38,13 @@ export const links: LinksFunction = () => [{ rel: "apple-touch-icon", sizes: "512x512", href: icon512 },{ rel: "manifest", href: "/manifest.json" },{ rel: "stylesheet", href: globalStyles },+ {+ rel: "preload",+ href: interVariableWoff2,+ as: "font",+ type: "font/woff2",+ crossOrigin: "anonymous",+ },];export function Layout({ children }: { children: ReactNode }) {diff --git a/apps/web/package.json b/apps/web/package.jsonindex 22cc125279..f775fd5c06 100644--- a/apps/web/package.json+++ b/apps/web/package.json@@ -21,6 +21,9 @@"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "catalog:","@atlaskit/pragmatic-drag-and-drop-hitbox": "catalog:","@bprogress/core": "catalog:",+ "@fontsource-variable/inter": "5.2.8",+ "@fontsource/ibm-plex-mono": "5.2.7",+ "@fontsource/material-symbols-rounded": "5.2.30","@headlessui/react": "^1.7.19","@intercom/messenger-js-sdk": "^0.0.12","@plane/constants": "workspace:*",diff --git a/apps/web/styles/globals.css b/apps/web/styles/globals.cssindex a2e0df5f42..ab520abe29 100644--- a/apps/web/styles/globals.css+++ b/apps/web/styles/globals.css@@ -1,6 +1,5 @@@import "@plane/tailwind-config/index.css";@import "@plane/editor/styles";-@import "@plane/propel/styles/fonts";@import "@plane/propel/styles/react-day-picker.css";@import "./power-k.css";@import "./emoji.css";diff --git a/packages/propel/.storybook/tailwind.css b/packages/propel/.storybook/tailwind.cssindex baa553f51c..aca4ed08ea 100644--- a/packages/propel/.storybook/tailwind.css+++ b/packages/propel/.storybook/tailwind.css@@ -1,3 +1,2 @@@import "@plane/tailwind-config/index.css";-@import "../src/styles/fonts/index.css";@import "../src/styles/react-day-picker.css";diff --git a/packages/propel/package.json b/packages/propel/package.jsonindex 932081a36c..6ad58c11f6 100644--- a/packages/propel/package.json+++ b/packages/propel/package.json@@ -58,8 +58,6 @@"./tooltip": "./dist/tooltip/index.js","./utils": "./dist/utils/index.js","./package.json": "./package.json",- "./styles/fonts.css": "./dist/styles/fonts/index.css",- "./styles/fonts": "./dist/styles/fonts/index.css","./styles/react-day-picker.css": "./dist/styles/react-day-picker.css","./styles/react-day-picker": "./dist/styles/react-day-picker.css"},diff --git a/packages/propel/src/emoji-icon-picker/logo.tsx b/packages/propel/src/emoji-icon-picker/logo.tsxindex dbed85f58b..117fbec724 100644--- a/packages/propel/src/emoji-icon-picker/logo.tsx+++ b/packages/propel/src/emoji-icon-picker/logo.tsx@@ -34,7 +34,6 @@ export function Logo({ logo, size = 16, type = "material" }: Props) {const value = in_use === "emoji" ? emoji?.value : icon?.name;if (!value) return loadingSkeleton;- if (!isMaterialSymbolsFontLoaded && type === "material") return loadingSkeleton;// Emoji renderingif (in_use === "emoji") {@@ -66,6 +65,8 @@ export function Logo({ logo, size = 16, type = "material" }: Props) {return <LucideIconElement style={{ color, height: size, width: size }} />;}+ if (!isMaterialSymbolsFontLoaded) return loadingSkeleton;+// Material iconreturn (<spandiff --git a/packages/propel/src/styles/fonts/Inter/LICENSE b/packages/propel/src/styles/fonts/Inter/LICENSEdeleted file mode 100644index 46d45c6a1b..0000000000--- a/packages/propel/src/styles/fonts/Inter/LICENSE+++ /dev/null@@ -1 +0,0 @@-Inter[slnt,wght].ttf: Copyright 2020 The Inter Project Authors (https://github.com/rsms/inter)\ No newline at end of filediff --git a/packages/propel/src/styles/fonts/Inter/inter-v13-latin-200.woff2 b/packages/propel/src/styles/fonts/Inter/inter-v13-latin-200.woff2deleted file mode 100644index c59d2397ed..0000000000Binary files a/packages/propel/src/styles/fonts/Inter/inter-v13-latin-200.woff2 and /dev/null differdiff --git a/packages/propel/src/styles/fonts/Inter/inter-v13-latin-300.woff2 b/packages/propel/src/styles/fonts/Inter/inter-v13-latin-300.woff2deleted file mode 100644index 2d99c5bcfa..0000000000Binary files a/packages/propel/src/styles/fonts/Inter/inter-v13-latin-300.woff2 and /dev/null differdiff --git a/packages/propel/src/styles/fonts/Inter/inter-v13-latin-500.woff2 b/packages/propel/src/styles/fonts/Inter/inter-v13-latin-500.woff2deleted file mode 100644index 21db79416d..0000000000Binary files a/packages/propel/src/styles/fonts/Inter/inter-v13-latin-500.woff2 and /dev/null differdiff --git a/packages/propel/src/styles/fonts/Inter/inter-v13-latin-600.woff2 b/packages/propel/src/styles/fonts/Inter/inter-v13-latin-600.woff2deleted file mode 100644index da1c039b75..0000000000Binary files a/packages/propel/src/styles/fonts/Inter/inter-v13-latin-600.woff2 and /dev/null differdiff --git a/packages/propel/src/styles/fonts/Inter/inter-v13-latin-700.woff2 b/packages/propel/src/styles/fonts/Inter/inter-v13-latin-700.woff2deleted file mode 100644index 775f7575e6..0000000000Binary files a/packages/propel/src/styles/fonts/Inter/inter-v13-latin-700.woff2 and /dev/null differdiff --git a/packages/propel/src/styles/fonts/Inter/inter-v13-latin-800.woff2 b/packages/propel/src/styles/fonts/Inter/inter-v13-latin-800.woff2deleted file mode 100644index 39b9673d88..0000000000Binary files a/packages/propel/src/styles/fonts/Inter/inter-v13-latin-800.woff2 and /dev/null differdiff --git a/packages/propel/src/styles/fonts/Inter/inter-v13-latin-regular.woff2 b/packages/propel/src/styles/fonts/Inter/inter-v13-latin-regular.woff2deleted file mode 100644index d228a4af2f..0000000000Binary files a/packages/propel/src/styles/fonts/Inter/inter-v13-latin-regular.woff2 and /dev/null differdiff --git a/packages/propel/src/styles/fonts/Material-Symbols-Rounded/LICENSE b/packages/propel/src/styles/fonts/Material-Symbols-Rounded/LICENSEdeleted file mode 100644index c86ff014ad..0000000000--- a/packages/propel/src/styles/fonts/Material-Symbols-Rounded/LICENSE+++ /dev/null@@ -1 +0,0 @@-MaterialSymbolsRounded[FILL,GRAD,opsz,wght].ttf: Copyright 2022, 2022 Google LLC. All Rights Reserved.diff --git a/packages/propel/src/styles/fonts/Material-Symbols-Rounded/material-symbols-rounded-v168-latin-regular.woff2 b/packages/propel/src/styles/fonts/Material-Symbols-Rounded/material-symbols-rounded-v168-latin-regular.woff2deleted file mode 100644index 03d95f1b04..0000000000Binary files a/packages/propel/src/styles/fonts/Material-Symbols-Rounded/material-symbols-rounded-v168-latin-regular.woff2 and /dev/null differdiff --git a/packages/propel/src/styles/fonts/index.css b/packages/propel/src/styles/fonts/index.cssdeleted file mode 100644index dd5c519aa2..0000000000--- a/packages/propel/src/styles/fonts/index.css+++ /dev/null@@ -1,87 +0,0 @@-/* inter-200 - latin */-@font-face {- font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */- font-family: Inter;- font-style: normal;- font-weight: 200;- src: url("./Inter/inter-v13-latin-200.woff2") format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */-}--/* inter-300 - latin */-@font-face {- font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */- font-family: Inter;- font-style: normal;- font-weight: 300;- src: url("./Inter/inter-v13-latin-300.woff2") format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */-}--/* inter-regular - latin */-@font-face {- font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */- font-family: Inter;- font-style: normal;- font-weight: 400;- src: url("./Inter/inter-v13-latin-regular.woff2") format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */-}--/* inter-500 - latin */-@font-face {- font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */- font-family: Inter;- font-style: normal;- font-weight: 500;- src: url("./Inter/inter-v13-latin-500.woff2") format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */-}--/* inter-600 - latin */-@font-face {- font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */- font-family: Inter;- font-style: normal;- font-weight: 600;- src: url("./Inter/inter-v13-latin-600.woff2") format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */-}--/* inter-700 - latin */-@font-face {- font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */- font-family: Inter;- font-style: normal;- font-weight: 700;- src: url("./Inter/inter-v13-latin-700.woff2") format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */-}--/* inter-800 - latin */-@font-face {- font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */- font-family: Inter;- font-style: normal;- font-weight: 800;- src: url("./Inter/inter-v13-latin-800.woff2") format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */-}--/* material-symbols-rounded-regular - latin */-@font-face {- font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */- font-family: "Material Symbols Rounded";- font-style: normal;- font-weight: 400;- src: url("./Material-Symbols-Rounded/material-symbols-rounded-v168-latin-regular.woff2") format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */-}--.material-symbols-rounded {- font-family: "Material Symbols Rounded";- font-weight: normal;- font-style: normal;- font-size: 24px;- line-height: 1;- letter-spacing: normal;- text-transform: none;- display: inline-block;- white-space: nowrap;- word-wrap: normal;- direction: ltr;- font-feature-settings: "liga";- -webkit-font-smoothing: antialiased;-}diff --git a/packages/propel/tsdown.config.ts b/packages/propel/tsdown.config.tsindex de90fe6f0b..8c3c3d8e7c 100644--- a/packages/propel/tsdown.config.ts+++ b/packages/propel/tsdown.config.ts@@ -44,8 +44,6 @@ export default defineConfig({exports: {customExports: (exports) => ({...exports,- "./styles/fonts.css": "./dist/styles/fonts/index.css",- "./styles/fonts": "./dist/styles/fonts/index.css","./styles/react-day-picker.css": "./dist/styles/react-day-picker.css","./styles/react-day-picker": "./dist/styles/react-day-picker.css",}),diff --git a/packages/tailwind-config/variables.css b/packages/tailwind-config/variables.cssindex fc7c75b83e..b3e87a2890 100644--- a/packages/tailwind-config/variables.css+++ b/packages/tailwind-config/variables.css@@ -830,10 +830,10 @@/* ---------- Font family ---------- */--font-*: initial;--font-heading:- "Inter", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",+ "Inter Variable", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol","Noto Color Emoji";--font-body:- "Inter", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",+ "Inter Variable", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol","Noto Color Emoji";--font-code:"IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;@@ -1134,11 +1134,27 @@@utility scrollbar-hide {-ms-overflow-style: none;scrollbar-width: none;- &::-webkit-scrollbar: {+ &::-webkit-scrollbar {display: none;}}+@utility material-symbols-rounded {+ font-family: "Material Symbols Rounded";+ font-weight: normal;+ font-style: normal;+ font-size: 24px;+ line-height: 1;+ letter-spacing: normal;+ text-transform: none;+ display: inline-block;+ white-space: nowrap;+ word-wrap: normal;+ direction: ltr;+ font-feature-settings: "liga";+ -webkit-font-smoothing: antialiased;+}+/* Tailwind typography plugin overwrites */@utility prose {--tw-prose-body: var(--text-color-primary);diff --git a/packages/ui/styles/globals.css b/packages/ui/styles/globals.cssindex 64fd6ebdff..434ca7f910 100644--- a/packages/ui/styles/globals.css+++ b/packages/ui/styles/globals.css@@ -1,2 +1 @@@import "@plane/tailwind-config/index.css";-@import "@plane/propel/styles/fonts";diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 95b477f47e..c9e6d54d87 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -192,6 +192,15 @@ importers:'@bprogress/core':specifier: 'catalog:'version: 1.3.4+ '@fontsource-variable/inter':+ specifier: 5.2.8+ version: 5.2.8+ '@fontsource/ibm-plex-mono':+ specifier: 5.2.7+ version: 5.2.7+ '@fontsource/material-symbols-rounded':+ specifier: 5.2.30+ version: 5.2.30'@headlessui/react':specifier: ^1.7.19@@ -425,6 +434,15 @@ importers:'@bprogress/core':specifier: 'catalog:'version: 1.3.4+ '@fontsource-variable/inter':+ specifier: 5.2.8+ version: 5.2.8+ '@fontsource/ibm-plex-mono':+ specifier: 5.2.7+ version: 5.2.7+ '@fontsource/material-symbols-rounded':+ specifier: 5.2.30+ version: 5.2.30'@headlessui/react':specifier: ^1.7.19@@ -573,6 +591,15 @@ importers:'@bprogress/core':specifier: 'catalog:'version: 1.3.4+ '@fontsource-variable/inter':+ specifier: 5.2.8+ version: 5.2.8+ '@fontsource/ibm-plex-mono':+ specifier: 5.2.7+ version: 5.2.7+ '@fontsource/material-symbols-rounded':+ specifier: 5.2.30+ version: 5.2.30'@headlessui/react':specifier: ^1.7.19@@ -2095,6 +2122,15 @@ packages:'@floating-ui/[email protected]':resolution: {integrity: sha512-aGTxbpbg8/b5JfU1HXSrbH3wXZuLPJcNEcZQFMxLs3oSzgtVu6nFPkbbGGUvBcUjKV2YyB9Wxxabo+HEH9tcRQ==}+ '@fontsource-variable/[email protected]':+ resolution: {integrity: sha512-kOfP2D+ykbcX/P3IFnokOhVRNoTozo5/JxhAIVYLpea/UBmCQ/YWPBfWIDuBImXX/15KH+eKh4xpEUyS2sQQGQ==}++ '@fontsource/[email protected]':+ resolution: {integrity: sha512-MKAb8qV+CaiMQn2B0dIi1OV3565NYzp3WN5b4oT6LTkk+F0jR6j0ZN+5BKJiIhffDC3rtBULsYZE65+0018z9w==}++ '@fontsource/[email protected]':+ resolution: {integrity: sha512-svIEPUzsJGdBMr0PwLH3wKndh7ZNB8IVlyKZPKvbGEX0f36gpGPzE2EZiXppb4UJgDUnyjphWzjJ28StuK6NCg==}+'@formatjs/[email protected]':resolution: {integrity: sha512-qrycXDeaORzIqNhBOx0btnhpD1c+/qFIHAN9znofuMJX6QBwtbrmlpWfD4oiUUD2vJUOIYFA/gYtg2KAMGG7sA==}@@ -10154,6 +10190,12 @@ snapshots:'@floating-ui/[email protected]': {}+ '@fontsource-variable/[email protected]': {}++ '@fontsource/[email protected]': {}++ '@fontsource/[email protected]': {}+'@formatjs/[email protected]':dependencies:'@formatjs/fast-memoize': 2.2.7