Skip to content

Commit d6724e6

Browse files
NiallJoeMaherclaude
andcommitted
feat(relaunch): responsiveness pass — hamburger + slide-out NavDrawer (diff #4)
- TopBar: mobile hamburger (.nav-burger ≤720px) + flexible grid (auto/1fr/auto) so the centered search shrinks instead of overflowing; ⌘K kbd hidden ≤560px - NavDrawer (new): left slide-out drawer (panel + fading backdrop, Esc/backdrop/ link-close) holding nav + Your topics + footer links — replaces the left rail ≤720px. Removed the bottom MobileNav tab bar (+ .app-mobilenav CSS); sign-in bar shows on mobile again - Settings: Topics editor in the Profile tab (chips + Edit → TopicsModal) so topics are reachable on mobile - Auth: split collapses to one column ≤860px (brand panel hidden, logo above form) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 420e063 commit d6724e6

8 files changed

Lines changed: 288 additions & 109 deletions

File tree

app/(app)/settings/_client.tsx

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ import { Avatar } from "@/components/ui-components/avatar";
1717
import { Input } from "@/components/ui-components/input";
1818
import { ErrorMessage } from "@/components/ui-components/fieldset";
1919
import { Textarea } from "@/components/ui-components/textarea";
20-
import { ReferralCard } from "@/components/ds";
20+
import { ReferralCard, Tag } from "@/components/ds";
21+
import { useShellActions } from "@/components/Create/ShellActionsProvider";
2122
import { useTheme } from "next-themes";
2223

2324
/** Mint switch — rounded-full track, knob slides left→right when on. */
@@ -145,6 +146,10 @@ const Settings = ({ profile }: { profile: User }) => {
145146
url: profile.image,
146147
});
147148

149+
const { openTopics } = useShellActions();
150+
const { data: interestsData } = api.profile.myInterests.useQuery();
151+
const myTopics = interestsData?.topics ?? [];
152+
148153
const { mutate, isError, isSuccess } = api.profile.edit.useMutation();
149154
const { mutate: getUploadUrl } = api.profile.getUploadUrl.useMutation();
150155
const { mutate: updateUserPhotoUrl } =
@@ -399,6 +404,29 @@ const Settings = ({ profile }: { profile: User }) => {
399404
)}
400405
</FieldBlock>
401406

407+
<FieldBlock
408+
title="Topics"
409+
desc="The topics you follow shape your feed. Edit them anytime."
410+
>
411+
<div className="flex flex-wrap items-center gap-2">
412+
{myTopics.length > 0 ? (
413+
myTopics.map((t) => <Tag key={t}>{t}</Tag>)
414+
) : (
415+
<p className="text-sm text-muted">
416+
You haven&apos;t chosen any topics yet.
417+
</p>
418+
)}
419+
</div>
420+
<Button
421+
color="dark/white"
422+
type="button"
423+
className="mt-3 h-[30px] rounded-md text-xs"
424+
onClick={openTopics}
425+
>
426+
Edit topics
427+
</Button>
428+
</FieldBlock>
429+
402430
<FieldBlock
403431
title="Invite friends"
404432
desc="Share Codú and earn points + the Connector badge for every builder who joins."

app/(auth)/get-started/_client.tsx

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@ const GetStarted: NextPage = () => {
4848
}, [searchParams]);
4949

5050
return (
51-
<div className="grid min-h-screen w-full lg:mx-auto lg:max-w-[1080px] lg:grid-cols-2">
52-
{/* Brand panel — slim header on mobile, full panel on desktop */}
53-
<aside className="relative flex flex-col justify-between overflow-hidden border-b border-hairline bg-surface px-6 py-8 lg:border-b-0 lg:border-r lg:px-12 lg:py-16">
51+
<div className="grid min-h-screen w-full min-[861px]:mx-auto min-[861px]:max-w-[1080px] min-[861px]:grid-cols-2">
52+
{/* Brand panel — full split panel ≥861px; hidden entirely on narrow
53+
screens (a small logo shows above the form instead). */}
54+
<aside className="relative hidden flex-col justify-between overflow-hidden border-hairline bg-surface px-12 py-16 min-[861px]:flex min-[861px]:border-r">
5455
<div
5556
aria-hidden
5657
className="pointer-events-none absolute inset-0 bg-grid-dots bg-[length:24px_24px] opacity-50 [mask-image:radial-gradient(90%_70%_at_20%_10%,black_30%,transparent_80%)]"
@@ -70,7 +71,7 @@ const GetStarted: NextPage = () => {
7071
/>
7172
</Link>
7273

73-
<div className="relative mt-8 hidden lg:mt-0 lg:block">
74+
<div className="relative mt-0">
7475
<Eyebrow>where coders become product engineers</Eyebrow>
7576
<h1 className="mt-5 font-display text-4xl font-extrabold leading-[1.05] tracking-tight text-fg xl:text-5xl">
7677
Build the right thing.
@@ -84,15 +85,30 @@ const GetStarted: NextPage = () => {
8485
</div>
8586

8687
{/* spacer keeps logo top-aligned on desktop */}
87-
<div className="relative hidden lg:block" aria-hidden />
88+
<div className="relative" aria-hidden />
8889
</aside>
8990

9091
{/* Form panel */}
91-
<main className="flex items-center justify-center px-6 py-12 lg:px-12 lg:py-16">
92+
<main className="flex items-center justify-center px-6 py-12 min-[861px]:px-12 min-[861px]:py-16">
9293
<div className="w-full max-w-sm">
93-
<div className="text-center lg:text-left">
94-
<Eyebrow className="lg:hidden">join the community</Eyebrow>
95-
<h2 className="mt-4 font-display text-3xl font-extrabold tracking-tight text-fg lg:mt-0">
94+
{/* Small logo above the form when the brand panel is hidden */}
95+
<Link
96+
href="/"
97+
aria-label="Codú home"
98+
className="mb-8 inline-flex w-full justify-center min-[861px]:hidden"
99+
>
100+
<Image
101+
src="/images/codu.png"
102+
alt="Codú"
103+
width={189}
104+
height={60}
105+
className="h-6 w-auto"
106+
priority
107+
/>
108+
</Link>
109+
<div className="text-center min-[861px]:text-left">
110+
<Eyebrow className="min-[861px]:hidden">join the community</Eyebrow>
111+
<h2 className="mt-4 font-display text-3xl font-extrabold tracking-tight text-fg min-[861px]:mt-0">
96112
Start building with AI
97113
</h2>
98114
<p className="mt-2 text-sm text-muted">
@@ -166,7 +182,7 @@ const GetStarted: NextPage = () => {
166182

167183
<p className="mt-4 text-xs text-muted">More sign-in options coming soon.</p>
168184

169-
<p className="mt-6 text-center text-xs text-faint lg:text-left">
185+
<p className="mt-6 text-center text-xs text-faint min-[861px]:text-left">
170186
By continuing you agree to our{" "}
171187
<Link href="/tou" className="text-muted underline hover:text-fg">
172188
terms

components/Layout/AppShell.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { TopBar } from "./TopBar";
66
import { LeftRail } from "./LeftRail";
77
import { RightRail } from "./RightRail";
88
import { SignInBar } from "./SignInBar";
9-
import { MobileNav } from "./MobileNav";
9+
import { NavDrawer } from "./NavDrawer";
1010
import { CommandPalette } from "@/components/CommandPalette/CommandPalette";
1111
import { ShellActionsProvider } from "@/components/Create/ShellActionsProvider";
1212

@@ -24,6 +24,7 @@ interface AppShellProps {
2424
*/
2525
export function AppShell({ children, session, username }: AppShellProps) {
2626
const [paletteOpen, setPaletteOpen] = useState(false);
27+
const [drawerOpen, setDrawerOpen] = useState(false);
2728
// Remember the element that opened the palette so focus can be restored.
2829
const paletteTrigger = useRef<HTMLElement | null>(null);
2930

@@ -64,6 +65,7 @@ export function AppShell({ children, session, username }: AppShellProps) {
6465
session={session}
6566
username={username}
6667
onOpenPalette={openPalette}
68+
onOpenMenu={() => setDrawerOpen(true)}
6769
/>
6870
<main className="app-main">
6971
<LeftRail session={session} username={username} />
@@ -73,7 +75,12 @@ export function AppShell({ children, session, username }: AppShellProps) {
7375

7476
{paletteOpen && <CommandPalette onClose={closePalette} />}
7577
{!session && <SignInBar />}
76-
<MobileNav session={session} username={username} />
78+
<NavDrawer
79+
open={drawerOpen}
80+
onClose={() => setDrawerOpen(false)}
81+
session={session}
82+
username={username}
83+
/>
7784
</div>
7885
</ShellActionsProvider>
7986
);

components/Layout/MobileNav.tsx

Lines changed: 0 additions & 75 deletions
This file was deleted.

0 commit comments

Comments
 (0)