Skip to content

Commit

Permalink
Merge pull request #284 from wisemuji/feature/#271
Browse files Browse the repository at this point in the history
[세션] 2024 세션 데이터 반영
  • Loading branch information
taehwandev authored May 9, 2024
2 parents fd733e7 + 92773fe commit 0fe4de2
Show file tree
Hide file tree
Showing 52 changed files with 179 additions and 315 deletions.
421 changes: 174 additions & 247 deletions core/data/src/main/assets/sessions.json

Large diffs are not rendered by default.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ internal data class SessionResponse(
val title: String,
val content: String,
val speakers: List<SpeakerResponse>,
val level: LevelResponse,
val tags: List<String>,
val room: RoomResponse?,
val startTime: LocalDateTime,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package com.droidknights.app.core.data.mapper

import com.droidknights.app.core.data.api.model.LevelResponse
import com.droidknights.app.core.data.api.model.RoomResponse
import com.droidknights.app.core.data.api.model.SessionResponse
import com.droidknights.app.core.data.api.model.SpeakerResponse
import com.droidknights.app.core.model.Level
import com.droidknights.app.core.model.Room
import com.droidknights.app.core.model.Session
import com.droidknights.app.core.model.Speaker
Expand All @@ -15,21 +13,13 @@ internal fun SessionResponse.toData(): Session = Session(
title = this.title,
content = this.content,
speakers = this.speakers.map { it.toData() },
level = this.level.toData(),
tags = this.tags.map { Tag(it) },
room = this.room?.toData() ?: Room.ETC,
startTime = this.startTime,
endTime = this.endTime,
isBookmarked = false
)

internal fun LevelResponse.toData(): Level = when (this) {
LevelResponse.ETC -> Level.ETC
LevelResponse.BASIC -> Level.BASIC
LevelResponse.INTERMEDIATE -> Level.INTERMEDIATE
LevelResponse.ADVANCED -> Level.ADVANCED
}

internal fun RoomResponse.toData(): Room = when (this) {
RoomResponse.ETC -> Room.ETC
RoomResponse.TRACK1 -> Room.TRACK1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package com.droidknights.app.core.data.repository
import app.cash.turbine.test
import com.droidknights.app.core.data.api.fake.FakeGithubRawApi
import com.droidknights.app.core.data.datastore.fake.FakeSessionPreferencesDataSource
import com.droidknights.app.core.model.Level
import com.droidknights.app.core.model.Room
import com.droidknights.app.core.model.Session
import io.kotest.core.spec.style.StringSpec
Expand All @@ -20,14 +19,13 @@ internal class DefaultSessionRepositoryTest : StringSpec() {
"역직렬화 테스트" {
val expected = Session(
id = "1",
title = "Keynote",
title = "키노트",
content = "",
speakers = emptyList(),
level = Level.ETC,
tags = emptyList(),
room = Room.ETC,
startTime = LocalDateTime(2023, 9, 12, 10, 45),
endTime = LocalDateTime(2023, 9, 12, 11, 0),
startTime = LocalDateTime(2024, 6, 11, 10, 40),
endTime = LocalDateTime(2024, 6, 11, 11, 0),
isBookmarked = false
)
val actual = repository.getSessions()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.painter.ColorPainter
import androidx.compose.ui.graphics.painter.Painter
import androidx.compose.ui.graphics.toArgb
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.tooling.preview.Preview
import com.skydoves.landscapist.ImageOptions
import com.skydoves.landscapist.coil.CoilImage
Expand Down Expand Up @@ -42,6 +41,6 @@ fun NetworkImage(
private fun NetworkImagePreview() {
NetworkImage(
imageUrl = "",
placeholder = painterResource(id = Color(0xFFFFFFFF).toArgb()),
placeholder = ColorPainter(Color(0xFF000000)),
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.droidknights.app.core.designsystem.theme

import android.app.Activity
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.material3.ColorScheme
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.darkColorScheme
import androidx.compose.material3.lightColorScheme
Expand Down Expand Up @@ -73,10 +72,6 @@ private val LightColorScheme = lightColorScheme(

val LocalDarkTheme = compositionLocalOf { true }

val ColorScheme.surfaceDim
@Composable
get() = if (LocalDarkTheme.current) Black else PaleGray

@Composable
fun KnightsTheme(
darkTheme: Boolean = isSystemInDarkTheme(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.droidknights.app.core.domain.usecase

import com.droidknights.app.core.model.Level
import com.droidknights.app.core.model.Room
import com.droidknights.app.core.model.Session
import com.droidknights.app.core.model.Speaker
Expand Down Expand Up @@ -55,7 +54,6 @@ internal class GetBookmarkedSessionsUseCaseTest : BehaviorSpec() {
title = "Item3 Title",
content = "Item3 Content",
speakers = listOf(Speaker(name = "철수", introduction = "", imageUrl = "")),
level = Level.BASIC,
tags = listOf(Tag(name = "Architecture")),
room = Room.TRACK1,
startTime = LocalDateTime(2023, 10, 5, 11, 0),
Expand All @@ -67,7 +65,6 @@ internal class GetBookmarkedSessionsUseCaseTest : BehaviorSpec() {
title = "Item1 Title",
content = "Item1 Content",
speakers = listOf(Speaker(name = "영희", introduction = "", imageUrl = "")),
level = Level.BASIC,
tags = listOf(Tag(name = "Architecture")),
room = Room.TRACK1,
startTime = LocalDateTime(2023, 10, 5, 9, 0),
Expand All @@ -79,7 +76,6 @@ internal class GetBookmarkedSessionsUseCaseTest : BehaviorSpec() {
title = "Item2 Title",
content = "Item2 Content",
speakers = listOf(Speaker(name = "민수", introduction = "", imageUrl = "")),
level = Level.BASIC,
tags = listOf(Tag(name = "Architecture")),
room = Room.TRACK1,
startTime = LocalDateTime(2023, 10, 5, 10, 0),
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ data class Session(
val title: String,
val content: String,
val speakers: List<Speaker>,
val level: Level,
val tags: List<Tag>,
val room: Room,
val startTime: LocalDateTime,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import com.droidknights.app.core.designsystem.component.TextChip
import com.droidknights.app.core.designsystem.theme.DarkGray
import com.droidknights.app.core.designsystem.theme.KnightsTheme
import com.droidknights.app.core.designsystem.theme.LightGray
import com.droidknights.app.core.model.Level
import com.droidknights.app.core.model.Room
import com.droidknights.app.core.model.Session
import com.droidknights.app.core.model.Speaker
Expand Down Expand Up @@ -204,7 +203,6 @@ private fun SessionCardPreview() {
imageUrl = "https://picsum.photos/200",
),
),
level = Level.BASIC,
tags = listOf(
Tag("효율적인 코드베이스")
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ import com.droidknights.app.core.designsystem.component.TopAppBarNavigationType
import com.droidknights.app.core.designsystem.theme.DarkGray
import com.droidknights.app.core.designsystem.theme.KnightsTheme
import com.droidknights.app.core.designsystem.theme.LightGray
import com.droidknights.app.core.model.Level
import com.droidknights.app.core.model.Room
import com.droidknights.app.core.model.Session
import com.droidknights.app.core.model.Speaker
Expand Down Expand Up @@ -284,7 +283,6 @@ private val SampleSessionHasContent = Session(
imageUrl = "",
),
),
level = Level.ADVANCED,
tags = listOf(Tag("Dev Environment")),
room = Room.TRACK1,
startTime = LocalDateTime.parse("2023-09-12T11:00:00.000"),
Expand All @@ -303,7 +301,6 @@ private val SampleSessionNoContent = Session(
imageUrl = "",
),
),
level = Level.ADVANCED,
tags = listOf(Tag("Dev Environment")),
room = Room.TRACK1,
startTime = LocalDateTime.parse("2023-09-12T11:00:00.000"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import app.cash.turbine.test
import com.droidknights.app.core.domain.usecase.BookmarkSessionUseCase
import com.droidknights.app.core.domain.usecase.GetBookmarkedSessionIdsUseCase
import com.droidknights.app.core.domain.usecase.GetSessionUseCase
import com.droidknights.app.core.model.Level
import com.droidknights.app.core.model.Room
import com.droidknights.app.core.model.Session
import com.droidknights.app.core.testing.rule.MainDispatcherRule
Expand Down Expand Up @@ -35,7 +34,6 @@ class SessionDetailViewModelTest {
title = "title",
content = "content",
speakers = emptyList(),
level = Level.BASIC,
tags = emptyList(),
room = Room.TRACK1,
startTime = LocalDateTime(2023, 9, 12, 13, 0, 0),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package com.droidknights.app.feature.session
import app.cash.turbine.test
import com.droidknights.app.core.domain.usecase.GetBookmarkedSessionIdsUseCase
import com.droidknights.app.core.domain.usecase.GetSessionsUseCase
import com.droidknights.app.core.model.Level
import com.droidknights.app.core.model.Room
import com.droidknights.app.core.model.Session
import com.droidknights.app.core.testing.rule.MainDispatcherRule
Expand All @@ -30,7 +29,6 @@ internal class SessionViewModelTest {
title = "title",
content = "content",
speakers = emptyList(),
level = Level.BASIC,
tags = emptyList(),
room = Room.TRACK1,
startTime = LocalDateTime(2023, 9, 12, 13, 0, 0),
Expand Down
Binary file removed storage/speaker/Ayushi_Gupta.jpeg
Binary file not shown.
Binary file removed storage/speaker/Enrique_Lopez_Manas.jpeg
Binary file not shown.
Binary file removed storage/speaker/Marton_Braun.png
Binary file not shown.
Binary file added storage/speaker/권대원.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed storage/speaker/권태환.jpg
Binary file not shown.
Binary file added storage/speaker/김민구.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added storage/speaker/김수현.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed storage/speaker/김용욱.jpg
Binary file not shown.
Binary file removed storage/speaker/김준비.jpg
Binary file not shown.
Binary file added storage/speaker/김태성.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed storage/speaker/노현석.jpg
Binary file not shown.
Binary file removed storage/speaker/류기민.jpeg
Binary file not shown.
Binary file added storage/speaker/모진섭.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed storage/speaker/문예지.png
Binary file not shown.
Binary file added storage/speaker/문종락.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added storage/speaker/박동후.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed storage/speaker/박상권.png
Binary file not shown.
Binary file removed storage/speaker/박재성.jpeg
Binary file not shown.
Binary file removed storage/speaker/박종혁.JPG
Binary file not shown.
Binary file removed storage/speaker/박주형.jpeg
Binary file not shown.
Binary file added storage/speaker/배필주.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added storage/speaker/신현성.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed storage/speaker/안성용.jpg
Binary file not shown.
Binary file added storage/speaker/양찬석.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added storage/speaker/엄재웅.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added storage/speaker/운혁.png
Binary file removed storage/speaker/윤영직.png
Diff not rendered.
Binary file removed storage/speaker/이상훈.jpeg
Diff not rendered.
Binary file added storage/speaker/이상훈.png
Binary file added storage/speaker/이현우.png
Binary file removed storage/speaker/정동진.jpeg
Diff not rendered.
Binary file added storage/speaker/정동진.png
Binary file removed storage/speaker/정정환.jpg
Diff not rendered.
Binary file removed storage/speaker/정태훈.jpeg
Diff not rendered.
Binary file modified storage/speaker/차영호.png
Binary file added storage/speaker/최우성.png
Binary file added storage/speaker/최재웅.png
Binary file added storage/speaker/히카맹.png

0 comments on commit 0fe4de2

Please sign in to comment.