Skip to content
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
1 change: 1 addition & 0 deletions .github/workflows/test-frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ jobs:
run: bun run test:e2e

- name: Upload test reports
if: always()
uses: actions/upload-artifact@v4
with:
name: reports
Expand Down
3 changes: 2 additions & 1 deletion frontend/.prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"plugins": [
"@ianvs/prettier-plugin-sort-imports",
"./node_modules/prettier-plugin-jsdoc/dist/index.js",
"prettier-plugin-css-order"
"prettier-plugin-css-order",
"prettier-plugin-tailwindcss"
],
"importOrder": [
"^react",
Expand Down
94 changes: 93 additions & 1 deletion frontend/bun.lock

Large diffs are not rendered by default.

9 changes: 0 additions & 9 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,6 @@
<meta property="og:title" content="%VITE_TITLE%" />
<meta property="og:description" content="%VITE_DESCRIPTION%" />
<meta property="og:image" content="share.jpg" />

<!-- fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono&family=Poppins:wght@300;400;500&display=swap"
rel="stylesheet"
crossorigin="anonymous"
/>
</head>

<body>
Expand Down
5 changes: 5 additions & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@
"clean": "rm -rf node_modules dist bun.lock && bun pm cache rm"
},
"dependencies": {
"@fontsource-variable/jetbrains-mono": "^5.2.8",
"@fontsource/poppins": "^5.2.7",
"@headlessui/react": "^2.2.4",
"@radix-ui/react-popover": "^1.1.14",
"@radix-ui/react-tabs": "^1.1.12",
"@radix-ui/react-tooltip": "^1.2.7",
"@reactuses/core": "^6.0.5",
"@tailwindcss/vite": "^4.1.18",
"@tanstack/react-query": "^5.81.5",
"@tanstack/react-table": "8.21.3",
"clsx": "^2.1.1",
Expand Down Expand Up @@ -47,6 +50,7 @@
"react-router": "^7.6.3",
"react-time-ago": "^7.3.3",
"seedrandom": "^3.0.5",
"tailwindcss": "^4.1.18",
"ua-parser-js": "^2.0.4"
},
"devDependencies": {
Expand Down Expand Up @@ -81,6 +85,7 @@
"prettier": "^3.6.2",
"prettier-plugin-css-order": "^2.1.2",
"prettier-plugin-jsdoc": "^1.3.3",
"prettier-plugin-tailwindcss": "^0.7.2",
"type-fest": "^4.41.0",
"typescript": "^5.8.3",
"typescript-eslint": "^8.35.1",
Expand Down
10 changes: 5 additions & 5 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import "@/global/theme.css";
import "@/global/styles.css";
import "@/global/text.css";
import "@/global/layout.css";
import "@/global/effects.css";
import "@/styles.css";
import "@fontsource/poppins/300.css";
import "@fontsource/poppins/500.css";
import "@fontsource/poppins/600.css";
import "@fontsource-variable/jetbrains-mono";
import { IconContext } from "react-icons";
import {
createBrowserRouter,
Expand Down
24 changes: 0 additions & 24 deletions frontend/src/components/Alert.module.css

This file was deleted.

16 changes: 13 additions & 3 deletions frontend/src/components/Alert.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
import type { ComponentProps } from "react";
import clsx from "clsx";
import Mark from "@/components/Mark";
import classes from "./Alert.module.css";

/** static box of certain type with icon and text contents */
const Alert = ({ className, ...props }: ComponentProps<typeof Mark>) => {
return <Mark className={clsx(className, classes.alert)} {...props}></Mark>;
const Alert = ({
className,
children,
...props
}: ComponentProps<typeof Mark>) => {
return (
<Mark
className={clsx("max-w-full rounded bg-current/10 p-4", className)}
{...props}
>
<p className="text-black">{children}</p>
</Mark>
);
};

export default Alert;
23 changes: 0 additions & 23 deletions frontend/src/components/AnalysisCard.module.css

This file was deleted.

15 changes: 7 additions & 8 deletions frontend/src/components/AnalysisCard.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import clsx from "clsx";
import type { Analysis } from "@/api/types";
import Ago from "@/components/Ago";
import Link from "@/components/Link";
import Mark, { type Type } from "@/components/Mark";
import classes from "./AnalysisCard.module.css";
import Mark from "@/components/Mark";
import type { Type } from "@/components/Mark";

type Props = {
analysis: Analysis;
Expand All @@ -23,13 +22,13 @@ const AnalysisCard = ({
return (
<Link
to={`/analysis/${id}`}
className={clsx("card", classes.card)}
className="hover:border-accent border-off-white flex flex-col items-start gap-2 rounded border-2 bg-white p-4"
showArrow={false}
>
<div className="bold">{name}</div>
<div className="secondary">{type}</div>
{info && <div className="secondary">{info}</div>}
{started && <Ago className="secondary" date={started} />}
<div className="font-bold">{name}</div>
<div className="text-dark-gray">{type}</div>
{info && <div className="text-dark-gray">{info}</div>}
{started && <Ago className="text-dark-gray" date={started} />}
{status && <Mark type={statusToMark[status.type]}>{status.info}</Mark>}
</Link>
);
Expand Down
6 changes: 0 additions & 6 deletions frontend/src/components/Asterisk.module.css

This file was deleted.

3 changes: 1 addition & 2 deletions frontend/src/components/Asterisk.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { FaAsterisk } from "react-icons/fa6";
import Tooltip from "@/components/Tooltip";
import classes from "./Asterisk.module.css";

/** asterisk for things like required form fields */
const Asterisk = () => (
<Tooltip content="Required">
{/* https://github.com/react-icons/react-icons/issues/336 */}
<span aria-hidden>
<FaAsterisk className={classes.asterisk} />
<FaAsterisk className="text-error relative -ml-1 -translate-y-2 scale-75" />
</span>
</Tooltip>
);
Expand Down
12 changes: 0 additions & 12 deletions frontend/src/components/Badge.module.css

This file was deleted.

9 changes: 7 additions & 2 deletions frontend/src/components/Badge.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { ReactNode } from "react";
import clsx from "clsx";
import classes from "./Badge.module.css";

type Props = {
/** class on badge */
Expand All @@ -14,7 +13,13 @@ type Props = {
* directly.
*/
const Badge = ({ className, children }: Props) => (
<span className={clsx(className, classes.badge)} aria-hidden="true">
<span
className={clsx(
"bg-pale text-deep grid size-[1.5em] place-items-center rounded-full text-[1rem] font-bold",
className,
)}
aria-hidden="true"
>
{children}
</span>
);
Expand Down
57 changes: 0 additions & 57 deletions frontend/src/components/Button.module.css

This file was deleted.

16 changes: 12 additions & 4 deletions frontend/src/components/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import clsx from "clsx";
import { useForm } from "@/components/Form";
import Link from "@/components/Link";
import Tooltip from "@/components/Tooltip";
import classes from "./Button.module.css";

type Props = Base & Description & (_Link | _Button);

Expand All @@ -14,6 +13,8 @@ type Base = {
flip?: boolean;
/** look */
design?: "normal" | "hollow" | "critical";
/** sizing */
size?: "compact" | "normal";
/** class on button */
className?: string;
};
Expand Down Expand Up @@ -49,6 +50,7 @@ const Button = ({
icon,
flip = false,
design = "normal",
size = "normal",
className,
tooltip,
...props
Expand All @@ -67,9 +69,15 @@ const Button = ({
);

/** class name string */
const _class = clsx(className, classes.button, classes[design], {
[classes.square!]: !text && !!icon,
});
const _class = clsx(
"gap-2",
size === "compact" ? "p-1" : "p-3",
!!icon && !text ? "rounded-full" : "rounded",
design === "hollow" && "text-accent hover:text-deep",
design === "normal" && "bg-accent text-white hover:bg-deep outline-accent",
design === "critical" && "bg-black text-white hover:bg-deep outline-black",
className,
);

/** link to parent form component */
const form = useForm();
Expand Down
55 changes: 0 additions & 55 deletions frontend/src/components/Chart.module.css

This file was deleted.

Loading