Skip to content

Commit c6da703

Browse files
authored
Merge pull request #215 from YAPP-Github/BOOK-416-fix/#212
fix: 독서 기록 화면 감상평 빈 값일 경우 하단 패딩 제거
2 parents 9dcdfbe + 0a43a7d commit c6da703

File tree

5 files changed

+65
-12
lines changed

5 files changed

+65
-12
lines changed

core/designsystem/stability/designsystem.stability

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ private fun com.ninecraft.booket.core.designsystem.component.checkbox.TickOnlyCh
231231

232232
@Composable
233233
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
234-
skippable: false
234+
skippable: true
235235
restartable: true
236236
params:
237237
- recordState: STABLE (marked @Stable or @Immutable)
@@ -246,7 +246,7 @@ public fun com.ninecraft.booket.core.designsystem.component.textfield.ReedRecord
246246
- onNext: STABLE (function type)
247247
- backgroundColor: STABLE (marked @Stable or @Immutable)
248248
- textColor: STABLE (marked @Stable or @Immutable)
249-
- cornerShape: RUNTIME (requires runtime check)
249+
- cornerShape: STABLE (known stable type)
250250
- borderStroke: STABLE (marked @Stable or @Immutable)
251251

252252
@Composable
@@ -257,7 +257,7 @@ private fun com.ninecraft.booket.core.designsystem.component.textfield.ReedRecor
257257

258258
@Composable
259259
public fun com.ninecraft.booket.core.designsystem.component.textfield.ReedTextField(queryState: androidx.compose.foundation.text.input.TextFieldState, queryHintRes: kotlin.Int, onSearch: kotlin.Function1<kotlin.String, kotlin.Unit>, onClear: kotlin.Function0<kotlin.Unit>, modifier: androidx.compose.ui.Modifier, backgroundColor: androidx.compose.ui.graphics.Color, textColor: androidx.compose.ui.graphics.Color, cornerShape: androidx.compose.foundation.shape.RoundedCornerShape, borderStroke: androidx.compose.foundation.BorderStroke?, searchIconTint: androidx.compose.ui.graphics.Color): kotlin.Unit
260-
skippable: false
260+
skippable: true
261261
restartable: true
262262
params:
263263
- queryState: STABLE (marked @Stable or @Immutable)
@@ -267,7 +267,7 @@ public fun com.ninecraft.booket.core.designsystem.component.textfield.ReedTextFi
267267
- modifier: STABLE (marked @Stable or @Immutable)
268268
- backgroundColor: STABLE (marked @Stable or @Immutable)
269269
- textColor: STABLE (marked @Stable or @Immutable)
270-
- cornerShape: RUNTIME (requires runtime check)
270+
- cornerShape: STABLE (known stable type)
271271
- borderStroke: STABLE (marked @Stable or @Immutable)
272272
- searchIconTint: STABLE (marked @Stable or @Immutable)
273273

feature/detail/src/main/kotlin/com/ninecraft/booket/feature/detail/record/RecordDetailUi.kt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,3 +206,30 @@ private fun ReviewDetailPreview() {
206206
)
207207
}
208208
}
209+
210+
@ComponentPreview
211+
@Composable
212+
private fun ReviewDetailEmptyPreview() {
213+
ReedTheme {
214+
RecordDetailUi(
215+
state = RecordDetailUiState(
216+
uiState = UiState.Success,
217+
recordDetailInfo = RecordDetailModel(
218+
id = "",
219+
userBookId = "",
220+
pageNumber = 90,
221+
quote = "소설가들은 늘 소재를 찾아 떠도는 존재 같지만, 실은 그 반대인 경우가 더 잦다.",
222+
review = "",
223+
emotionTags = listOf("따뜻함"),
224+
createdAt = "2023.10.10",
225+
updatedAt = "",
226+
bookTitle = "여름은 오래 그곳에 남아",
227+
bookPublisher = "비채 비채 비채 비채",
228+
bookCoverImageUrl = "",
229+
author = "미쓰이에 마사시, 미쓰이에 마사시, 미쓰이에 마사시, 미쓰이에 마사시",
230+
),
231+
eventSink = {},
232+
),
233+
)
234+
}
235+
}

feature/detail/src/main/kotlin/com/ninecraft/booket/feature/detail/record/component/ReviewItem.kt

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ internal fun ReviewItem(
3939
)
4040
.padding(
4141
horizontal = ReedTheme.spacing.spacing4,
42-
vertical = ReedTheme.spacing.spacing3,
42+
vertical = ReedTheme.spacing.spacing4,
4343
),
4444
) {
4545
Column {
@@ -68,12 +68,14 @@ internal fun ReviewItem(
6868
style = ReedTheme.typography.label2Regular,
6969
)
7070
}
71-
Spacer(modifier = Modifier.height(ReedTheme.spacing.spacing3))
72-
Text(
73-
text = review,
74-
color = ReedTheme.colors.contentSecondary,
75-
style = ReedTheme.typography.label1Medium,
76-
)
71+
if (review.isNotBlank()) {
72+
Spacer(modifier = Modifier.height(ReedTheme.spacing.spacing3))
73+
Text(
74+
text = review,
75+
color = ReedTheme.colors.contentSecondary,
76+
style = ReedTheme.typography.label1Medium,
77+
)
78+
}
7779
}
7880
}
7981
}
@@ -89,3 +91,15 @@ private fun ReviewBoxPreview() {
8991
)
9092
}
9193
}
94+
95+
@ComponentPreview
96+
@Composable
97+
private fun ReviewBoxEmptyPreview() {
98+
ReedTheme {
99+
ReviewItem(
100+
emotion = "따뜻함",
101+
review = "",
102+
createdAt = "2025.06.25",
103+
)
104+
}
105+
}

feature/detail/stability/detail.stability

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,12 @@ internal fun com.ninecraft.booket.feature.detail.record.RecordDetailUi(state: co
294294
- state: STABLE
295295
- modifier: STABLE (marked @Stable or @Immutable)
296296

297+
@Composable
298+
private fun com.ninecraft.booket.feature.detail.record.ReviewDetailEmptyPreview(): kotlin.Unit
299+
skippable: true
300+
restartable: true
301+
params:
302+
297303
@Composable
298304
private fun com.ninecraft.booket.feature.detail.record.ReviewDetailPreview(): kotlin.Unit
299305
skippable: true
@@ -362,6 +368,12 @@ private fun com.ninecraft.booket.feature.detail.record.component.RecordMenuItem(
362368
- onClick: STABLE (function type)
363369
- modifier: STABLE (marked @Stable or @Immutable)
364370

371+
@Composable
372+
private fun com.ninecraft.booket.feature.detail.record.component.ReviewBoxEmptyPreview(): kotlin.Unit
373+
skippable: true
374+
restartable: true
375+
params:
376+
365377
@Composable
366378
private fun com.ninecraft.booket.feature.detail.record.component.ReviewBoxPreview(): kotlin.Unit
367379
skippable: true

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ androidx-compose-material3 = "1.4.0-alpha18"
2424
compose-stable-marker = "1.0.6"
2525
compose-effects = "0.1.1"
2626
compose-shadow = "2.0.4"
27-
compose-stability-analyzer = "0.4.0"
27+
compose-stability-analyzer = "0.4.1"
2828

2929
## Kotlin Symbol Processing
3030
ksp = "2.3.0"

0 commit comments

Comments
 (0)