Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
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
3 changes: 3 additions & 0 deletions .github/workflows/android-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,8 @@ jobs:
- name: Generate google-services.json
run: echo '${{ secrets.GOOGLE_SERVICES }}' | base64 -d > ./app/google-services.json

- name: Compose Stability Dump
run: ./gradlew stabilityDump

- name: Compose Stability Check
run: ./gradlew stabilityCheck
2 changes: 1 addition & 1 deletion app/stability/app.stability
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public fun com.ninecraft.booket.di.CrossFadeNavDecorator.Decoration(targetState:
skippable: false
restartable: true
params:
- targetState: RUNTIME (requires runtime check)
- targetState: UNSTABLE (has mutable properties or unstable members)
- innerContent: STABLE (composable function type)

@Composable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
package com.ninecraft.booket.core.designsystem

import android.content.res.Configuration.UI_MODE_NIGHT_NO
import android.content.res.Configuration.UI_MODE_NIGHT_YES
import androidx.compose.ui.tooling.preview.Preview

@Preview(
name = "Light",
showBackground = true,
uiMode = UI_MODE_NIGHT_NO,
)
@Preview(
name = "Dark",
showBackground = true,
uiMode = UI_MODE_NIGHT_YES,
)
annotation class ComponentPreview
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.ninecraft.booket.core.designsystem

import android.content.res.Configuration.UI_MODE_NIGHT_NO
import android.content.res.Configuration.UI_MODE_NIGHT_YES
import androidx.compose.ui.tooling.preview.Preview

@Preview(
Expand All @@ -10,10 +9,4 @@ import androidx.compose.ui.tooling.preview.Preview
uiMode = UI_MODE_NIGHT_NO,
device = "spec:width=360dp,height=800dp,dpi=411",
)
@Preview(
name = "Dark",
showBackground = true,
uiMode = UI_MODE_NIGHT_YES,
device = "spec:width=360dp,height=800dp,dpi=411",
)
annotation class DevicePreview
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
package com.ninecraft.booket.core.designsystem

import androidx.compose.ui.graphics.Color
import com.ninecraft.booket.core.designsystem.theme.Blue300
import com.ninecraft.booket.core.designsystem.theme.EtcBgColor
import com.ninecraft.booket.core.designsystem.theme.EtcTextColor
import com.ninecraft.booket.core.designsystem.theme.InsightBgColor
import com.ninecraft.booket.core.designsystem.theme.InsightTextColor
import com.ninecraft.booket.core.designsystem.theme.JoyBgColor
import com.ninecraft.booket.core.designsystem.theme.JoyTextColor
import com.ninecraft.booket.core.designsystem.theme.Neutral300
import com.ninecraft.booket.core.designsystem.theme.Orange300
import com.ninecraft.booket.core.designsystem.theme.SadnessBgColor
import com.ninecraft.booket.core.designsystem.theme.SadnessTextColor
import com.ninecraft.booket.core.designsystem.theme.Violet300
import com.ninecraft.booket.core.designsystem.theme.WarmthBgColor
import com.ninecraft.booket.core.designsystem.theme.WarmthTextColor
import com.ninecraft.booket.core.designsystem.theme.Yellow300
import com.ninecraft.booket.core.model.Emotion

val Emotion.bgColor: Color
Expand All @@ -17,6 +24,7 @@ val Emotion.bgColor: Color
Emotion.JOY -> JoyBgColor
Emotion.SAD -> SadnessBgColor
Emotion.INSIGHT -> InsightBgColor
Emotion.ETC -> EtcBgColor
}

val Emotion.textColor: Color
Expand All @@ -25,6 +33,7 @@ val Emotion.textColor: Color
Emotion.JOY -> JoyTextColor
Emotion.SAD -> SadnessTextColor
Emotion.INSIGHT -> InsightTextColor
Emotion.ETC -> EtcTextColor
Copy link
Contributor

Choose a reason for hiding this comment

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

API 연동하실 때 EmotionCode 기반으로 변경하면 될 것 같습니다!

}

val Emotion.graphicRes: Int
Expand All @@ -33,14 +42,25 @@ val Emotion.graphicRes: Int
Emotion.JOY -> R.drawable.img_emotion_joy
Emotion.SAD -> R.drawable.img_emotion_sadness
Emotion.INSIGHT -> R.drawable.img_emotion_insight
Emotion.ETC -> R.drawable.img_emotion_warmth
}

val Emotion.graphicResV2: Int
val Emotion.ratioBarColor: Color
get() = when (this) {
Emotion.WARM -> Yellow300
Emotion.JOY -> Orange300
Emotion.SAD -> Blue300
Emotion.INSIGHT -> Violet300
Emotion.ETC -> Neutral300
}

val Emotion.graphicResV2: Int?
get() = when (this) {
Emotion.WARM -> R.drawable.img_category_warm
Emotion.JOY -> R.drawable.img_category_joy
Emotion.SAD -> R.drawable.img_category_sad
Emotion.INSIGHT -> R.drawable.img_category_insight
Emotion.ETC -> null
}

val Emotion.descriptionRes: Int
Expand All @@ -49,4 +69,5 @@ val Emotion.descriptionRes: Int
Emotion.JOY -> R.string.emotion_joy_description
Emotion.SAD -> R.string.emotion_sad_description
Emotion.INSIGHT -> R.string.emotion_insight_description
Emotion.ETC -> R.string.emotion_etc_description
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,28 @@ val Blue700 = Color(0xFF007BFF)
val Blue800 = Color(0xFF1269EC)
val Blue900 = Color(0xFF1F47CD)

val Orange50 = Color(0xFFFFF1EB)
val Orange100 = Color(0xFFFFD2BE)
val Orange200 = Color(0xFFFFB392)
val Orange300 = Color(0xFFFF9365)
val Orange400 = Color(0xFFEF6D35)
val Orange500 = Color(0xFFCD5622)
val Orange600 = Color(0xFFAB4114)
val Orange700 = Color(0xFF892F08)
val Orange800 = Color(0xFF672001)
val Orange900 = Color(0xFF451500)

val Violet50 = Color(0xFFF7F0FF)
val Violet100 = Color(0xFFE6CEFF)
val Violet200 = Color(0xFFD4ADFF)
val Violet300 = Color(0xFFC38CFF)
val Violet400 = Color(0xFFB26AFF)
val Violet500 = Color(0xFF9A55E4)
val Violet600 = Color(0xFF7F40C2)
val Violet700 = Color(0xFF652EA0)
val Violet800 = Color(0xFF4C1E7E)
val Violet900 = Color(0xFF36125C)

val Kakao = Color(0xFFFBD300)
val Blank = Color(0xFFD6D6D6)
val HomeBg = Color(0xFFF0F9E8)
Expand All @@ -76,6 +98,8 @@ val InsightTextColor = Color(0xFF9A55E4)
val InsightBgColor = Color(0xFFF3E8FF)
val SadnessTextColor = Color(0xFF2872E9)
val SadnessBgColor = Color(0xFFE1ECFF)
val EtcTextColor = Color(0xFF737373)
val EtcBgColor = Color(0xFFF5F5F5)

@Immutable
data class ReedColorScheme(
Expand Down
1 change: 1 addition & 0 deletions core/designsystem/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
<string name="emotion_joy_description">흥미롭고 유쾌한 순간</string>
<string name="emotion_sad_description">눈물이 고인 순간</string>
<string name="emotion_insight_description">생각이 깊어지는 순간</string>
<string name="emotion_etc_description">네 가지 감정으로 표현하기 어려울 때</string>
</resources>
80 changes: 40 additions & 40 deletions core/designsystem/stability/designsystem.stability
Original file line number Diff line number Diff line change
Expand Up @@ -42,43 +42,53 @@ public fun com.ninecraft.booket.core.designsystem.component.ResourceImage(imageR
- contentScale: STABLE (marked @Stable or @Immutable)

@Composable
public fun com.ninecraft.booket.core.designsystem.component.button.<get-largeButtonStyle>(): com.ninecraft.booket.core.designsystem.component.button.ButtonSizeStyle
public fun com.ninecraft.booket.core.designsystem.component.button.ReedButton(onClick: kotlin.Function0<kotlin.Unit>, text: kotlin.String, sizeStyle: com.ninecraft.booket.core.designsystem.component.button.ButtonSizeStyle, colorStyle: com.ninecraft.booket.core.designsystem.component.button.ReedButtonColorStyle, modifier: androidx.compose.ui.Modifier, enabled: kotlin.Boolean, leadingIcon: @[Composable] androidx.compose.runtime.internal.ComposableFunction0<kotlin.Unit>?, trailingIcon: @[Composable] androidx.compose.runtime.internal.ComposableFunction0<kotlin.Unit>?, multipleEventsCutterEnabled: kotlin.Boolean): kotlin.Unit
skippable: true
restartable: true
params:
- onClick: STABLE (function type)
- text: STABLE (String is immutable)
- sizeStyle: STABLE (class with no mutable properties)
- colorStyle: STABLE (class with no mutable properties)
- modifier: STABLE (marked @Stable or @Immutable)
- enabled: STABLE (primitive type)
- leadingIcon: STABLE (composable function type)
- trailingIcon: STABLE (composable function type)
- multipleEventsCutterEnabled: STABLE (primitive type)

@Composable
public fun com.ninecraft.booket.core.designsystem.component.button.<get-largeRoundedButtonStyle>(): com.ninecraft.booket.core.designsystem.component.button.ButtonSizeStyle
public fun com.ninecraft.booket.core.designsystem.component.button.ReedButtonColorStyle.borderStroke(): androidx.compose.foundation.BorderStroke?
skippable: true
restartable: true
params:

@Composable
public fun com.ninecraft.booket.core.designsystem.component.button.<get-mediumButtonStyle>(): com.ninecraft.booket.core.designsystem.component.button.ButtonSizeStyle
public fun com.ninecraft.booket.core.designsystem.component.button.ReedButtonColorStyle.containerColor(isPressed: kotlin.Boolean): androidx.compose.ui.graphics.Color
skippable: true
restartable: true
params:
- isPressed: STABLE (primitive type)

@Composable
public fun com.ninecraft.booket.core.designsystem.component.button.<get-mediumRoundedButtonStyle>(): com.ninecraft.booket.core.designsystem.component.button.ButtonSizeStyle
public fun com.ninecraft.booket.core.designsystem.component.button.ReedButtonColorStyle.contentColor(): androidx.compose.ui.graphics.Color
skippable: true
restartable: true
params:

@Composable
public fun com.ninecraft.booket.core.designsystem.component.button.<get-smallButtonStyle>(): com.ninecraft.booket.core.designsystem.component.button.ButtonSizeStyle
public fun com.ninecraft.booket.core.designsystem.component.button.ReedButtonColorStyle.disabledContainerColor(): androidx.compose.ui.graphics.Color
skippable: true
restartable: true
params:

@Composable
public fun com.ninecraft.booket.core.designsystem.component.button.<get-smallRoundedButtonStyle>(): com.ninecraft.booket.core.designsystem.component.button.ButtonSizeStyle
public fun com.ninecraft.booket.core.designsystem.component.button.ReedButtonColorStyle.disabledContentColor(): androidx.compose.ui.graphics.Color
skippable: true
restartable: true
params:

@Composable
public fun com.ninecraft.booket.core.designsystem.component.button.ReedButton(onClick: kotlin.Function0<kotlin.Unit>, text: kotlin.String, sizeStyle: com.ninecraft.booket.core.designsystem.component.button.ButtonSizeStyle, colorStyle: com.ninecraft.booket.core.designsystem.component.button.ReedButtonColorStyle, modifier: androidx.compose.ui.Modifier, enabled: kotlin.Boolean, leadingIcon: @[Composable] androidx.compose.runtime.internal.ComposableFunction0<kotlin.Unit>?, trailingIcon: @[Composable] androidx.compose.runtime.internal.ComposableFunction0<kotlin.Unit>?, multipleEventsCutterEnabled: kotlin.Boolean): kotlin.Unit
public fun com.ninecraft.booket.core.designsystem.component.button.ReedTextButton(onClick: kotlin.Function0<kotlin.Unit>, text: kotlin.String, sizeStyle: com.ninecraft.booket.core.designsystem.component.button.ButtonSizeStyle, colorStyle: com.ninecraft.booket.core.designsystem.component.button.ReedButtonColorStyle, modifier: androidx.compose.ui.Modifier, enabled: kotlin.Boolean, multipleEventsCutterEnabled: kotlin.Boolean): kotlin.Unit
skippable: true
restartable: true
params:
Expand All @@ -88,53 +98,43 @@ public fun com.ninecraft.booket.core.designsystem.component.button.ReedButton(on
- colorStyle: STABLE (class with no mutable properties)
- modifier: STABLE (marked @Stable or @Immutable)
- enabled: STABLE (primitive type)
- leadingIcon: STABLE (composable function type)
- trailingIcon: STABLE (composable function type)
- multipleEventsCutterEnabled: STABLE (primitive type)

@Composable
public fun com.ninecraft.booket.core.designsystem.component.button.ReedButtonColorStyle.borderStroke(): androidx.compose.foundation.BorderStroke?
public fun com.ninecraft.booket.core.designsystem.component.button.largeButtonStyle(): com.ninecraft.booket.core.designsystem.component.button.ButtonSizeStyle
skippable: true
restartable: true
params:

@Composable
public fun com.ninecraft.booket.core.designsystem.component.button.ReedButtonColorStyle.containerColor(isPressed: kotlin.Boolean): androidx.compose.ui.graphics.Color
public fun com.ninecraft.booket.core.designsystem.component.button.largeRoundedButtonStyle(): com.ninecraft.booket.core.designsystem.component.button.ButtonSizeStyle
skippable: true
restartable: true
params:
- isPressed: STABLE (primitive type)

@Composable
public fun com.ninecraft.booket.core.designsystem.component.button.ReedButtonColorStyle.contentColor(): androidx.compose.ui.graphics.Color
public fun com.ninecraft.booket.core.designsystem.component.button.mediumButtonStyle(): com.ninecraft.booket.core.designsystem.component.button.ButtonSizeStyle
skippable: true
restartable: true
params:

@Composable
public fun com.ninecraft.booket.core.designsystem.component.button.ReedButtonColorStyle.disabledContainerColor(): androidx.compose.ui.graphics.Color
public fun com.ninecraft.booket.core.designsystem.component.button.mediumRoundedButtonStyle(): com.ninecraft.booket.core.designsystem.component.button.ButtonSizeStyle
skippable: true
restartable: true
params:

@Composable
public fun com.ninecraft.booket.core.designsystem.component.button.ReedButtonColorStyle.disabledContentColor(): androidx.compose.ui.graphics.Color
public fun com.ninecraft.booket.core.designsystem.component.button.smallButtonStyle(): com.ninecraft.booket.core.designsystem.component.button.ButtonSizeStyle
skippable: true
restartable: true
params:

@Composable
public fun com.ninecraft.booket.core.designsystem.component.button.ReedTextButton(onClick: kotlin.Function0<kotlin.Unit>, text: kotlin.String, sizeStyle: com.ninecraft.booket.core.designsystem.component.button.ButtonSizeStyle, colorStyle: com.ninecraft.booket.core.designsystem.component.button.ReedButtonColorStyle, modifier: androidx.compose.ui.Modifier, enabled: kotlin.Boolean, multipleEventsCutterEnabled: kotlin.Boolean): kotlin.Unit
public fun com.ninecraft.booket.core.designsystem.component.button.smallRoundedButtonStyle(): com.ninecraft.booket.core.designsystem.component.button.ButtonSizeStyle
skippable: true
restartable: true
params:
- onClick: STABLE (function type)
- text: STABLE (String is immutable)
- sizeStyle: STABLE (class with no mutable properties)
- colorStyle: STABLE (class with no mutable properties)
- modifier: STABLE (marked @Stable or @Immutable)
- enabled: STABLE (primitive type)
- multipleEventsCutterEnabled: STABLE (primitive type)

@Composable
public fun com.ninecraft.booket.core.designsystem.component.checkbox.CircleCheckBox(checked: kotlin.Boolean, onCheckedChange: kotlin.Function1<kotlin.Boolean, kotlin.Unit>, modifier: androidx.compose.ui.Modifier): kotlin.Unit
Expand Down Expand Up @@ -163,18 +163,6 @@ public fun com.ninecraft.booket.core.designsystem.component.checkbox.TickOnlyChe
- onCheckedChange: STABLE (function type)
- modifier: STABLE (marked @Stable or @Immutable)

@Composable
public fun com.ninecraft.booket.core.designsystem.component.chip.<get-mediumChipStyle>(): com.ninecraft.booket.core.designsystem.component.chip.ChipSizeStyle
skippable: true
restartable: true
params:

@Composable
public fun com.ninecraft.booket.core.designsystem.component.chip.<get-smallChipStyle>(): com.ninecraft.booket.core.designsystem.component.chip.ChipSizeStyle
skippable: true
restartable: true
params:

@Composable
public fun com.ninecraft.booket.core.designsystem.component.chip.ReedRemovableChip(label: kotlin.String, chipSizeStyle: com.ninecraft.booket.core.designsystem.component.chip.ChipSizeStyle, onRemove: kotlin.Function0<kotlin.Unit>, modifier: androidx.compose.ui.Modifier): kotlin.Unit
skippable: true
Expand All @@ -196,6 +184,18 @@ public fun com.ninecraft.booket.core.designsystem.component.chip.ReedSelectableC
- onClick: STABLE (function type)
- modifier: STABLE (marked @Stable or @Immutable)

@Composable
public fun com.ninecraft.booket.core.designsystem.component.chip.mediumChipStyle(): com.ninecraft.booket.core.designsystem.component.chip.ChipSizeStyle
skippable: true
restartable: true
params:

@Composable
public fun com.ninecraft.booket.core.designsystem.component.chip.smallChipStyle(): com.ninecraft.booket.core.designsystem.component.chip.ChipSizeStyle
skippable: true
restartable: true
params:

@Composable
public fun com.ninecraft.booket.core.designsystem.component.textfield.ReedRecordTextField(recordState: androidx.compose.foundation.text.input.TextFieldState, recordHintRes: kotlin.Int, modifier: androidx.compose.ui.Modifier, inputTransformation: androidx.compose.foundation.text.input.InputTransformation?, keyboardOptions: androidx.compose.foundation.text.KeyboardOptions, lineLimits: androidx.compose.foundation.text.input.TextFieldLineLimits, isError: kotlin.Boolean, errorMessage: kotlin.String, onClear: kotlin.Function0<kotlin.Unit>?, onNext: kotlin.Function0<kotlin.Unit>, backgroundColor: androidx.compose.ui.graphics.Color, textColor: androidx.compose.ui.graphics.Color, cornerShape: androidx.compose.foundation.shape.RoundedCornerShape, borderStroke: androidx.compose.foundation.BorderStroke): kotlin.Unit
skippable: true
Expand Down Expand Up @@ -240,31 +240,31 @@ public fun com.ninecraft.booket.core.designsystem.theme.ReedTheme(content: @[Com
- content: STABLE (composable function type)

@Composable
public fun com.ninecraft.booket.core.designsystem.theme.ReedTheme.<get-border>(): com.ninecraft.booket.core.designsystem.theme.ReedBorder
public fun com.ninecraft.booket.core.designsystem.theme.ReedTheme.border(): com.ninecraft.booket.core.designsystem.theme.ReedBorder
skippable: true
restartable: true
params:

@Composable
public fun com.ninecraft.booket.core.designsystem.theme.ReedTheme.<get-colors>(): com.ninecraft.booket.core.designsystem.theme.ReedColorScheme
public fun com.ninecraft.booket.core.designsystem.theme.ReedTheme.colors(): com.ninecraft.booket.core.designsystem.theme.ReedColorScheme
skippable: true
restartable: true
params:

@Composable
public fun com.ninecraft.booket.core.designsystem.theme.ReedTheme.<get-radius>(): com.ninecraft.booket.core.designsystem.theme.ReedRadius
public fun com.ninecraft.booket.core.designsystem.theme.ReedTheme.radius(): com.ninecraft.booket.core.designsystem.theme.ReedRadius
skippable: true
restartable: true
params:

@Composable
public fun com.ninecraft.booket.core.designsystem.theme.ReedTheme.<get-spacing>(): com.ninecraft.booket.core.designsystem.theme.ReedSpacing
public fun com.ninecraft.booket.core.designsystem.theme.ReedTheme.spacing(): com.ninecraft.booket.core.designsystem.theme.ReedSpacing
skippable: true
restartable: true
params:

@Composable
public fun com.ninecraft.booket.core.designsystem.theme.ReedTheme.<get-typography>(): com.ninecraft.booket.core.designsystem.theme.ReedTypography
public fun com.ninecraft.booket.core.designsystem.theme.ReedTheme.typography(): com.ninecraft.booket.core.designsystem.theme.ReedTypography
skippable: true
restartable: true
params:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.ninecraft.booket.core.model

import androidx.compose.runtime.Stable
import androidx.compose.runtime.Immutable

data class ReadingRecordsModel(
val lastPage: Boolean = true,
Expand All @@ -10,7 +10,7 @@ data class ReadingRecordsModel(
val readingRecords: List<ReadingRecordModel> = emptyList(),
)

@Stable
@Immutable
data class ReadingRecordModel(
val id: String = "",
val userBookId: String = "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ enum class Emotion(
JOY("즐거움"),
SAD("슬픔"),
INSIGHT("깨달음"),
ETC("기타"),
;

companion object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ interface ReedService {
@Path("userBookId") userBookId: String,
): SeedResponse

@GET("api/v1/reading-records/detail/{readingRecordId}")
@GET("api/v2/reading-records/detail/{readingRecordId}")
suspend fun getRecordDetail(
@Path("readingRecordId") readingRecordId: String,
): RecordDetailResponse
Expand Down
Loading
Loading