Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
package com.ninecraft.booket.core.designsystem.component.appbar

import androidx.annotation.DrawableRes
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,
endIconDescription = "Close",
endIconOnClick = onClose,
)
}

@Preview
@Composable
private fun ReedTopAppBarPreview() {
ReedTheme {
ReedTopAppBar(
title = "title",
)
}
}

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

@Preview
@Composable
private fun ReedCloseTopAppBarPreview() {
ReedTheme {
ReedCloseTopAppBar(
title = "title",
)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
package com.ninecraft.booket.core.designsystem.component.bottomsheet

import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.ModalBottomSheet
import androidx.compose.material3.SheetState
import androidx.compose.material3.SheetValue
import androidx.compose.material3.rememberModalBottomSheetState
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
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.theme.ReedTheme
import com.ninecraft.booket.core.designsystem.theme.White

@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun ReedBottomSheet(
onDismissRequest: () -> Unit,
modifier: Modifier = Modifier,
sheetState: SheetState = rememberModalBottomSheetState(),
content: @Composable () -> Unit,
) {
ModalBottomSheet(
onDismissRequest = onDismissRequest,
modifier = modifier,
sheetState = sheetState,
sheetGesturesEnabled = false,
shape = RoundedCornerShape(topStart = 20.dp, topEnd = 20.dp),
dragHandle = null,
containerColor = White,
) {
content()
}
}

@OptIn(ExperimentalMaterial3Api::class)
@Preview(showBackground = true)
@Composable
private fun ReedBottomSheetPreview() {
val sheetState = SheetState(
skipPartiallyExpanded = true,
initialValue = SheetValue.Expanded,
positionalThreshold = { 0f },
velocityThreshold = { 0f },
)
ReedTheme {
ReedBottomSheet(
sheetState = sheetState,
onDismissRequest = {},
) {
ReedButton(
onClick = {},
modifier = Modifier.padding(10.dp).fillMaxWidth(),
colorStyle = ReedButtonColorStyle.PRIMARY,
sizeStyle = largeButtonStyle,
text = "확인",
)
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package com.ninecraft.booket.core.designsystem.component.button

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

enum class ReedButtonColorStyle {
PRIMARY, SECONDARY, TERTIARY, 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 -> Kakao
}
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
KAKAO -> ReedTheme.colors.contentPrimary
}

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

@Composable
fun disabledContentColor() = ReedTheme.colors.contentDisabled
}
Loading
Loading