Skip to content

Commit a85dad5

Browse files
committed
Merge branch 'new-conf-design--speakers' into new-conf-design--ogs
2 parents 131673c + a91bd48 commit a85dad5

File tree

15 files changed

+3684
-132
lines changed

15 files changed

+3684
-132
lines changed

scripts/sync-sched/schedule-2025.json

Lines changed: 3515 additions & 37 deletions
Large diffs are not rendered by default.

scripts/sync-sched/speakers.json

Lines changed: 91 additions & 47 deletions
Large diffs are not rendered by default.

scripts/sync-sched/sync.ts

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,19 @@ async function updateSpeakerDetails(
181181
})
182182

183183
const toUpdate = byUpdateTime.slice(0, quota)
184+
console.log(`Fetching additional details for ${toUpdate.length} speakers...`)
185+
console.log(
186+
toUpdate
187+
.map(s =>
188+
[
189+
`- ${s.username.padEnd(32, " ")}`,
190+
s["~syncedDetailsAt"]
191+
? `last synced at ${new Date(s["~syncedDetailsAt"]).toLocaleString()}`
192+
: "without details yet",
193+
].join("\t"),
194+
)
195+
.join("\n"),
196+
)
184197

185198
const limit = pLimit(5)
186199
const updated = await Promise.all(
@@ -193,15 +206,20 @@ async function updateSpeakerDetails(
193206
const location = locations.get(speaker.username)
194207
if (location) {
195208
const [key, index] = location
209+
const current =
210+
key === "changed" ? comparison[key][index].new : comparison[key][index]
211+
212+
const newValue = mergeSpeaker(current, speaker)
213+
const diff = objectDiff({ old: current, new: newValue })
214+
if (diff.trim()) {
215+
console.log(diff)
216+
}
217+
newValue["~syncedDetailsAt"] = Date.now()
218+
196219
if (key === "changed") {
197-
comparison[key][index].new = mergeSpeaker(
198-
comparison[key][index].new,
199-
speaker,
200-
)
201-
comparison[key][index].new["~syncedDetailsAt"] = Date.now()
220+
comparison[key][index].new = newValue
202221
} else {
203-
comparison[key][index] = mergeSpeaker(comparison[key][index], speaker)
204-
comparison[key][index]["~syncedDetailsAt"] = Date.now()
222+
comparison[key][index] = newValue
205223
}
206224
}
207225
}
@@ -212,7 +230,7 @@ async function updateSpeakerDetails(
212230
)
213231
const nowUnchanged = comparison.changed
214232
.filter(change => deepStrictEqualWithoutInternals(change.old, change.new))
215-
.map(change => change.old)
233+
.map(change => change.new)
216234

217235
comparison.changed = actuallyChanged
218236
comparison.unchanged.push(...nowUnchanged)

src/app/conf/2025/_data.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { SchedSpeaker, ScheduleSession } from "@/app/conf/2023/types"
44
import { readSpeakers } from "../_api/sched-data"
55

66
export const schedule: ScheduleSession[] = require("../../../../scripts/sync-sched/schedule-2025.json")
7-
export const speakers: SchedSpeaker[] = readSpeakers(2025)
87

98
type SpeakerUsername = SchedSpeaker["username"]
109

@@ -20,6 +19,10 @@ for (const session of schedule) {
2019
}
2120
}
2221

22+
export const speakers: SchedSpeaker[] = readSpeakers(2025).filter(speaker =>
23+
speakerSessions.has(speaker.username),
24+
)
25+
2326
export const previousEditionSessions = new Map<
2427
SpeakerUsername,
2528
ScheduleSession[]

src/app/conf/2025/_videos.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
export const videos: {
22
id: string
33
title: string
4-
}[] = [
5-
// temporary
6-
{
7-
id: "fA81OFu9BVY",
8-
title: `Top 10 GraphQL Security Checks for Every Developer - Ankita Gupta, Ankush Jain - Akto.io`,
9-
},
10-
]
4+
}[] = []

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export function SessionTags({ session, className, ...rest }: SessionTagsProps) {
1919
return (
2020
<div className={clsx("flex flex-wrap gap-2 md:gap-3", className)} {...rest}>
2121
{eventType && (
22-
<Tag color={eventsColors[session.event_type]}>{eventType}</Tag>
22+
<Tag color={eventsColors[session.event_type || ""]}>{eventType}</Tag>
2323
)}
2424
{session.audience && (
2525
<Tag

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export function SpeakerCard({
4343
/>
4444
)}
4545

46-
<div className="relative h-full overflow-hidden @[420px]:w-[176px] @[420px]:shrink-0">
46+
<div className="relative aspect-square h-full overflow-hidden @[420px]:w-[176px] @[420px]:shrink-0">
4747
<div className="absolute inset-0 z-[1] bg-sec-light mix-blend-multiply" />
4848
{speaker.avatar ? (
4949
<Image
@@ -82,7 +82,7 @@ export function SpeakerCard({
8282
</div>
8383
<Anchor
8484
href={`/conf/${year}/speakers/${speaker.username}`}
85-
className="absolute inset-0 z-[1] ring-inset ring-neu-400 hover:bg-sec-base/[.035] hover:ring-1 dark:ring-neu-100"
85+
className="absolute inset-0 z-[1] ring-inset ring-neu-400 hover:bg-sec-base/[.035] hover:ring-1 dark:ring-neu-100 dark:hover:bg-sec-base/[.05]"
8686
aria-label={`See ${speaker.name.split(" ")[0]}'s sessions`}
8787
/>
8888
</article>

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ export function SpeakerLinks({
1919
...rest
2020
}: SpeakerLinksProps) {
2121
const speakerUrls = SocialIconType.all
22-
.map(social => speaker.socialurls.find(x => x.service === social))
22+
.map(social =>
23+
speaker.socialurls.find(
24+
x => x.service.toLowerCase() === social.toLowerCase(),
25+
),
26+
)
2327
.concat([{ service: "website", url: speaker.url || "" }])
2428
.filter((x): x is Exclude<typeof x, undefined> => !!x?.url)
2529
.slice(-3)

src/app/conf/2025/schedule/[id]/session-video.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ export function SessionVideo({ video, className }: SessionVideoProps) {
2626
}
2727

2828
export function findVideo(event: ScheduleSession, eventTitle: string) {
29+
if (videos.length === 0) {
30+
return null
31+
}
32+
2933
const result = findBestMatch(
3034
`${eventTitle} ${event.speakers!.map(e => e.name).join(" ")}`,
3135
videos.map(e => e.title),

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,17 @@ export function ScheduleList({
163163
className="typography-body-sm bg-neu-200 pb-px dark:bg-neu-50"
164164
>
165165
<h3
166-
className="bg-neu-50 py-4 dark:bg-neu-0 lg:mb-px"
166+
className="bg-neu-50 py-4 dark:bg-neu-0"
167167
id={`day-${index + 1}`}
168168
>
169169
{format(parseISO(date), "EEEE, MMMM d")}
170170
</h3>
171171
{Object.entries(concurrentSessionsGroup).map(
172172
([sessionDate, sessions]) => (
173-
<div key={`concurrent sessions on ${sessionDate}`}>
173+
<div
174+
key={`concurrent sessions on ${sessionDate}`}
175+
className="lg:mt-px"
176+
>
174177
<div className="mr-px flex flex-col max-lg:ml-px lg:flex-row">
175178
<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">
176179
<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">

0 commit comments

Comments
 (0)