Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e42759f

Browse files
committedJun 23, 2025
Display dashed border if there is no break between sessions
1 parent 585346c commit e42759f

File tree

1 file changed

+57
-25
lines changed

1 file changed

+57
-25
lines changed
 

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

Lines changed: 57 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
FilterStates,
1717
ResetFiltersButton,
1818
} from "./filters"
19+
import clsx from "clsx"
1920

2021
export interface FiltersConfig
2122
extends Partial<
@@ -204,33 +205,64 @@ export function ScheduleList({
204205
{format(parseISO(date), "EEEE, MMMM d")}
205206
</h3>
206207
{Object.entries(concurrentSessionsGroup).map(
207-
([sessionDate, sessions]) => (
208-
<div
209-
key={`concurrent sessions on ${sessionDate}`}
210-
className="lg:mt-px"
211-
>
212-
<div className="mr-px flex flex-col max-lg:ml-px lg:flex-row">
213-
<div className="relative border-neu-50 bg-neu-50 dark:bg-neu-0 max-lg:-mx-px max-lg:my-px max-lg:border-x lg:mr-px">
214-
<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">
215-
{formatBlockTime(
216-
sessionDate,
217-
sessions[0]?.event_end,
218-
)}
219-
</span>
208+
([sessionDate, sessions], i, blocks) => {
209+
const blockEnd = sessions[0]?.event_end
210+
const nextBlockStart = blocks[i + 1]?.[0]
211+
212+
const isBreak =
213+
sessions[0]?.event_type
214+
?.toLowerCase()
215+
.includes("break") ||
216+
blocks[i + 1]?.[1]?.[0]?.event_type
217+
?.toLowerCase()
218+
.includes("break")
219+
const hasDashedBorder =
220+
blockEnd && blockEnd === nextBlockStart && !isBreak
221+
222+
return (
223+
<div
224+
key={`concurrent sessions on ${sessionDate}`}
225+
className="relative lg:mt-px [&_div:has(a:hover)]:z-[1]"
226+
>
227+
<div className="mr-px flex flex-col max-lg:ml-px lg:flex-row">
228+
<div className="relative border-neu-50 bg-neu-50 dark:bg-neu-0 max-lg:-mx-px max-lg:my-px max-lg:border-x lg:mr-px">
229+
<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">
230+
{formatBlockTime(sessionDate, blockEnd)}
231+
</span>
232+
</div>
233+
<div className="relative flex w-full flex-col items-end gap-px lg:flex-row lg:items-start">
234+
{sessions.map(session => (
235+
<ScheduleSessionCard
236+
key={session.id}
237+
session={session}
238+
year={year}
239+
eventsColors={eventsColors}
240+
/>
241+
))}
242+
</div>
220243
</div>
221-
<div className="relative flex w-full flex-col items-end gap-px lg:flex-row lg:items-start">
222-
{sessions.map(session => (
223-
<ScheduleSessionCard
224-
key={session.id}
225-
session={session}
226-
year={year}
227-
eventsColors={eventsColors}
244+
{hasDashedBorder && (
245+
<svg
246+
className="absolute -bottom-px left-0 h-px w-full text-neu-50"
247+
viewBox="0 0 100 1"
248+
preserveAspectRatio="none"
249+
>
250+
<line
251+
x1="0"
252+
y1="0.5"
253+
x2="100"
254+
y2="0.5"
255+
stroke="currentColor"
256+
strokeWidth="1"
257+
strokeDasharray="4,4"
258+
strokeDashoffset="4"
259+
vectorEffect="non-scaling-stroke"
228260
/>
229-
))}
230-
</div>
261+
</svg>
262+
)}
231263
</div>
232-
</div>
233-
),
264+
)
265+
},
234266
)}
235267
</div>
236268
),
@@ -247,7 +279,7 @@ function BookmarkOnSched({ year }: { year: `202${number}` }) {
247279
href={`https://graphqlconf${year}.sched.com`}
248280
target="_blank"
249281
rel="noreferrer"
250-
className="typography-link mb-8 block w-fit decoration-neu-400"
282+
className="typography-link mb-8 block w-fit decoration-neu-400 max-lg:hidden"
251283
>
252284
Bookmark sessions & plan your days on Sched
253285
<svg

0 commit comments

Comments
 (0)
Please sign in to comment.