Skip to content

Commit a9ad618

Browse files
authored
fix: fa component breaking font-subset (@Miodec) (#7446)
1 parent 2635d12 commit a9ad618

13 files changed

Lines changed: 1666 additions & 1664 deletions

File tree

frontend/__tests__/components/Button.spec.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ describe("Button component", () => {
5252
//
5353
}}
5454
fa={{
55-
icon: "keyboard",
55+
icon: "fa-keyboard",
5656
}}
5757
/>
5858
));
@@ -70,7 +70,7 @@ describe("Button component", () => {
7070
//
7171
}}
7272
fa={{
73-
icon: "keyboard",
73+
icon: "fa-keyboard",
7474
fixedWidth: true,
7575
}}
7676
/>
@@ -88,7 +88,7 @@ describe("Button component", () => {
8888
}}
8989
fa={{
9090
fixedWidth: true,
91-
icon: "keyboard",
91+
icon: "fa-keyboard",
9292
}}
9393
text="Hello"
9494
/>
@@ -105,7 +105,7 @@ describe("Button component", () => {
105105
//
106106
}}
107107
fa={{
108-
icon: "keyboard",
108+
icon: "fa-keyboard",
109109
}}
110110
text="Hello"
111111
/>

frontend/src/ts/components/common/AsyncContent.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default function AsyncContent<T>(
5252
<>
5353
<Show when={p.showLoader && props.resource.loading}>
5454
<div class="preloader text-main p-4 text-center text-2xl">
55-
<Fa icon="circle-notch" fixedWidth spin />
55+
<Fa icon="fa-circle-notch" fixedWidth spin />
5656
</div>
5757
</Show>
5858
{p.children(value())}
@@ -66,7 +66,7 @@ export default function AsyncContent<T>(
6666
<Suspense
6767
fallback={
6868
<div class="preloader text-main p-4 text-center text-2xl">
69-
<Fa icon="circle-notch" fixedWidth spin />
69+
<Fa icon="fa-circle-notch" fixedWidth spin />
7070
</div>
7171
}
7272
>

frontend/src/ts/components/common/Fa.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function Fa(props: FaProps): JSXElement {
1212
const variant = (): string => props.variant ?? "solid";
1313
return (
1414
<i
15-
class={`fa-${props.icon}`}
15+
class={props.icon}
1616
classList={{
1717
["fas"]: variant() === "solid",
1818
["far"]: variant() === "regular",

frontend/src/ts/components/layout/footer/Footer.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function Footer(): JSXElement {
2929
type="text"
3030
text="contact"
3131
fa={{
32-
icon: "envelope",
32+
icon: "fa-envelope",
3333
fixedWidth: true,
3434
}}
3535
onClick={() => showModal("Contact")}
@@ -38,7 +38,7 @@ export function Footer(): JSXElement {
3838
type="text"
3939
text="support"
4040
fa={{
41-
icon: "donate",
41+
icon: "fa-donate",
4242
fixedWidth: true,
4343
}}
4444
onClick={() => showModal("Support")}
@@ -47,7 +47,7 @@ export function Footer(): JSXElement {
4747
type="text"
4848
text="github"
4949
fa={{
50-
icon: "code",
50+
icon: "fa-code",
5151
fixedWidth: true,
5252
}}
5353
href="https://github.com/monkeytypegame/monkeytype"
@@ -56,7 +56,7 @@ export function Footer(): JSXElement {
5656
type="text"
5757
text="discord"
5858
fa={{
59-
icon: "discord",
59+
icon: "fa-discord",
6060
variant: "brand",
6161
fixedWidth: true,
6262
}}
@@ -66,7 +66,7 @@ export function Footer(): JSXElement {
6666
type="text"
6767
text="twitter"
6868
fa={{
69-
icon: "twitter",
69+
icon: "fa-twitter",
7070
variant: "brand",
7171
fixedWidth: true,
7272
}}
@@ -76,7 +76,7 @@ export function Footer(): JSXElement {
7676
type="text"
7777
text="terms"
7878
fa={{
79-
icon: "file-contract",
79+
icon: "fa-file-contract",
8080
fixedWidth: true,
8181
}}
8282
href="/terms-of-service.html"
@@ -86,7 +86,7 @@ export function Footer(): JSXElement {
8686
type="text"
8787
text="security"
8888
fa={{
89-
icon: "shield-alt",
89+
icon: "fa-shield-alt",
9090
fixedWidth: true,
9191
}}
9292
/>
@@ -95,7 +95,7 @@ export function Footer(): JSXElement {
9595
type="text"
9696
text="privacy"
9797
fa={{
98-
icon: "lock",
98+
icon: "fa-lock",
9999
fixedWidth: true,
100100
}}
101101
/>

frontend/src/ts/components/layout/footer/ScrollToTop.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export function ScrollToTop(): JSXElement {
4343
});
4444
}}
4545
>
46-
<Fa icon="angle-double-up" />
46+
<Fa icon="fa-angle-double-up" />
4747
</button>
4848
</div>
4949
);

frontend/src/ts/components/layout/footer/ThemeIndicator.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ export function ThemeIndicator(): JSXElement {
4343
<div class="relative">
4444
<Show when={getThemeIndicator().isFavorite}>
4545
<div class="bg-bg absolute top-[-0.5em] right-[-0.5em] flex rounded-full p-[0.25em]">
46-
<Fa icon="star" size={0.5} />
46+
<Fa icon="fa-star" size={0.5} />
4747
</div>
4848
</Show>
49-
<Fa icon="palette" fixedWidth />
49+
<Fa icon="fa-palette" fixedWidth />
5050
</div>
5151
<div class="text">{getThemeIndicator().text}</div>
5252
</button>

frontend/src/ts/components/layout/footer/VersionButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export function VersionButton(): JSXElement {
4646

4747
return (
4848
<button type="button" class="textButton flex" onClick={handleClick}>
49-
<Fa icon="code-branch" fixedWidth />
49+
<Fa icon="fa-code-branch" fixedWidth />
5050
<div class="text">{getVersionText()}</div>
5151
<Show when={showNewIndicator()}>
5252
<div

frontend/src/ts/components/layout/overlays/Banners.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function Banner(props: BannerType): JSXElement {
6666
remove();
6767
}}
6868
>
69-
<Fa icon="times" fixedWidth />
69+
<Fa icon="fa-times" fixedWidth />
7070
</button>
7171
}
7272
/>
@@ -96,7 +96,7 @@ export function Banners(): JSXElement {
9696
createEffectOn(() => getBanners().length, setGlobalOffsetSignal);
9797

9898
return (
99-
<div ref={ref} class="fixed top-0 left-0 z-[1000] w-full">
99+
<div ref={ref} class="fixed top-0 left-0 z-1000 w-full">
100100
<For each={getBanners()}>{(banner) => <Banner {...banner} />}</For>
101101
</div>
102102
);

frontend/src/ts/components/layout/overlays/Overlays.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function Overlays(): JSXElement {
2929
}}
3030
tabIndex="-1"
3131
>
32-
<Fa icon="terminal" />
32+
<Fa icon="fa-terminal" />
3333
</button>
3434
<Banners />
3535
<MediaQueryDebugger />

frontend/src/ts/components/modals/ContactModal.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ export function ContactModal(): JSXElement {
2525
text="Question"
2626
class={buttonClass}
2727
fa={{
28-
icon: "question-circle",
28+
icon: "fa-question-circle",
2929
fixedWidth: true,
3030
}}
3131
/>
3232
<Button
3333
type="button"
3434
href="mailto:contact@monkeytype.com?subject=[Feedback] "
3535
fa={{
36-
icon: "comment-dots",
36+
icon: "fa-comment-dots",
3737
fixedWidth: true,
3838
}}
3939
text="Feedback"
@@ -43,7 +43,7 @@ export function ContactModal(): JSXElement {
4343
type="button"
4444
href="mailto:support@monkeytype.com?subject=[Bug] "
4545
fa={{
46-
icon: "bug",
46+
icon: "fa-bug",
4747
fixedWidth: true,
4848
}}
4949
text="Bug Report"
@@ -53,7 +53,7 @@ export function ContactModal(): JSXElement {
5353
type="button"
5454
href="mailto:support@monkeytype.com?subject=[Account] "
5555
fa={{
56-
icon: "user-circle",
56+
icon: "fa-user-circle",
5757
fixedWidth: true,
5858
}}
5959
text="Account Help"
@@ -63,7 +63,7 @@ export function ContactModal(): JSXElement {
6363
type="button"
6464
href="mailto:jack@monkeytype.com?subject=[Business] "
6565
fa={{
66-
icon: "briefcase",
66+
icon: "fa-briefcase",
6767
fixedWidth: true,
6868
}}
6969
text="Business Inquiry"
@@ -73,7 +73,7 @@ export function ContactModal(): JSXElement {
7373
type="button"
7474
href="mailto:contact@monkeytype.com?subject=[Other] "
7575
fa={{
76-
icon: "ellipsis-h",
76+
icon: "fa-ellipsis-h",
7777
fixedWidth: true,
7878
}}
7979
text="Other"

0 commit comments

Comments
 (0)