Skip to content
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
6127d1d
[BOOK-61] feat: Color 상수 추가
seoyoon513 Jul 7, 2025
c52bf60
[BOOK-61] feat: Font 추가 및 Typography 정의
seoyoon513 Jul 7, 2025
f2daaa2
[BOOK-61] feat: Spacing, Border, Radius 정의
seoyoon513 Jul 7, 2025
a6bf393
[BOOK-61] refactor: Radius 변수 네이밍 변경
seoyoon513 Jul 7, 2025
0d3f162
[BOOK-61] feat: Semantic color 값 설정
seoyoon513 Jul 7, 2025
c53958f
[BOOK-61] feat: TextStyle 기본 컬러값 설정
seoyoon513 Jul 7, 2025
ec50d1d
[BOOK-61] feat: ReedTheme 정의
seoyoon513 Jul 7, 2025
d8a242a
[BOOK-61] feat: Icon 추가
seoyoon513 Jul 7, 2025
c75a936
[BOOK-61] feat: ReedButton Component 구현
seoyoon513 Jul 7, 2025
73f9225
[BOOK-61] feat: ReedTopAppBar Component 구현
seoyoon513 Jul 8, 2025
1cea3ed
[BOOK-61] feat: CheckBox Component 구현
seoyoon513 Jul 8, 2025
ad472f7
[BOOK-61] chore: code style check success
seoyoon513 Jul 8, 2025
5a9647a
[BOOK-61] fix: 버튼 패키지 경로 수정
seoyoon513 Jul 8, 2025
dc5e229
Merge branch 'develop' into BOOK-61-feature/#13
seoyoon513 Jul 8, 2025
a1e543a
[BOOK-61] fix: ReedCloseTopAppBar 파라미터 오타 수정
seoyoon513 Jul 8, 2025
fe39f1b
[BOOK-61] fix: import 수정 (android.support -> androidx)
seoyoon513 Jul 8, 2025
aa9de70
[BOOK-61] refactor: CheckBox Preview 토글 로직 변경
seoyoon513 Jul 8, 2025
4581c71
[BOOK-61] refector: Preview 함수 접근 제어자 private으로 변경
seoyoon513 Jul 8, 2025
8e29b2f
[BOOK-61] feat: ReedBottomSheet Component 구현
seoyoon513 Jul 8, 2025
03eefb2
[BOOK-61] feat: ButtonColorStyle에 KAKAO 타입 추가 및 로그인 버튼 적용
seoyoon513 Jul 8, 2025
e2342e6
[BOOK-61] chore: BooketButton 삭제
seoyoon513 Jul 8, 2025
75e676f
[BOOK-61] chore: code style check success
seoyoon513 Jul 8, 2025
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
@@ -0,0 +1,138 @@
package com.ninecraft.booket.core.designsystem.component.appbar

import android.support.annotation.DrawableRes
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.width
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.ninecraft.booket.core.designsystem.R
import com.ninecraft.booket.core.designsystem.theme.ReedTheme
import com.ninecraft.booket.core.designsystem.theme.White

@Composable
fun ReedTopAppBar(
modifier: Modifier = Modifier,
title: String = "",
@DrawableRes startIconRes: Int? = null,
startIconDescription: String = "",
startIconOnClick: () -> Unit = {},
@DrawableRes endIconRes: Int? = null,
endIconDescription: String = "",
endIconOnClick: () -> Unit = {},
) {
Row(
modifier = modifier
.fillMaxWidth()
.height(56.dp)
.background(color = White),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.Start,
) {
if (startIconRes != null) {
IconButton(
onClick = { startIconOnClick() },
modifier = Modifier
.fillMaxHeight()
.width(72.dp),
) {
Icon(
painter = painterResource(id = startIconRes),
contentDescription = startIconDescription,
)
}
} else {
Spacer(modifier = Modifier.width(72.dp))
}

Text(
text = title,
style = ReedTheme.typography.heading2SemiBold,
modifier = Modifier.weight(1f),
textAlign = TextAlign.Center,
)

if (endIconRes != null) {
IconButton(
onClick = { endIconOnClick() },
modifier = Modifier
.fillMaxHeight()
.width(72.dp),
) {
Icon(
painter = painterResource(id = endIconRes),
contentDescription = endIconDescription,
)
}
} else {
Spacer(modifier = Modifier.width(72.dp))
}
}
}

@Composable
fun ReedBackTopAppBar(
modifier: Modifier = Modifier,
title: String = "",
onNavigateBack: () -> Unit = {},
) {
ReedTopAppBar(
modifier = modifier,
title = title,
startIconRes = R.drawable.ic_chevron_left,
startIconDescription = "Back",
startIconOnClick = onNavigateBack,
)
}

@Composable
fun ReedCloseTopAppBar(
modifier: Modifier = Modifier,
title: String = "",
onClose: () -> Unit = {},
) {
ReedTopAppBar(
modifier = modifier,
title = title,
endIconRes = R.drawable.ic_close,
startIconDescription = "Close",
startIconOnClick = onClose,
)
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.

@Preview
@Composable
fun ReedTopAppBarPreview() {
ReedTopAppBar(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Preview 함수는 다른 곳에서 사용되지 않는 관계로 private 접근 제어자 붙여주고, ReedTheme으로 감싸주면 될것같음

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

수정 완료 4581c71

title = "title",
)
}

@Preview
@Composable
fun ReedBackTopAppBarPreview() {
ReedBackTopAppBar(
title = "title",
)
}

@Preview
@Composable
fun ReedCloseTopAppBarPreview() {
ReedCloseTopAppBar(
title = "title",
)
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.ninecraft.booket.core.designsystem.component
package com.ninecraft.booket.core.designsystem.component.button
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

패키지·네이밍이 혼재됨 – Booket vs Reed

패키지를 ...button 으로 이동하면서도 컴포넌트 명은 여전히 BooketButton 입니다. 동일 모듈에 ReedButton 이 공존할 예정이라면 사용자가 혼란을 겪을 수 있습니다.

  • BooketButtonLegacyButton 등으로 리네이밍하거나
  • 새로운 ReedButton 으로 기능을 통합 후 기존 API 는 @Deprecated 로 래핑

중 하나를 고려해 주세요.

🤖 Prompt for AI Agents
In
core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/component/button/Button.kt
at line 1, the component name BooketButton conflicts with the package naming and
the planned coexistence of ReedButton. To fix this, either rename BooketButton
to LegacyButton to clarify its legacy status or refactor the functionality into
ReedButton and mark the existing BooketButton API as @Deprecated to avoid user
confusion.


import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.padding
Expand All @@ -19,7 +19,7 @@ import androidx.compose.ui.unit.dp
import com.ninecraft.booket.core.common.utils.MultipleEventsCutter
import com.ninecraft.booket.core.common.utils.get
import com.ninecraft.booket.core.designsystem.ComponentPreview
import com.ninecraft.booket.core.designsystem.theme.BooketTheme
import com.ninecraft.booket.core.designsystem.theme.ReedTheme

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue

ReedTheme 색상 정의 미흡 시 Button 색상도 영향을 받음

BooketButtonMaterialTheme.colorScheme.primaryContainer 등을 사용합니다. ReedTheme 가 해당 팔레트를 제공하지 않으면 버튼 색이 의도와 다르게 렌더링됩니다. Theme.kt 확장 또는 임시 BooketTheme 유지 둘 중 하나를 선택해야 합니다.

🤖 Prompt for AI Agents
In
core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/component/button/Button.kt
around lines 22 to 23, the BooketButton uses
MaterialTheme.colorScheme.primaryContainer, but ReedTheme does not define this
color palette, causing incorrect button colors. To fix this, extend ReedTheme to
include the necessary color definitions for primaryContainer and related colors,
or alternatively create and use a temporary BooketTheme that provides these
color values to ensure consistent button rendering.

@Composable
fun BooketButton(
Expand Down Expand Up @@ -85,7 +85,7 @@ private fun BooketButtonContent(
@ComponentPreview
@Composable
private fun BooketButtonPreview() {
BooketTheme {
ReedTheme {
BooketButton(
onClick = {},
text = {
Expand All @@ -98,7 +98,7 @@ private fun BooketButtonPreview() {
@ComponentPreview
@Composable
private fun BooketButtonWithLeadingIconPreview() {
BooketTheme {
ReedTheme {
BooketButton(
onClick = {},
text = {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package com.ninecraft.booket.core.designsystem.component.button

import androidx.compose.runtime.Composable
import com.ninecraft.booket.core.designsystem.theme.ReedTheme

enum class ReedButtonColorStyle {
PRIMARY, SECONDARY, TERTIARY;

@Composable
fun containerColor(isPressed: Boolean) = when (this) {
PRIMARY -> if (isPressed) ReedTheme.colors.bgPrimaryPressed else ReedTheme.colors.bgPrimary
SECONDARY -> if (isPressed) ReedTheme.colors.bgSecondaryPressed else ReedTheme.colors.bgSecondary
TERTIARY -> if (isPressed) ReedTheme.colors.bgTertiaryPressed else ReedTheme.colors.bgTertiary
}
Comment on lines +10 to +16
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot Jul 8, 2025

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

KAKAO 스타일의 pressed 상태 처리를 확인해주세요.

KAKAO 스타일의 경우 isPressed 상태에 관계없이 항상 동일한 Kakao 색상을 반환합니다. 사용자에게 적절한 시각적 피드백을 제공하기 위해 pressed 상태에 대한 별도 색상 처리가 필요할 수 있습니다.

-        KAKAO -> Kakao
+        KAKAO -> if (isPressed) /* pressed 상태 색상 */ else Kakao
📝 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
@Composable
fun containerColor(isPressed: Boolean) = when (this) {
PRIMARY -> if (isPressed) ReedTheme.colors.bgPrimaryPressed else ReedTheme.colors.bgPrimary
SECONDARY -> if (isPressed) ReedTheme.colors.bgSecondaryPressed else ReedTheme.colors.bgSecondary
TERTIARY -> if (isPressed) ReedTheme.colors.bgTertiaryPressed else ReedTheme.colors.bgTertiary
KAKAO -> Kakao
}
@Composable
fun containerColor(isPressed: Boolean) = when (this) {
PRIMARY -> if (isPressed) ReedTheme.colors.bgPrimaryPressed else ReedTheme.colors.bgPrimary
SECONDARY -> if (isPressed) ReedTheme.colors.bgSecondaryPressed else ReedTheme.colors.bgSecondary
TERTIARY -> if (isPressed) ReedTheme.colors.bgTertiaryPressed else ReedTheme.colors.bgTertiary
KAKAO -> if (isPressed) /* pressed 상태 색상 */ else Kakao
}
🤖 Prompt for AI Agents
In
core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/component/button/ButtonColorStyle.kt
between lines 10 and 16, the containerColor function does not handle the pressed
state for the KAKAO style and always returns the same color. To fix this, add a
conditional check for isPressed when the style is KAKAO and return a distinct
pressed color for KAKAO, ensuring visual feedback changes appropriately when
pressed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

디자이너가 따로 pressed 컬러 정의를 안해줬어

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@seoyoon513 이해했습니다! 디자이너가 KAKAO 스타일에 대해 pressed 상태 색상을 별도로 정의하지 않았다면, 현재 구현이 올바르네요. 디자인 시스템에서는 모든 인터랙션 상태에 대해 항상 별도의 시각적 피드백이 필요한 것은 아니죠.

현재 구현대로 KAKAO 스타일은 pressed 상태에서도 동일한 색상을 유지하는 것이 디자인 의도에 맞습니다.

🐰
╭─────╮
│ 알겠 │
│ 어요 │
╰─────╯


✏️ Learnings added
Learnt from: seoyoon513
PR: YAPP-Github/Reed-Android#32
File: core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/component/button/ButtonColorStyle.kt:10-16
Timestamp: 2025-07-08T12:33:01.823Z
Learning: Reed Android 프로젝트에서 KAKAO 버튼 스타일은 디자이너가 pressed 상태 색상을 별도로 정의하지 않았기 때문에 pressed 상태에서도 동일한 Kakao 색상을 사용한다.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


🧠 Learnings used
Learnt from: seoyoon513
PR: YAPP-Github/Reed-Android#32
File: core/designsystem/src/main/kotlin/com/ninecraft/booket/core/designsystem/theme/Theme.kt:15-21
Timestamp: 2025-07-08T03:21:24.693Z
Learning: Reed Android 프로젝트에서는 다크모드/라이트모드 대응 계획이 없고 기본 테마 값만 사용할 예정이다.


@Composable
fun contentColor() = when (this) {
PRIMARY -> ReedTheme.colors.contentInverse
SECONDARY -> ReedTheme.colors.contentPrimary
TERTIARY -> ReedTheme.colors.contentBrand
}

@Composable
fun disabledContainerColor() = ReedTheme.colors.bgDisabled

@Composable
fun disabledContentColor() = ReedTheme.colors.contentDisabled
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
package com.ninecraft.booket.core.designsystem.component.button

import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.runtime.Composable
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import com.ninecraft.booket.core.designsystem.theme.ReedTheme

data class ButtonSizeStyle(
val paddingValues: PaddingValues,
val radius: Dp = 0.dp,
val textStyle: TextStyle,
val iconSpacing: Dp = 0.dp,
)

val largeButtonStyle: ButtonSizeStyle
@Composable get() = ButtonSizeStyle(
paddingValues = PaddingValues(
horizontal = ReedTheme.spacing.spacing5,
vertical = ReedTheme.spacing.spacing3,
),
radius = ReedTheme.radius.sm,
textStyle = ReedTheme.typography.body1Medium,
iconSpacing = ReedTheme.spacing.spacing2,
)

val mediumButtonStyle: ButtonSizeStyle
@Composable get() = ButtonSizeStyle(
paddingValues = PaddingValues(
horizontal = ReedTheme.spacing.spacing4,
vertical = ReedTheme.spacing.spacing3,
),
radius = ReedTheme.radius.sm,
textStyle = ReedTheme.typography.label1Medium,
iconSpacing = ReedTheme.spacing.spacing1,
)

val smallButtonStyle: ButtonSizeStyle
@Composable get() = ButtonSizeStyle(
paddingValues = PaddingValues(
horizontal = ReedTheme.spacing.spacing3,
vertical = ReedTheme.spacing.spacing2,
),
radius = ReedTheme.radius.xs,
textStyle = ReedTheme.typography.label1Medium,
iconSpacing = ReedTheme.spacing.spacing1,
)
Loading
Loading