Skip to content
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 @@ -19,7 +19,7 @@ val largeButtonStyle: ButtonSizeStyle
@Composable get() = ButtonSizeStyle(
paddingValues = PaddingValues(
horizontal = ReedTheme.spacing.spacing5,
vertical = ReedTheme.spacing.spacing3,
vertical = 14.dp,
),
radius = ReedTheme.radius.sm,
textStyle = ReedTheme.typography.body1Medium,
Expand All @@ -36,7 +36,7 @@ val mediumButtonStyle: ButtonSizeStyle
radius = ReedTheme.radius.sm,
textStyle = ReedTheme.typography.label1Medium,
iconSpacing = ReedTheme.spacing.spacing1,
iconSize = 24.dp,
iconSize = 22.dp,
)

val smallButtonStyle: ButtonSizeStyle
Expand All @@ -48,7 +48,7 @@ val smallButtonStyle: ButtonSizeStyle
radius = ReedTheme.radius.xs,
textStyle = ReedTheme.typography.label1Medium,
iconSpacing = ReedTheme.spacing.spacing1,
iconSize = 22.dp,
iconSize = 18.dp,
)

val largeRoundedButtonStyle: ButtonSizeStyle
Expand All @@ -72,7 +72,7 @@ val mediumRoundedButtonStyle: ButtonSizeStyle
radius = ReedTheme.radius.full,
textStyle = ReedTheme.typography.label1Medium,
iconSpacing = ReedTheme.spacing.spacing1,
iconSize = 24.dp,
iconSize = 22.dp,
)

val smallRoundedButtonStyle: ButtonSizeStyle
Expand All @@ -84,5 +84,5 @@ val smallRoundedButtonStyle: ButtonSizeStyle
radius = ReedTheme.radius.full,
textStyle = ReedTheme.typography.label1Medium,
iconSpacing = ReedTheme.spacing.spacing1,
iconSize = 22.dp,
iconSize = 18.dp,
)
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ fun ReedDialog(
textAlign = TextAlign.Center,
style = ReedTheme.typography.headline1SemiBold,
)
Spacer(modifier = Modifier.height(ReedTheme.spacing.spacing2))

if (!description.isNullOrEmpty()) {
Spacer(modifier = Modifier.height(ReedTheme.spacing.spacing2))
}
}
description?.let {
Text(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import com.ninecraft.booket.core.designsystem.ComponentPreview
import com.ninecraft.booket.core.designsystem.component.ReedDivider
import com.ninecraft.booket.core.designsystem.component.button.ReedButton
import com.ninecraft.booket.core.designsystem.component.button.ReedButtonColorStyle
import com.ninecraft.booket.core.designsystem.component.button.largeButtonStyle
import com.ninecraft.booket.core.designsystem.component.button.mediumButtonStyle
import com.ninecraft.booket.core.designsystem.theme.ReedTheme
import com.ninecraft.booket.core.model.BookDetailModel
import com.ninecraft.booket.core.ui.ReedScaffold
Expand Down Expand Up @@ -181,7 +181,7 @@ internal fun BookDetailContent(
BookStatus.fromValue(state.bookDetail.userBookStatus)?.getDisplayNameRes()
?: BookStatus.BEFORE_READING.getDisplayNameRes(),
),
sizeStyle = largeButtonStyle,
sizeStyle = mediumButtonStyle,
colorStyle = ReedButtonColorStyle.SECONDARY,
modifier = Modifier.widthIn(min = 98.dp),
trailingIcon = {
Expand All @@ -199,7 +199,7 @@ internal fun BookDetailContent(
state.eventSink(BookDetailUiEvent.OnRegisterRecordButtonClick)
},
text = stringResource(R.string.register_book_record),
sizeStyle = largeButtonStyle,
sizeStyle = mediumButtonStyle,
colorStyle = ReedButtonColorStyle.PRIMARY,
modifier = Modifier.weight(1f),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ internal fun BookItem(
)
}
}
Spacer(modifier = Modifier.height(ReedTheme.spacing.spacing05))
Text(
text = bookDetail.pubDate.formatPublishYear(),
color = ReedTheme.colors.contentTertiary,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import com.ninecraft.booket.core.common.constants.BookStatus
import com.ninecraft.booket.core.designsystem.ComponentPreview
import com.ninecraft.booket.core.designsystem.component.button.ReedButton
Expand Down Expand Up @@ -140,7 +141,7 @@ fun RowScope.BookStatusItem(
interactionSource = remember { MutableInteractionSource() },
onClick = onClick,
)
.padding(vertical = ReedTheme.spacing.spacing3),
.padding(vertical = 14.dp),
contentAlignment = Alignment.Center,
) {
Text(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,14 @@ internal fun ReadingRecordsHeader(
}
Row(
modifier = Modifier.clickable { onReadingRecordClick() },
verticalAlignment = Alignment.CenterVertically,
) {
Text(
text = stringResource(currentRecordSort.getDisplayNameRes()),
color = ReedTheme.colors.contentSecondary,
style = ReedTheme.typography.label1Medium,
)
Spacer(modifier = Modifier.width(ReedTheme.spacing.spacing1))
Icon(
imageVector = ImageVector.vectorResource(designR.drawable.ic_chevron_down),
contentDescription = "Dropdown Icon",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ internal fun RecordItem(
contentDescription = "Emotion Graphic",
modifier = Modifier
.size(40.dp)
.clip(CircleShape),
.clip(CircleShape)
.background(ReedTheme.colors.basePrimary),
)
Comment on lines +67 to 69
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

원형 배경이 사각으로 렌더링될 수 있음 — background에 Shape 지정 필요

clip(CircleShape) 다음에 background(color)만 호출하면 배경은 사각형으로 그려집니다. 디자인 의도(원형 배경)에 맞추려면 backgroundshape를 명시해 주세요.

적용 예시:

-                    .clip(CircleShape)
-                    .background(ReedTheme.colors.basePrimary),
+                    .clip(CircleShape)
+                    .background(ReedTheme.colors.basePrimary, CircleShape),
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.clip(CircleShape)
.background(ReedTheme.colors.basePrimary),
)
.clip(CircleShape)
.background(ReedTheme.colors.basePrimary, CircleShape),
)
🤖 Prompt for AI Agents
In
feature/detail/src/main/kotlin/com/ninecraft/booket/feature/detail/book/component/RecordItem.kt
around lines 67-69, the modifier uses .clip(CircleShape) followed by
.background(ReedTheme.colors.basePrimary) which causes the background to render
as a rectangle; update the background call to specify the shape (e.g.,
.background(color = ReedTheme.colors.basePrimary, shape = CircleShape)) so the
background is drawn circularly (you can keep clip for safety or remove it if
redundant).

Spacer(modifier = Modifier.width(ReedTheme.spacing.spacing2))
Column {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.selection.selectable
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
import androidx.compose.material3.SheetState
import androidx.compose.material3.SheetValue
Expand All @@ -24,6 +25,7 @@ import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import com.ninecraft.booket.core.designsystem.ComponentPreview
import com.ninecraft.booket.core.designsystem.theme.ReedTheme
import com.ninecraft.booket.core.ui.component.ReedBottomSheet
Expand Down Expand Up @@ -52,15 +54,13 @@ internal fun RecordSortBottomSheet(
) {
Column(
modifier = modifier
.padding(
start = ReedTheme.spacing.spacing5,
top = ReedTheme.spacing.spacing5,
end = ReedTheme.spacing.spacing5,
),
.padding(top = ReedTheme.spacing.spacing5),
horizontalAlignment = Alignment.CenterHorizontally,
) {
Row(
modifier = Modifier.fillMaxWidth(),
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = ReedTheme.spacing.spacing5),
horizontalArrangement = Arrangement.SpaceBetween,
) {
Text(
Expand All @@ -77,12 +77,12 @@ internal fun RecordSortBottomSheet(
},
)
}
Spacer(modifier = Modifier.height(ReedTheme.spacing.spacing5))
Spacer(modifier = Modifier.height(ReedTheme.spacing.spacing3))
Column(
modifier = Modifier.fillMaxWidth(),
verticalArrangement = Arrangement.Center,
) {
recordSortItems.forEach { item ->
recordSortItems.forEachIndexed { index, item ->
RecordSortItem(
item = item,
selected = item == currentRecordSort,
Expand All @@ -91,7 +91,16 @@ internal fun RecordSortBottomSheet(
onItemSelected(item)
}
},
modifier = Modifier.padding(horizontal = ReedTheme.spacing.spacing5),
)

if (index < recordSortItems.lastIndex) {
HorizontalDivider(
modifier = Modifier.fillMaxWidth(),
thickness = 1.dp,
color = ReedTheme.colors.dividerSm,
)
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ internal fun SeedItem(
Text(
text = emotion.name.displayName,
color = emotion.name.toTextColor(),
style = ReedTheme.typography.body2Medium,
style = ReedTheme.typography.label2SemiBold,
)
}
Spacer(modifier = Modifier.height(ReedTheme.spacing.spacing1))
Text(
text = "${emotion.count}",
color = ReedTheme.colors.contentSecondary,
style = ReedTheme.typography.body2Medium,
style = ReedTheme.typography.label2Regular,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ fun ReviewBox(
contentDescription = "Emotion Graphic",
modifier = Modifier
.size(ReedTheme.spacing.spacing10)
.clip(CircleShape),
.clip(CircleShape)
.background(ReedTheme.colors.basePrimary),
)
Comment on lines +55 to 57
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

원형 배경이 사각으로 렌더링될 수 있음 — background에 Shape 지정 필요

clip(CircleShape) 뒤의 background(color)는 배경을 사각형으로 그립니다. 원형 배경을 의도하셨다면 shape를 지정해 주세요.

-                        .clip(CircleShape)
-                        .background(ReedTheme.colors.basePrimary),
+                        .clip(CircleShape)
+                        .background(ReedTheme.colors.basePrimary, CircleShape),
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.clip(CircleShape)
.background(ReedTheme.colors.basePrimary),
)
.clip(CircleShape)
.background(ReedTheme.colors.basePrimary, CircleShape),
)
🤖 Prompt for AI Agents
In
feature/detail/src/main/kotlin/com/ninecraft/booket/feature/detail/record/component/ReviewBox.kt
around lines 55 to 57, the call to .background(ReedTheme.colors.basePrimary)
draws a rectangular background despite the preceding .clip(CircleShape); change
the background call to specify the shape so the background is circular (e.g.,
.background(color = ReedTheme.colors.basePrimary, shape = CircleShape)) so the
rendered background matches the clipped CircleShape.

Spacer(modifier = Modifier.width(ReedTheme.spacing.spacing2))
Text(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ internal fun HomeContent(
onBookRegisterClick = {
state.eventSink(HomeUiEvent.OnBookRegisterClick)
},
modifier = Modifier.padding(ReedTheme.spacing.spacing5),
modifier = Modifier.padding(horizontal = ReedTheme.spacing.spacing5),
)
} else {
val pagerState = rememberPagerState(pageCount = { state.recentBooks.size })
Expand Down Expand Up @@ -190,6 +190,7 @@ private fun HomePreview() {
ReedTheme {
HomeUi(
state = HomeUiState(
uiState = UiState.Success,
eventSink = {},
),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,14 @@ fun BookCard(
}
.padding(
horizontal = ReedTheme.spacing.spacing3,
vertical = ReedTheme.spacing.spacing2,
vertical = 9.dp,
),
verticalAlignment = Alignment.CenterVertically,
) {
Image(
painter = painterResource(R.drawable.img_seed_count),
contentDescription = "Seed Count Image",
modifier = Modifier.size(32.dp),
modifier = Modifier.size(ReedTheme.spacing.spacing7),
)
Spacer(modifier = Modifier.width(ReedTheme.spacing.spacing1))
Text(
Expand Down Expand Up @@ -224,8 +224,8 @@ fun EmptyBookCard(
shape = RoundedCornerShape(ReedTheme.radius.sm),
)
.border(
width = 1.dp,
color = ReedTheme.colors.borderSecondary,
width = ReedTheme.border.border1,
color = ReedTheme.colors.borderPrimary,
shape = RoundedCornerShape(ReedTheme.radius.sm),
)
.padding(
Expand Down Expand Up @@ -253,7 +253,7 @@ fun EmptyBookCard(
color = ReedTheme.colors.contentTertiary,
style = ReedTheme.typography.label1Medium,
)
Spacer(modifier = Modifier.height(ReedTheme.spacing.spacing5))
Spacer(modifier = Modifier.height(ReedTheme.spacing.spacing6))
ReedButton(
onClick = {
onBookRegisterClick()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,11 @@ fun HomeBanner(
color = ReedTheme.colors.contentBrand,
style = ReedTheme.typography.body2Medium,
)
Spacer(modifier = Modifier.size(ReedTheme.spacing.spacing1))
Icon(
imageVector = ImageVector.vectorResource(id = designR.drawable.ic_chevron_right),
contentDescription = "Chevron Right Icon",
modifier = Modifier.size(ReedTheme.spacing.spacing5),
tint = ReedTheme.colors.contentBrand,
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import com.ninecraft.booket.core.designsystem.DevicePreview
import com.ninecraft.booket.core.designsystem.theme.ReedTheme
Expand Down Expand Up @@ -97,6 +98,7 @@ internal fun LibraryContent(
state.eventSink(LibraryUiEvent.OnFilterClick(status))
},
)
Spacer(modifier = Modifier.height(ReedTheme.spacing.spacing1))

when (state.uiState) {
is UiState.Idle -> {
Expand Down Expand Up @@ -168,12 +170,14 @@ private fun EmptyResult() {
Text(
text = stringResource(R.string.library_empty_book_title),
color = ReedTheme.colors.contentPrimary,
textAlign = TextAlign.Center,
style = ReedTheme.typography.headline1SemiBold,
)
Spacer(modifier = Modifier.height(ReedTheme.spacing.spacing2))
Text(
text = stringResource(R.string.library_empty_book_description),
color = ReedTheme.colors.contentSecondary,
textAlign = TextAlign.Center,
style = ReedTheme.typography.body1Medium,
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ fun FilterChip(
modifier: Modifier = Modifier,
) {
val chipColor = if (isSelected) ReedTheme.colors.bgPrimary else ReedTheme.colors.basePrimary
val textColor = if (isSelected) White else ReedTheme.colors.contentSecondary
val labelColor = if (isSelected) White else ReedTheme.colors.contentSecondary
val countColor = if (isSelected) White else ReedTheme.colors.contentTertiary
val labelStyle = if (isSelected) ReedTheme.typography.label1SemiBold else ReedTheme.typography.label1Medium

Box(
modifier = modifier
Expand Down Expand Up @@ -59,13 +61,13 @@ fun FilterChip(
Row(verticalAlignment = Alignment.CenterVertically) {
Text(
text = stringResource(option.getDisplayNameRes()),
color = textColor,
style = ReedTheme.typography.label1SemiBold,
color = labelColor,
style = labelStyle,
)
Spacer(modifier = Modifier.width(ReedTheme.spacing.spacing1))
Text(
text = "$count",
color = textColor,
color = countColor,
style = ReedTheme.typography.label1SemiBold,
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ internal fun TermsAgreementUi(
color = ReedTheme.colors.contentPrimary,
style = ReedTheme.typography.title2SemiBold,
)
Spacer(modifier = Modifier.height(ReedTheme.spacing.spacing4))
Spacer(modifier = Modifier.height(ReedTheme.spacing.spacing7))
Row(
modifier = Modifier
.fillMaxWidth()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,13 @@ private fun TextScanResult(
LazyColumn(
modifier = Modifier
.weight(1f)
.padding(horizontal = ReedTheme.spacing.spacing3),
.padding(horizontal = ReedTheme.spacing.spacing5),
verticalArrangement = Arrangement.spacedBy(ReedTheme.spacing.spacing2),
) {
item {
Spacer(modifier = Modifier.height(ReedTheme.spacing.spacing1))
}

items(state.sentenceList.size) { index ->
SentenceBox(
onClick = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ fun SentenceBox(
val bgColor = if (isSelected) ReedTheme.colors.bgTertiary else ReedTheme.colors.bgSecondary
val borderColor = if (isSelected) ReedTheme.colors.borderBrand else Color.Transparent
val textColor = if (isSelected) ReedTheme.colors.contentBrand else ReedTheme.colors.contentPrimary
val textStyle = if (isSelected) ReedTheme.typography.body1Medium else ReedTheme.typography.body1Regular

Box(
modifier = modifier
Expand All @@ -51,7 +52,7 @@ fun SentenceBox(
Text(
text = sentence,
color = textColor,
style = ReedTheme.typography.body1Regular,
style = textStyle,
)
}
}
Expand Down
Loading
Loading