Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

B・C会場にオープニングストリームあるのめも #464

Merged
merged 2 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions 2024/src/data/talks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,20 @@
track: A
kind: OPENING_TALK
youtube: ""
- date: day1
startsAt: "10:00"
endsAt: "10:10"
track: B
kind: STREAM
stream: A
youtube: ""
- date: day1
startsAt: "10:00"
endsAt: "10:10"
track: C
kind: STREAM
stream: A
youtube: ""
- uuid: sahil-khokhar
date: day1
startsAt: "10:10"
Expand Down Expand Up @@ -414,6 +428,18 @@
speakerIDs: []
sponsorIDs: [] # TODO: Add sponsor IDs
youtube: ""
- date: day1
startsAt: "16:40"
endsAt: "17:40"
track: B
kind: STREAM
stream: A
- date: day1
startsAt: "16:40"
endsAt: "17:40"
track: C
kind: STREAM
stream: A
- date: day1
startsAt: "17:40"
endsAt: "17:50"
Expand All @@ -437,13 +463,37 @@
speakerIDs: []
sponsorIDs: []
youtube: ""
- date: day1
startsAt: "17:50"
endsAt: "18:30"
track: B
kind: STREAM
stream: A
- date: day1
startsAt: "17:50"
endsAt: "18:30"
track: C
kind: STREAM
stream: A
- uuid: day1-
date: day1
startsAt: "18:30"
endsAt: "18:40"
track: A
kind: CLOSING_TALK
youtube: ""
- date: day1
startsAt: "18:30"
endsAt: "18:40"
track: B
kind: STREAM
stream: A
- date: day1
startsAt: "18:30"
endsAt: "18:40"
track: C
kind: STREAM
stream: A
- uuid: day1-
date: day1
startsAt: "18:40"
Expand Down
2 changes: 2 additions & 0 deletions 2024/src/data/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export type TalkType = {
kind:
| "OPEN"
| "OPENING_TALK"
| "STREAM"
| "TALK"
| "BREAK"
| "CLOSING_TALK"
Expand All @@ -18,6 +19,7 @@ export type TalkType = {
speakerIDs: string[]
sponsorIDs: string[]
date: "day1"
stream?: Rooms
startsAt: string
endsAt: string
hiddenTimeBoxes: string[] | null
Expand Down
5 changes: 5 additions & 0 deletions 2024/src/gatsby-types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2175,6 +2175,7 @@ type Query_talksYamlArgs = {
spokenLanguage: InputMaybe<StringQueryOperatorInput>;
sponsorIDs: InputMaybe<StringQueryOperatorInput>;
startsAt: InputMaybe<StringQueryOperatorInput>;
stream: InputMaybe<StringQueryOperatorInput>;
title: InputMaybe<StringQueryOperatorInput>;
titleJa: InputMaybe<StringQueryOperatorInput>;
track: InputMaybe<StringQueryOperatorInput>;
Expand Down Expand Up @@ -3353,6 +3354,7 @@ type TalksYaml = Node & {
readonly spokenLanguage: Maybe<Scalars['String']>;
readonly sponsorIDs: Maybe<ReadonlyArray<Maybe<Scalars['String']>>>;
readonly startsAt: Maybe<Scalars['String']>;
readonly stream: Maybe<Scalars['String']>;
readonly title: Maybe<Scalars['String']>;
readonly titleJa: Maybe<Scalars['String']>;
readonly track: Maybe<Scalars['String']>;
Expand Down Expand Up @@ -3421,6 +3423,7 @@ type TalksYamlFieldSelector = {
readonly spokenLanguage: InputMaybe<FieldSelectorEnum>;
readonly sponsorIDs: InputMaybe<FieldSelectorEnum>;
readonly startsAt: InputMaybe<FieldSelectorEnum>;
readonly stream: InputMaybe<FieldSelectorEnum>;
readonly title: InputMaybe<FieldSelectorEnum>;
readonly titleJa: InputMaybe<FieldSelectorEnum>;
readonly track: InputMaybe<FieldSelectorEnum>;
Expand All @@ -3444,6 +3447,7 @@ type TalksYamlFilterInput = {
readonly spokenLanguage: InputMaybe<StringQueryOperatorInput>;
readonly sponsorIDs: InputMaybe<StringQueryOperatorInput>;
readonly startsAt: InputMaybe<StringQueryOperatorInput>;
readonly stream: InputMaybe<StringQueryOperatorInput>;
readonly title: InputMaybe<StringQueryOperatorInput>;
readonly titleJa: InputMaybe<StringQueryOperatorInput>;
readonly track: InputMaybe<StringQueryOperatorInput>;
Expand Down Expand Up @@ -3512,6 +3516,7 @@ type TalksYamlSortInput = {
readonly spokenLanguage: InputMaybe<SortOrderEnum>;
readonly sponsorIDs: InputMaybe<SortOrderEnum>;
readonly startsAt: InputMaybe<SortOrderEnum>;
readonly stream: InputMaybe<SortOrderEnum>;
readonly title: InputMaybe<SortOrderEnum>;
readonly titleJa: InputMaybe<SortOrderEnum>;
readonly track: InputMaybe<SortOrderEnum>;
Expand Down
1 change: 1 addition & 0 deletions 2024/src/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export const en = {
"〒210-0024 27-7-903 Nisshincho Kawasaki-ku Kawasaki-shi Kanagawa",
"talk.open": "Doors Open",
"talk.opening talk": "Opening Talk",
"talk.stream": " (Stream)",
"talk.Break": "Break",
"talk.closing talk": "Closing Talk",
"talk.party": "Party",
Expand Down
2 changes: 2 additions & 0 deletions 2024/src/i18n/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ export const ja: {
"jna-address": "〒210-0024 神奈川県川崎市川崎区日進町27-7-903",
"talk.open": "開場",
"talk.opening talk": "オープニング/開場説明",
"talk.opening talk stream": "オープニング/開場説明",
"talk.stream": " ストリーム",
"talk.Break": "休憩",
"talk.closing talk": "クロージング",
"talk.party": "懇親会",
Expand Down
26 changes: 23 additions & 3 deletions 2024/src/pages/schedule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { Breadcrumb } from "../components/Breadcrumb"
import { EventTime } from "../components/EventTime"
import { EventSpeakers } from "../components/EventSpeakers"
import { RoomLegend } from "../components/RoomLegend"
import { TalkType, SpeakerType } from "../data/types"
import { TalkType, SpeakerType, Session } from "../data/types"
import { generateTimetable } from "../util/generateTimetable"
import { rangeTimeBoxes, escapeTime } from "../util/rangeTimeBoxes"
import { Dates, times, Rooms, rooms } from "../util/misc"
Expand Down Expand Up @@ -212,6 +212,7 @@ export default function SchedulePage() {
startsAt
endsAt
track
stream
date
}
}
Expand Down Expand Up @@ -245,14 +246,33 @@ export default function SchedulePage() {
window.scrollTo({ top })
}, [])

function getSessionName(talk: TalkType) {
function getStreamSession(
talk: TalkType,
sessions: Session[],
): string | undefined {
const session = sessions.find(
session =>
session.date === talk.date &&
session.startsAt === talk.startsAt &&
session.track === talk.stream,
)
if (!session) {
return
}
return getSessionName(session, sessions)
}

function getSessionName(talk: TalkType, sessions: Session[]): string {
switch (talk.kind) {
case "OPEN": {
return i18n.t("talk.open")
}
case "OPENING_TALK": {
return i18n.t("talk.opening talk")
}
case "STREAM": {
return `${getStreamSession(talk, sessions) ?? "???"}${i18n.t("talk.stream")}`
}
case "BREAK": {
return i18n.t("talk.Break")
}
Expand Down Expand Up @@ -315,7 +335,7 @@ export default function SchedulePage() {
<AreaTitle>
<EventTime session={s} />
</AreaTitle>
<Text>{getSessionName(s)}</Text>
<Text>{getSessionName(s, sessions)}</Text>
<EventSpeakers session={s} />

<AreaFooter>
Expand Down