Skip to content

Commit 3876bf0

Browse files
authored
[WEB-5675] chore: implement fontsource as the fonts library (#8398)
1 parent df69886 commit 3876bf0

28 files changed

+108
-104
lines changed

apps/admin/app/root.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ import { LogoSpinner } from "@/components/common/logo-spinner";
1010
import globalStyles from "@/styles/globals.css?url";
1111
import type { Route } from "./+types/root";
1212
import { AppProviders } from "./providers";
13+
// fonts
14+
import "@fontsource-variable/inter";
15+
import interVariableWoff2 from "@fontsource-variable/inter/files/inter-latin-wght-normal.woff2?url";
16+
import "@fontsource/material-symbols-rounded";
17+
import "@fontsource/ibm-plex-mono";
1318

1419
const APP_TITLE = "Plane | Simple, extensible, open-source project management tool.";
1520
const APP_DESCRIPTION =
@@ -22,6 +27,13 @@ export const links: LinksFunction = () => [
2227
{ rel: "shortcut icon", href: faviconIco },
2328
{ rel: "manifest", href: `/site.webmanifest.json` },
2429
{ rel: "stylesheet", href: globalStyles },
30+
{
31+
rel: "preload",
32+
href: interVariableWoff2,
33+
as: "font",
34+
type: "font/woff2",
35+
crossOrigin: "anonymous",
36+
},
2537
];
2638

2739
export function Layout({ children }: { children: ReactNode }) {

apps/admin/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
},
2020
"dependencies": {
2121
"@bprogress/core": "catalog:",
22+
"@fontsource-variable/inter": "5.2.8",
23+
"@fontsource/ibm-plex-mono": "5.2.7",
24+
"@fontsource/material-symbols-rounded": "5.2.30",
2225
"@headlessui/react": "^1.7.19",
2326
"@plane/constants": "workspace:*",
2427
"@plane/hooks": "workspace:*",

apps/admin/styles/globals.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
@import "@plane/tailwind-config/index.css";
2-
@import "@plane/propel/styles/fonts";
32

43
.shadow-custom {
54
box-shadow: 2px 2px 8px 2px rgba(234, 231, 250, 0.3); /* Convert #EAE7FA4D to rgba */

apps/space/app/root.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ import type { Route } from "./+types/root";
1313
// local imports
1414
import ErrorPage from "./error";
1515
import { AppProviders } from "./providers";
16+
// fonts
17+
import "@fontsource-variable/inter";
18+
import interVariableWoff2 from "@fontsource-variable/inter/files/inter-latin-wght-normal.woff2?url";
19+
import "@fontsource/material-symbols-rounded";
20+
import "@fontsource/ibm-plex-mono";
1621

1722
const APP_TITLE = "Plane Publish | Make your Plane boards public with one-click";
1823
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 = () => [
2429
{ rel: "shortcut icon", href: faviconIco },
2530
{ rel: "manifest", href: siteWebmanifest },
2631
{ rel: "stylesheet", href: globalStyles },
32+
{
33+
rel: "preload",
34+
href: interVariableWoff2,
35+
as: "font",
36+
type: "font/woff2",
37+
crossOrigin: "anonymous",
38+
},
2739
];
2840

2941
export const headers: Route.HeadersFunction = () => ({

apps/space/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
},
1919
"dependencies": {
2020
"@bprogress/core": "catalog:",
21+
"@fontsource-variable/inter": "5.2.8",
22+
"@fontsource/ibm-plex-mono": "5.2.7",
23+
"@fontsource/material-symbols-rounded": "5.2.30",
2124
"@headlessui/react": "^1.7.19",
2225
"@plane/constants": "workspace:*",
2326
"@plane/editor": "workspace:*",

apps/space/styles/globals.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
@import "@plane/tailwind-config/index.css";
22
@import "@plane/editor/styles";
3-
@import "@plane/propel/styles/fonts";
43
@import "@plane/propel/styles/react-day-picker.css";
54
@plugin "@tailwindcss/typography";
65

apps/web/app/layout.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import Script from "next/script";
22

33
// styles
44
import "@/styles/globals.css";
5-
import "@/styles/power-k.css";
6-
import "@/styles/emoji.css";
75

86
import { SITE_DESCRIPTION, SITE_NAME } from "@plane/constants";
97

apps/web/app/root.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ import type { Route } from "./+types/root";
2020
// local
2121
import { CustomErrorComponent } from "./error";
2222
import { AppProvider } from "./provider";
23+
// fonts
24+
import "@fontsource-variable/inter";
25+
import interVariableWoff2 from "@fontsource-variable/inter/files/inter-latin-wght-normal.woff2?url";
26+
import "@fontsource/material-symbols-rounded";
27+
import "@fontsource/ibm-plex-mono";
2328

2429
const APP_TITLE = "Plane | Simple, extensible, open-source project management tool.";
2530

@@ -33,6 +38,13 @@ export const links: LinksFunction = () => [
3338
{ rel: "apple-touch-icon", sizes: "512x512", href: icon512 },
3439
{ rel: "manifest", href: "/manifest.json" },
3540
{ rel: "stylesheet", href: globalStyles },
41+
{
42+
rel: "preload",
43+
href: interVariableWoff2,
44+
as: "font",
45+
type: "font/woff2",
46+
crossOrigin: "anonymous",
47+
},
3648
];
3749

3850
export function Layout({ children }: { children: ReactNode }) {

apps/web/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "catalog:",
2222
"@atlaskit/pragmatic-drag-and-drop-hitbox": "catalog:",
2323
"@bprogress/core": "catalog:",
24+
"@fontsource-variable/inter": "5.2.8",
25+
"@fontsource/ibm-plex-mono": "5.2.7",
26+
"@fontsource/material-symbols-rounded": "5.2.30",
2427
"@headlessui/react": "^1.7.19",
2528
"@intercom/messenger-js-sdk": "^0.0.12",
2629
"@plane/constants": "workspace:*",

apps/web/styles/globals.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
@import "@plane/tailwind-config/index.css";
22
@import "@plane/editor/styles";
3-
@import "@plane/propel/styles/fonts";
43
@import "@plane/propel/styles/react-day-picker.css";
54
@import "./power-k.css";
65
@import "./emoji.css";

0 commit comments

Comments
 (0)