Skip to content

Commit 06e6776

Browse files
committed
Fix schedule paddings, hide [first time speaker] (yes) and [add to calendar] (for now?)
1 parent 6c4f931 commit 06e6776

File tree

5 files changed

+72
-30
lines changed

5 files changed

+72
-30
lines changed

src/app/conf/2025/_data.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,33 @@ for (const session of schedule) {
1919
speakerSessions.get(speaker.username)!.push(session)
2020
}
2121
}
22+
23+
export const previousEditionSessions = new Map<
24+
SpeakerUsername,
25+
ScheduleSession[]
26+
>()
27+
28+
{
29+
const schedule2023 = require("../../../../scripts/sync-sched/schedule-2023.json")
30+
const schedule2024 = require("../../../../scripts/sync-sched/schedule-2024.json")
31+
32+
for (const session of schedule2023) {
33+
for (const speaker of session.speakers || []) {
34+
if (!previousEditionSessions.has(speaker.username)) {
35+
previousEditionSessions.set(speaker.username, [])
36+
}
37+
38+
previousEditionSessions.get(speaker.username)!.push(session)
39+
}
40+
}
41+
42+
for (const session of schedule2024) {
43+
for (const speaker of session.speakers || []) {
44+
if (!previousEditionSessions.has(speaker.username)) {
45+
previousEditionSessions.set(speaker.username, [])
46+
}
47+
48+
previousEditionSessions.get(speaker.username)!.push(session)
49+
}
50+
}
51+
}

src/app/conf/2025/components/speaker-tags.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import clsx from "clsx"
33
import { SchedSpeaker } from "@/app/conf/2023/types"
44
import { Tag } from "@/app/conf/_design-system/tag"
55
import ReloadIcon from "@/app/conf/_design-system/pixelarticons/reload.svg?svgr"
6-
import PlayIcon from "@/app/conf/_design-system/pixelarticons/play.svg?svgr"
76

87
import { speakerSessions } from "../_data"
98
import { eventsColors } from "../utils"
@@ -38,7 +37,8 @@ export function SpeakerTags({
3837
</>
3938
) : (
4039
<>
41-
<PlayIcon className="-mx-1 size-3" /> first time speaker
40+
{/* todo: this should probably be a tag manually added in Sched because it suggests it's a debut talk */}
41+
{/* <PlayIcon className="-mx-1 size-3" /> first time speaker */}
4242
</>
4343
)}
4444
</Tag>

src/app/conf/2025/schedule/_components/schedule-list.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export function ScheduleList({
160160
([date, concurrentSessionsGroup], index) => (
161161
<div
162162
key={date}
163-
className="typography-body-sm bg-neu-200 pt-px dark:bg-neu-50"
163+
className="typography-body-sm bg-neu-200 pb-px dark:bg-neu-50"
164164
>
165165
<h3
166166
className="bg-neu-50 py-4 dark:bg-neu-0 lg:mb-px"
@@ -171,8 +171,8 @@ export function ScheduleList({
171171
{Object.entries(concurrentSessionsGroup).map(
172172
([sessionDate, sessions]) => (
173173
<div key={`concurrent sessions on ${sessionDate}`}>
174-
<div className="mr-px flex flex-col max-lg:ml-px lg:mb-px lg:flex-row">
175-
<div className="relative border-neu-50 bg-neu-50 dark:bg-neu-0 max-lg:-mx-px max-lg:mt-px max-lg:border-x lg:mr-px">
174+
<div className="mr-px flex flex-col max-lg:ml-px lg:flex-row">
175+
<div className="relative border-neu-50 bg-neu-50 dark:bg-neu-0 max-lg:-mx-px max-lg:mb-px max-lg:mt-px max-lg:border-x lg:mr-px">
176176
<span className="typography-body-sm mt-3 inline-block w-20 whitespace-nowrap pb-0.5 pl-4 lg:mr-6 lg:w-28 lg:pb-4 lg:pl-0">
177177
{format(parseISO(sessionDate), "hh:mmaaaa 'PDT'")}
178178
</span>

src/app/conf/2025/speakers/[id]/long-session-card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export function LongSessionCard({
5656
return (
5757
<div
5858
className={clsx(
59-
"group relative border border-neu-200 bg-neu-0 dark:border-neu-100",
59+
"group relative flex flex-col justify-between border border-neu-200 bg-neu-0 dark:border-neu-100",
6060
className,
6161
)}
6262
{...props}

src/app/conf/2025/speakers/[id]/page.tsx

Lines changed: 36 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
import { Metadata } from "next"
2-
import { notFound } from "next/navigation"
32
import React from "react"
43

5-
import { speakers, speakerSessions } from "../../_data"
4+
import { previousEditionSessions, speakers, speakerSessions } from "../../_data"
65
import { metadata as layoutMetadata } from "../../layout"
76

87
import { HERO_MARQUEE_ITEMS } from "../../utils"
98
import { BackLink } from "../../schedule/_components/back-link"
109
import { NavbarPlaceholder } from "../../components/navbar"
1110
import { CtaCardSection } from "../../components/cta-card-section"
1211
import clsx from "clsx"
13-
import { SchedSpeaker } from "@/app/conf/2023/types"
12+
import { SchedSpeaker, ScheduleSession } from "@/app/conf/2023/types"
1413
import { Button } from "@/app/conf/_design-system/button"
1514
import { MarqueeRows } from "../../components/marquee-rows"
1615
import { GET_TICKETS_LINK } from "../../links"
@@ -55,6 +54,9 @@ export default function SpeakerPage({ params }: SpeakerProps) {
5554
throw new Error(`Speaker "${params.id}" not found for details page`)
5655
}
5756

57+
const currentYearSessions = speakerSessions.get(speaker.username) || []
58+
const previousSessions = previousEditionSessions.get(speaker.username) || []
59+
5860
return (
5961
<>
6062
<NavbarPlaceholder className="top-0 bg-neu-50 before:bg-neu-50/40 dark:bg-neu-0 dark:before:bg-blk/30" />
@@ -81,19 +83,31 @@ export default function SpeakerPage({ params }: SpeakerProps) {
8183
{formatDescription(speaker.about)}
8284
</p>
8385

84-
<Hr />
85-
86-
<h3 className="typography-h2 my-8 px-2 sm:px-3 lg:my-16">
87-
2025 Sessions
88-
</h3>
89-
<SpeakerSessions speaker={speaker} className="-mx-px -mb-px" />
90-
91-
<Hr />
92-
93-
<h3 className="typography-h2 my-8 px-2 sm:px-3 lg:my-16">
94-
Sessions from previous editions
95-
</h3>
96-
<SpeakerSessions speaker={speaker} className="-mx-px -mb-px" />
86+
{currentYearSessions.length > 0 && (
87+
<>
88+
<Hr />
89+
<h3 className="typography-h2 my-8 px-2 sm:px-3 lg:my-16">
90+
2025 Sessions
91+
</h3>
92+
<SpeakerSessions
93+
sessions={currentYearSessions}
94+
className="-mx-px -mb-px"
95+
/>
96+
</>
97+
)}
98+
99+
{previousSessions.length > 0 && (
100+
<>
101+
<Hr />
102+
<h3 className="typography-h2 my-8 px-2 sm:px-3 lg:my-16">
103+
Sessions from previous editions
104+
</h3>
105+
<SpeakerSessions
106+
sessions={previousSessions}
107+
className="-mx-px -mb-px"
108+
/>
109+
</>
110+
)}
97111
</div>
98112
</div>
99113
</div>
@@ -157,7 +171,7 @@ function SpeakerHeader({
157171
alt=""
158172
width={464}
159173
height={464}
160-
className="aspect-square size-[464px] w-full object-cover saturate-[0.1] transition-transform"
174+
className="aspect-square size-[464px] object-cover saturate-[0.1] transition-transform max-lg:w-full"
161175
/>
162176
</div>
163177
)}
@@ -166,10 +180,10 @@ function SpeakerHeader({
166180
}
167181

168182
function SpeakerSessions({
169-
speaker,
183+
sessions,
170184
className,
171185
}: {
172-
speaker: SchedSpeaker
186+
sessions: ScheduleSession[]
173187
className?: string
174188
}) {
175189
return (
@@ -179,11 +193,9 @@ function SpeakerSessions({
179193
className,
180194
)}
181195
>
182-
{speakerSessions
183-
.get(speaker.username)
184-
?.map(session => (
185-
<LongSessionCard key={session.id} session={session} year="2025" />
186-
))}
196+
{sessions.map(session => (
197+
<LongSessionCard key={session.id} session={session} year="2025" />
198+
))}
187199
</div>
188200
)
189201
}

0 commit comments

Comments
 (0)