Skip to content

Commit 4263df5

Browse files
committed
add interactive redesign concepts
1 parent ba9c33e commit 4263df5

12 files changed

Lines changed: 5390 additions & 16 deletions

File tree

‎.gitignore‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,7 @@ dev/
4242
## It doesn't contain sensitive data but it's fetched at build time, and
4343
## it may be quite heavy so there is no point in keeping it committed to the repository.
4444
public/fetched
45+
46+
# Local deployment and TypeScript build state
47+
.vercel
48+
*.tsbuildinfo

‎package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"prebuild": "npm run fetch-data",
99
"build": "vite build",
1010
"build:dev": "vite build --mode development",
11+
"build:preview": "vite build",
1112
"fetch-data": "node scripts/fetch-officers-fa25.js && node scripts/fetch-officers-notion.js",
1213
"lint": "eslint .",
1314
"preview": "vite preview"

‎src/App.tsx‎

Lines changed: 89 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import { Toaster } from "@/components/ui/toaster";
22
import { Toaster as Sonner } from "@/components/ui/sonner";
33
import { TooltipProvider } from "@/components/ui/tooltip";
44
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
5-
import { BrowserRouter, Routes, Route } from "react-router-dom";
5+
import { lazy, Suspense } from "react";
6+
import { BrowserRouter, Routes, Route, useLocation } from "react-router-dom";
67
import Navigation from "./components/Navigation";
78
import Footer from "./components/Footer";
89
import Home from "./pages/Home";
@@ -12,30 +13,102 @@ import Collaborations from "./pages/Collaborations";
1213
import Officers from "./pages/Officers";
1314
import SignUp from "./pages/SignUp";
1415
import NotFound from "./pages/NotFound";
16+
import {
17+
ConceptFrame,
18+
ConceptReviewHome,
19+
} from "./concepts/ConceptReview";
20+
21+
const ResearchEditorial = lazy(
22+
() => import("./concepts/research-editorial/ResearchEditorial"),
23+
);
24+
const LabNotebook = lazy(
25+
() => import("./concepts/lab-notebook/LabNotebook"),
26+
);
27+
const BioNetwork = lazy(
28+
() => import("./concepts/bio-network/BioNetwork"),
29+
);
1530

1631
const queryClient = new QueryClient();
1732

33+
const StandardSite = () => (
34+
<div className="flex flex-col min-h-screen">
35+
<Navigation />
36+
<main className="flex-1">
37+
<Routes>
38+
<Route path="/" element={<Home />} />
39+
<Route path="/about" element={<About />} />
40+
<Route path="/calendar" element={<Calendar />} />
41+
<Route path="/collaborations" element={<Collaborations />} />
42+
<Route path="/officers" element={<Officers />} />
43+
<Route path="/signup" element={<SignUp />} />
44+
<Route path="*" element={<NotFound />} />
45+
</Routes>
46+
</main>
47+
<Footer />
48+
</div>
49+
);
50+
51+
const ConceptLoading = () => (
52+
<div className="concept-loading" role="status" aria-live="polite">
53+
<div className="concept-loading-line concept-loading-line-wide" />
54+
<div className="concept-loading-line" />
55+
<span>Loading design direction</span>
56+
</div>
57+
);
58+
59+
const ConceptSite = () => (
60+
<Routes>
61+
<Route path="/concepts" element={<ConceptReviewHome />} />
62+
<Route
63+
path="/concepts/research-editorial"
64+
element={
65+
<ConceptFrame activeId="research-editorial">
66+
<Suspense fallback={<ConceptLoading />}>
67+
<ResearchEditorial />
68+
</Suspense>
69+
</ConceptFrame>
70+
}
71+
/>
72+
<Route
73+
path="/concepts/lab-notebook"
74+
element={
75+
<ConceptFrame activeId="lab-notebook">
76+
<Suspense fallback={<ConceptLoading />}>
77+
<LabNotebook />
78+
</Suspense>
79+
</ConceptFrame>
80+
}
81+
/>
82+
<Route
83+
path="/concepts/bio-network"
84+
element={
85+
<ConceptFrame activeId="bio-network">
86+
<Suspense fallback={<ConceptLoading />}>
87+
<BioNetwork />
88+
</Suspense>
89+
</ConceptFrame>
90+
}
91+
/>
92+
<Route path="*" element={<ConceptReviewHome />} />
93+
</Routes>
94+
);
95+
96+
const AppRoutes = () => {
97+
const location = useLocation();
98+
return location.pathname.startsWith("/concepts") ? (
99+
<ConceptSite />
100+
) : (
101+
<StandardSite />
102+
);
103+
};
104+
18105
const App = () => (
19106
<QueryClientProvider client={queryClient}>
20107
<TooltipProvider>
21108
<Toaster />
22109
<Sonner />
23110
<BrowserRouter>
24-
<div className="flex flex-col min-h-screen">
25-
<Navigation />
26-
<main className="flex-1">
27-
<Routes>
28-
<Route path="/" element={<Home />} />
29-
<Route path="/about" element={<About />} />
30-
<Route path="/calendar" element={<Calendar />} />
31-
<Route path="/collaborations" element={<Collaborations />} />
32-
<Route path="/officers" element={<Officers />} />
33-
<Route path="/signup" element={<SignUp />} />
34-
<Route path="*" element={<NotFound />} />
35-
</Routes>
36-
</main>
37-
<Footer />
38-
</div>
111+
<AppRoutes />
39112
</BrowserRouter>
40113
</TooltipProvider>
41114
</QueryClientProvider>

‎src/concepts/ConceptReview.tsx‎

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
import { ArrowRight, ExternalLink } from "lucide-react";
2+
import type { ReactNode } from "react";
3+
import "./concept-review.css";
4+
5+
const conceptLinks = [
6+
{
7+
id: "research-editorial",
8+
number: "01",
9+
title: "Research Editorial",
10+
summary:
11+
"A calm, evidence-led direction that makes events, projects, and people easier to scan.",
12+
dials: "Variance 6 / Motion 4 / Density 4",
13+
},
14+
{
15+
id: "lab-notebook",
16+
number: "02",
17+
title: "Lab Notebook",
18+
summary:
19+
"A more student-led direction with a tactile campus bulletin rhythm and fast paths into club life.",
20+
dials: "Variance 8 / Motion 5 / Density 5",
21+
},
22+
{
23+
id: "bio-network",
24+
number: "03",
25+
title: "Bio Network",
26+
summary:
27+
"An image-led, immersive direction that frames the organization as a connected living research community.",
28+
dials: "Variance 7 / Motion 6 / Density 4",
29+
},
30+
];
31+
32+
export const ConceptReviewHome = () => {
33+
return (
34+
<main className="concept-review-home">
35+
<section className="concept-review-intro">
36+
<a className="concept-review-back" href="/">
37+
Current site
38+
<ExternalLink aria-hidden="true" />
39+
</a>
40+
<p className="concept-review-kicker">Comp Bio at Berkeley redesign</p>
41+
<h1>Three directions to compare in the browser.</h1>
42+
<p className="concept-review-lede">
43+
Each skeleton uses the same content structure so the layout, tone, and
44+
interaction differences stay easy to judge.
45+
</p>
46+
</section>
47+
48+
<section className="concept-review-list" aria-label="Design directions">
49+
{conceptLinks.map((concept) => (
50+
<a
51+
className="concept-review-item"
52+
href={`/concepts/${concept.id}`}
53+
key={concept.id}
54+
>
55+
<span className="concept-review-number">{concept.number}</span>
56+
<span className="concept-review-copy">
57+
<strong>{concept.title}</strong>
58+
<span>{concept.summary}</span>
59+
</span>
60+
<span className="concept-review-dials">{concept.dials}</span>
61+
<ArrowRight className="concept-review-arrow" aria-hidden="true" />
62+
</a>
63+
))}
64+
</section>
65+
66+
<aside className="concept-review-note">
67+
<strong>What to evaluate</strong>
68+
<p>
69+
Which direction makes you want to join, attend an event, or trust the
70+
group with a research collaboration?
71+
</p>
72+
</aside>
73+
</main>
74+
);
75+
};
76+
77+
interface ConceptFrameProps {
78+
activeId: string;
79+
children: ReactNode;
80+
}
81+
82+
export const ConceptFrame = ({ activeId, children }: ConceptFrameProps) => {
83+
return (
84+
<div className="concept-frame">
85+
<header className="concept-switcher">
86+
<a className="concept-switcher-home" href="/concepts">
87+
Review all
88+
</a>
89+
<nav aria-label="Switch design concept">
90+
{conceptLinks.map((concept) => (
91+
<a
92+
aria-current={activeId === concept.id ? "page" : undefined}
93+
href={`/concepts/${concept.id}`}
94+
key={concept.id}
95+
>
96+
<span>{concept.number}</span>
97+
<strong>{concept.title}</strong>
98+
</a>
99+
))}
100+
</nav>
101+
</header>
102+
<div className="concept-frame-content">{children}</div>
103+
</div>
104+
);
105+
};

0 commit comments

Comments
 (0)