@@ -16,6 +16,7 @@ import {
16
16
FilterStates ,
17
17
ResetFiltersButton ,
18
18
} from "./filters"
19
+ import clsx from "clsx"
19
20
20
21
export interface FiltersConfig
21
22
extends Partial <
@@ -204,33 +205,64 @@ export function ScheduleList({
204
205
{ format ( parseISO ( date ) , "EEEE, MMMM d" ) }
205
206
</ h3 >
206
207
{ 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 >
220
243
</ 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"
228
260
/>
229
- ) ) }
230
- </ div >
261
+ </ svg >
262
+ ) }
231
263
</ div >
232
- </ div >
233
- ) ,
264
+ )
265
+ } ,
234
266
) }
235
267
</ div >
236
268
) ,
@@ -247,7 +279,7 @@ function BookmarkOnSched({ year }: { year: `202${number}` }) {
247
279
href = { `https://graphqlconf${ year } .sched.com` }
248
280
target = "_blank"
249
281
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 "
251
283
>
252
284
Bookmark sessions & plan your days on Sched
253
285
< svg
0 commit comments