Skip to content

Commit db5ba48

Browse files
committed
feat(nav): split quiz into its own page; rename Learn→Tutor, Gradebook→Grades
- Add /quiz route and standalone Quiz screen (previously a mode inside /learn) - Add /notetaker and refresh /course-planner with "coming soon" placeholders - Sidebar/TopNav: Learn→Tutor, Gradebook→Grades; new icons for Quiz (flask), Grades (star), Course Planner (new planner glyph) - Strip quiz mode plumbing from Learn screen and drop breadcrumbs above the start-a-session and quiz entry pages - npm install to resolve missing papaparse dep (lockfile prune)
1 parent 9de077e commit db5ba48

14 files changed

Lines changed: 226 additions & 612 deletions

File tree

frontend/package-lock.json

Lines changed: 0 additions & 536 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,49 @@
11
"use client";
22
import { TopBar } from "@/components/TopBar";
3+
import { Icon } from "@/components/Icon";
34

45
export default function CoursePlannerPage() {
56
return (
6-
<>
7+
<div style={{ display: "flex", height: "100vh", flexDirection: "column" }}>
78
<TopBar title="Course Planner" />
8-
<main style={{ padding: 32 }} />
9-
</>
9+
<main
10+
style={{
11+
flex: 1,
12+
display: "flex",
13+
flexDirection: "column",
14+
alignItems: "center",
15+
justifyContent: "center",
16+
padding: 32,
17+
gap: 14,
18+
textAlign: "center",
19+
}}
20+
>
21+
<div
22+
style={{
23+
display: "inline-flex",
24+
alignItems: "center",
25+
gap: 8,
26+
padding: "6px 14px",
27+
borderRadius: "var(--r-full)",
28+
background: "var(--accent-soft)",
29+
color: "var(--accent)",
30+
fontSize: 12,
31+
fontWeight: 600,
32+
letterSpacing: "0.06em",
33+
textTransform: "uppercase",
34+
}}
35+
>
36+
<Icon name="sparkle" size={12} />
37+
Coming soon
38+
</div>
39+
<div className="h-serif" style={{ fontSize: 28, fontWeight: 500 }}>
40+
Course Planner
41+
</div>
42+
<div style={{ color: "var(--text-dim)", fontSize: 14, maxWidth: 480, lineHeight: 1.55 }}>
43+
Plan semesters, map prerequisites, and project your degree timeline. We&apos;re still
44+
building it — check back soon.
45+
</div>
46+
</main>
47+
</div>
1048
);
1149
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
"use client";
2+
import { TopBar } from "@/components/TopBar";
3+
import { Icon } from "@/components/Icon";
4+
5+
export default function NotetakerPage() {
6+
return (
7+
<div style={{ display: "flex", height: "100vh", flexDirection: "column" }}>
8+
<TopBar title="Notetaker" />
9+
<main
10+
style={{
11+
flex: 1,
12+
display: "flex",
13+
flexDirection: "column",
14+
alignItems: "center",
15+
justifyContent: "center",
16+
padding: 32,
17+
gap: 14,
18+
textAlign: "center",
19+
}}
20+
>
21+
<div
22+
style={{
23+
display: "inline-flex",
24+
alignItems: "center",
25+
gap: 8,
26+
padding: "6px 14px",
27+
borderRadius: "var(--r-full)",
28+
background: "var(--accent-soft)",
29+
color: "var(--accent)",
30+
fontSize: 12,
31+
fontWeight: 600,
32+
letterSpacing: "0.06em",
33+
textTransform: "uppercase",
34+
}}
35+
>
36+
<Icon name="sparkle" size={12} />
37+
Coming soon
38+
</div>
39+
<div className="h-serif" style={{ fontSize: 28, fontWeight: 500 }}>
40+
Notetaker
41+
</div>
42+
<div style={{ color: "var(--text-dim)", fontSize: 14, maxWidth: 480, lineHeight: 1.55 }}>
43+
Capture lecture notes, link them to concepts in your knowledge graph, and let
44+
Sapling turn them into review material. We&apos;re still building it — check back
45+
soon.
46+
</div>
47+
</main>
48+
</div>
49+
);
50+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { Quiz } from "@/components/screens/Quiz";
2+
3+
export default function QuizPage() {
4+
return <Quiz />;
5+
}

frontend/src/components/Icon.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ const paths: Record<string, string | IconSpec> = {
9999
pencil: "M12 20h9M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z",
100100
palette: "M12 22a10 10 0 1 1 10-10c0 2-1 3-3 3h-2a2 2 0 0 0-1 4 2 2 0 0 1-1 3 7 7 0 0 1-3 0",
101101
heart: "M20.8 4.6a5.5 5.5 0 0 0-7.8 0L12 5.6l-1-1a5.5 5.5 0 1 0-7.8 7.8l1 1L12 21l7.8-7.8 1-1a5.5 5.5 0 0 0 0-7.6z",
102+
planner: "M9 4h6a1 1 0 0 1 1 1v1H8V5a1 1 0 0 1 1-1zM16 6h2a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h2M9 11l1 1 2-2M9 16l1 1 2-2M14.5 11h2.5M14.5 16h2.5",
102103
};
103104

104105
export function Icon({ name, size = 16 }: { name: string; size?: number }) {

frontend/src/components/QuizPanel.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,12 @@ export function QuizPanel({ userId, concepts, initialConceptId, onExit }: QuizPa
152152

153153
return (
154154
<div
155-
className="card"
156155
style={{
157-
padding: "var(--pad-xl)",
158156
display: "flex",
159157
flexDirection: "column",
160-
gap: 18,
161-
maxWidth: 680,
158+
gap: 22,
159+
width: "100%",
160+
maxWidth: 880,
162161
}}
163162
>
164163
{phase === "select" && (

frontend/src/components/SideNav.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ const SECTIONS: { label: string; items: Entry[] }[] = [
1414
label: "Learn",
1515
items: [
1616
{ href: "/dashboard", label: "Dashboard", icon: "home" },
17-
{ href: "/learn", label: "Learn", icon: "brain" },
17+
{ href: "/learn", label: "Tutor", icon: "brain" },
18+
{ href: "/quiz", label: "Quiz", icon: "flask" },
1819
{ href: "/tree", label: "Tree", icon: "tree" },
1920
{ href: "/study", label: "Study", icon: "bolt" },
2021
],
@@ -36,8 +37,9 @@ const SECTIONS: { label: string; items: Entry[] }[] = [
3637
{
3738
label: "Tools",
3839
items: [
39-
{ href: "/gradebook", label: "Gradebook", icon: "doc" },
40-
{ href: "/course-planner", label: "Course Planner", icon: "pencil" },
40+
{ href: "/gradebook", label: "Grades", icon: "star" },
41+
{ href: "/notetaker", label: "Notetaker", icon: "pencil" },
42+
{ href: "/course-planner", label: "Course Planner", icon: "planner" },
4143
],
4244
},
4345
];

frontend/src/components/TopNav.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ type Entry = { href: string; label: string };
3232

3333
const LINKS: Entry[] = [
3434
{ href: "/dashboard", label: "Dashboard" },
35-
{ href: "/learn", label: "Learn" },
35+
{ href: "/learn", label: "Tutor" },
36+
{ href: "/quiz", label: "Quiz" },
3637
{ href: "/tree", label: "Tree" },
3738
{ href: "/study", label: "Study" },
3839
{ href: "/library", label: "Library" },

frontend/src/components/screens/Dashboard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ export function Dashboard() {
714714
<strong>Try this next:</strong> {suggestNode.name}
715715
{suggestNode.subject && <span style={{ color: "var(--text-dim)" }}> · {suggestNode.subject}</span>}
716716
</div>
717-
<button className="btn btn--sm btn--primary" onClick={() => router.push(`/learn?topic=${encodeURIComponent(suggestNode.name)}&mode=quiz`)}>
717+
<button className="btn btn--sm btn--primary" onClick={() => router.push(`/quiz?topic=${encodeURIComponent(suggestNode.name)}`)}>
718718
Start quiz
719719
</button>
720720
<button className="btn btn--sm btn--ghost" onClick={dismissSuggest}>Dismiss</button>
@@ -938,7 +938,7 @@ export function Dashboard() {
938938
</button>
939939
))}
940940
<div style={{ display: "flex", gap: 6, marginTop: 10 }}>
941-
<button className="btn btn--sm btn--primary" style={{ flex: 1 }} onClick={() => router.push("/learn?mode=quiz")}>
941+
<button className="btn btn--sm btn--primary" style={{ flex: 1 }} onClick={() => router.push("/quiz")}>
942942
<Icon name="bolt" size={12} /> Quick quiz
943943
</button>
944944
<button className="btn btn--sm" style={{ flex: 1 }} onClick={() => router.push("/social")}>

frontend/src/components/screens/Gradebook/Landing.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export function GradebookLanding() {
4949
return (
5050
<>
5151
<TopBar
52-
title="Gradebook"
52+
title="Grades"
5353
actions={
5454
<button
5555
type="button"

0 commit comments

Comments
 (0)