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

🔧 Correctly indicated that the third day room is on the first floor, not the basement. #1120

Merged
merged 1 commit into from
Sep 8, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import io.github.droidkaigi.confsched2023.model.RoomType.RoomA
import io.github.droidkaigi.confsched2023.model.RoomType.RoomB
import io.github.droidkaigi.confsched2023.model.RoomType.RoomC
import io.github.droidkaigi.confsched2023.model.RoomType.RoomD
import io.github.droidkaigi.confsched2023.model.RoomType.RoomDE
import io.github.droidkaigi.confsched2023.model.RoomType.RoomE
import io.github.droidkaigi.confsched2023.model.Timetable
import io.github.droidkaigi.confsched2023.model.TimetableAsset
Expand Down Expand Up @@ -167,7 +168,8 @@ private fun LocaledResponse.toRoomType() = when (en?.lowercase()) {
"chipmunk" -> RoomC
"dolphin" -> RoomD
"electric eel" -> RoomE
else -> RoomA
// Assume the room on the third day.
else -> RoomDE
}

internal fun String.toInstantAsJST(): Instant {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ enum class RoomType {
RoomC,
RoomD,
RoomE,
RoomDE,
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ val TimetableRoom.nameAndFloor: String
RoomType.RoomC -> basementFloorString.currentLangTitle
RoomType.RoomD -> "1F"
RoomType.RoomE -> "1F"
// Assume the room on the third day.
RoomType.RoomDE -> "1F"
}
return "${name.currentLangTitle} ($floor)"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import io.github.droidkaigi.confsched2023.model.RoomType.RoomA
import io.github.droidkaigi.confsched2023.model.RoomType.RoomB
import io.github.droidkaigi.confsched2023.model.RoomType.RoomC
import io.github.droidkaigi.confsched2023.model.RoomType.RoomD
import io.github.droidkaigi.confsched2023.model.RoomType.RoomDE
import io.github.droidkaigi.confsched2023.model.TimetableItem
import io.github.droidkaigi.confsched2023.model.TimetableItem.Session
import io.github.droidkaigi.confsched2023.model.fake
Expand All @@ -18,6 +19,7 @@ class PreviewTimeTableItemRoomProvider : PreviewParameterProvider<TimetableItem>
Session.fake().copy(room = Session.fake().room.copy(type = RoomA)),
Session.fake().copy(room = Session.fake().room.copy(type = RoomB)),
Session.fake().copy(room = Session.fake().room.copy(type = RoomD)),
Session.fake().copy(room = Session.fake().room.copy(type = RoomDE)),
Session.fake().copy(speakers = persistentListOf(Session.fake().speakers.first())),
Session.fake().copy(speakers = persistentListOf()),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import io.github.droidkaigi.confsched2023.model.RoomType.RoomA
import io.github.droidkaigi.confsched2023.model.RoomType.RoomB
import io.github.droidkaigi.confsched2023.model.RoomType.RoomC
import io.github.droidkaigi.confsched2023.model.RoomType.RoomD
import io.github.droidkaigi.confsched2023.model.RoomType.RoomDE
import io.github.droidkaigi.confsched2023.model.RoomType.RoomE
import io.github.droidkaigi.confsched2023.model.TimetableRoom

Expand All @@ -20,6 +21,8 @@ internal val TimetableRoom.color: Color
RoomC -> colors.hallC
RoomD -> colors.hallD
RoomE -> colors.hallE
// The color of D is set as workaround.
RoomDE -> colors.hallD
Comment on lines +24 to +25
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to assign a room color for the third day or a gradient color for D and E if possible, but I have decided that it is not advisable to make major changes to this structure now.

else -> Color.White
}
}