From 585346c9c9e17a0322a84949e5714e79b63b2c16 Mon Sep 17 00:00:00 2001 From: Piotr Monwid-Olechnowicz Date: Mon, 23 Jun 2025 14:34:17 +0200 Subject: [PATCH 1/3] Display end times in Schedule --- .../schedule/_components/schedule-list.tsx | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/app/conf/2025/schedule/_components/schedule-list.tsx b/src/app/conf/2025/schedule/_components/schedule-list.tsx index f6d3f60c71..9e3d874550 100644 --- a/src/app/conf/2025/schedule/_components/schedule-list.tsx +++ b/src/app/conf/2025/schedule/_components/schedule-list.tsx @@ -101,6 +101,19 @@ function getSessionsByDay( } } +const timeFormat = new Intl.DateTimeFormat(undefined, { + hour: "2-digit", + minute: "2-digit", +}) +const formatBlockTime = (start: string, end?: string) => { + const startDate = parseISO(start) + if (end) { + const endDate = parseISO(end) + return timeFormat.formatRange(startDate, endDate) + } + return timeFormat.format(startDate) +} + export interface ScheduleListProps { showFilter?: boolean scheduleData: ScheduleSession[] @@ -199,12 +212,9 @@ export function ScheduleList({
- {parseISO(sessionDate).toLocaleTimeString( - undefined, - { - hour: "2-digit", - minute: "2-digit", - }, + {formatBlockTime( + sessionDate, + sessions[0]?.event_end, )}
From e42759fed2af3665dd92ae359db8bfc6b7ac76c3 Mon Sep 17 00:00:00 2001 From: Piotr Monwid-Olechnowicz Date: Mon, 23 Jun 2025 15:10:20 +0200 Subject: [PATCH 2/3] Display dashed border if there is no break between sessions --- .../schedule/_components/schedule-list.tsx | 82 +++++++++++++------ 1 file changed, 57 insertions(+), 25 deletions(-) diff --git a/src/app/conf/2025/schedule/_components/schedule-list.tsx b/src/app/conf/2025/schedule/_components/schedule-list.tsx index 9e3d874550..64f9d4e6de 100644 --- a/src/app/conf/2025/schedule/_components/schedule-list.tsx +++ b/src/app/conf/2025/schedule/_components/schedule-list.tsx @@ -16,6 +16,7 @@ import { FilterStates, ResetFiltersButton, } from "./filters" +import clsx from "clsx" export interface FiltersConfig extends Partial< @@ -204,33 +205,64 @@ export function ScheduleList({ {format(parseISO(date), "EEEE, MMMM d")} {Object.entries(concurrentSessionsGroup).map( - ([sessionDate, sessions]) => ( -
-
-
- - {formatBlockTime( - sessionDate, - sessions[0]?.event_end, - )} - + ([sessionDate, sessions], i, blocks) => { + const blockEnd = sessions[0]?.event_end + const nextBlockStart = blocks[i + 1]?.[0] + + const isBreak = + sessions[0]?.event_type + ?.toLowerCase() + .includes("break") || + blocks[i + 1]?.[1]?.[0]?.event_type + ?.toLowerCase() + .includes("break") + const hasDashedBorder = + blockEnd && blockEnd === nextBlockStart && !isBreak + + return ( +
+
+
+ + {formatBlockTime(sessionDate, blockEnd)} + +
+
+ {sessions.map(session => ( + + ))} +
-
- {sessions.map(session => ( - + - ))} -
+ + )}
-
- ), + ) + }, )}
), @@ -247,7 +279,7 @@ function BookmarkOnSched({ year }: { year: `202${number}` }) { href={`https://graphqlconf${year}.sched.com`} target="_blank" rel="noreferrer" - className="typography-link mb-8 block w-fit decoration-neu-400" + className="typography-link mb-8 block w-fit decoration-neu-400 max-lg:hidden" > Bookmark sessions & plan your days on Sched Date: Mon, 23 Jun 2025 15:11:09 +0200 Subject: [PATCH 3/3] Remove unused import --- src/app/conf/2025/schedule/_components/schedule-list.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/conf/2025/schedule/_components/schedule-list.tsx b/src/app/conf/2025/schedule/_components/schedule-list.tsx index 64f9d4e6de..e2fedb469b 100644 --- a/src/app/conf/2025/schedule/_components/schedule-list.tsx +++ b/src/app/conf/2025/schedule/_components/schedule-list.tsx @@ -16,7 +16,6 @@ import { FilterStates, ResetFiltersButton, } from "./filters" -import clsx from "clsx" export interface FiltersConfig extends Partial<