Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
77a4fb2
[ui]: 투표 내용 없을 때 ui 추가 (#50)
Nico1eKim Jul 22, 2025
716d881
[refactor]: 방 삭제, 나가기 바텀시트 및 모달 수정 (#50)
Nico1eKim Jul 22, 2025
617aaa5
[chore]: 방 검색 폴더 구조 수정 (#50)
Nico1eKim Jul 22, 2025
605b0fd
[ui]: 오늘의 한마디 댓글 바텀시트 추가 (#50)
Nico1eKim Jul 22, 2025
35c34c0
[ui]: 오늘의 한마디 없을 때 화면 추가 (#50)
Nico1eKim Jul 22, 2025
2c3cab7
[refactor]: 총평버튼 비활성화일 때 toast message 뜨도록 수정 (#50)
Nico1eKim Jul 22, 2025
6028814
[ui]: 기록 더보기 바텀시트 추가 (#50)
Nico1eKim Jul 22, 2025
afdad73
[refactor]: lock상태일 때 클릭 막기 (#50)
Nico1eKim Jul 22, 2025
2acba93
[fix]: 오늘의 한마디 뜨는 순서 수정 (#50)
Nico1eKim Jul 23, 2025
6d415c8
[ui]: 메시지 하단에 고정되도록 수정 (#50)
Nico1eKim Jul 23, 2025
6573df6
[refactor]: 그룹 기록에 모든 기록 다 보이게 수정하고 기록 없을 때 화면 추가 (#50)
Nico1eKim Jul 23, 2025
9503ef8
[fix]: conflict 해결
Nico1eKim Jul 23, 2025
6ae3496
[fix]: conflict 해결중
Nico1eKim Jul 23, 2025
3e3ab2d
[fix]: conflict 해결
Nico1eKim Jul 23, 2025
5015b9e
Merge branch 'develop' of https://github.com/THIP-TextHip/THIP-Androi…
Nico1eKim Jul 23, 2025
a3c8b7c
[fix]: conflict 해결시 생긴 import 문제 해결
Nico1eKim Jul 23, 2025
12c0412
[ui]: 기록장 화면 ui 수정 (#50)
Nico1eKim Jul 24, 2025
a3cca1b
[refactor]: 기록장 toast message 애니메이션 수정 (#50)
Nico1eKim Jul 24, 2025
308ac20
[ui]: 댓글 없을 때 화면 추가 (#50)
Nico1eKim Jul 24, 2025
6791bbd
[refactor]: 기록장 ui 수정 (#50)
Nico1eKim Jul 24, 2025
b108b3f
[refactor]: 댓글 textfield 5줄까지 늘어나도록 수정 (#50)
Nico1eKim Jul 24, 2025
e9267f0
[refactor]: 댓글 bottomsheet 높이 문제 수정 (#50)
Nico1eKim Jul 24, 2025
a68ceaf
[chore]: 오늘의 한마디 mockup 분리 (#50)
Nico1eKim Jul 24, 2025
d9f7223
Merge branch 'develop' of https://github.com/THIP-TextHip/THIP-Androi…
Nico1eKim Jul 24, 2025
14bb55e
[chore]: import 빠진거 수정 (#50)
Nico1eKim Jul 24, 2025
d4107eb
[ui]: dialog popup 디자인 수정 (#50)
Nico1eKim Jul 24, 2025
29c3ed7
[refactor]: 내 기록은 pin할 수 있도록 수정 (#50)
Nico1eKim Jul 24, 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
Expand Up @@ -27,30 +27,32 @@ fun MenuBottomSheet(
CustomBottomSheet(
onDismiss = onDismiss,
) {
items.forEachIndexed { index, item ->
if (index > 0) {
Spacer(modifier = Modifier.height(8.dp))
HorizontalDivider(modifier = Modifier.height(1.dp), color = colors.Grey03)
Spacer(modifier = Modifier.height(8.dp))
}
Column(modifier = Modifier.padding(20.dp)) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

요기는 Column으로 감싸고 패딩 추가하신 이유가 무엇인가용? 디자인상으로 기존 컴포넌트가 문제될 것이 없어보이는데 어떤 이유로 수정하시게 된건지 궁금합니닷

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

이거 개인적인 QA 진행하면서 피그마랑 디자인이 다르길래 수정한건데
아마 규빈이가 이 bottomsheet도 같이 써야해서 공통으로 분리하면서 padding이 사라져서 추가한걸거입니둣 ~

items.forEachIndexed { index, item ->
if (index > 0) {
Spacer(modifier = Modifier.height(8.dp))
HorizontalDivider(modifier = Modifier.height(1.dp), color = colors.Grey03)
Spacer(modifier = Modifier.height(8.dp))
}

Column(
modifier = Modifier
.height(50.dp)
.padding(horizontal = 12.dp, vertical = 8.dp),
verticalArrangement = Arrangement.Center
) {
Text(
text = item.text,
style = typography.menu_m500_s16_h24,
color = item.color,
Column(
modifier = Modifier
.fillMaxWidth()
.clickable {
item.onClick()
onDismiss()
}
)
.height(50.dp)
.padding(horizontal = 12.dp, vertical = 8.dp),
verticalArrangement = Arrangement.Center
) {
Text(
text = item.text,
style = typography.menu_m500_s16_h24,
color = item.color,
modifier = Modifier
.fillMaxWidth()
.clickable {
item.onClick()
onDismiss()
}
)
}
}
}
Comment on lines +30 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

레이아웃 구조 개선되었으나 접근성 고려 필요

레이아웃 구조가 개선되고 적절한 패딩이 추가되었습니다. 하지만 클릭 가능한 영역이 전체 아이템에서 텍스트로만 제한된 점이 우려됩니다.

접근성을 위해 클릭 영역을 전체 아이템으로 확장하는 것을 권장합니다:

                Column(
                    modifier = Modifier
                        .height(50.dp)
-                        .padding(horizontal = 12.dp, vertical = 8.dp),
+                        .padding(horizontal = 12.dp, vertical = 8.dp)
+                        .clickable {
+                            item.onClick()
+                            onDismiss()
+                        },
                    verticalArrangement = Arrangement.Center
                ) {
                    Text(
                        text = item.text,
                        style = typography.menu_m500_s16_h24,
                        color = item.color,
-                        modifier = Modifier
-                            .fillMaxWidth()
-                            .clickable {
-                                item.onClick()
-                                onDismiss()
-                            }
+                        modifier = Modifier.fillMaxWidth()
                    )
                }
📝 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
Column(modifier = Modifier.padding(20.dp)) {
items.forEachIndexed { index, item ->
if (index > 0) {
Spacer(modifier = Modifier.height(8.dp))
HorizontalDivider(modifier = Modifier.height(1.dp), color = colors.Grey03)
Spacer(modifier = Modifier.height(8.dp))
}
Column(
modifier = Modifier
.height(50.dp)
.padding(horizontal = 12.dp, vertical = 8.dp),
verticalArrangement = Arrangement.Center
) {
Text(
text = item.text,
style = typography.menu_m500_s16_h24,
color = item.color,
Column(
modifier = Modifier
.fillMaxWidth()
.clickable {
item.onClick()
onDismiss()
}
)
.height(50.dp)
.padding(horizontal = 12.dp, vertical = 8.dp),
verticalArrangement = Arrangement.Center
) {
Text(
text = item.text,
style = typography.menu_m500_s16_h24,
color = item.color,
modifier = Modifier
.fillMaxWidth()
.clickable {
item.onClick()
onDismiss()
}
)
}
}
}
Column(
modifier = Modifier
.height(50.dp)
.padding(horizontal = 12.dp, vertical = 8.dp)
.clickable {
item.onClick()
onDismiss()
},
verticalArrangement = Arrangement.Center
) {
Text(
text = item.text,
style = typography.menu_m500_s16_h24,
color = item.color,
modifier = Modifier.fillMaxWidth()
)
}
🤖 Prompt for AI Agents
In app/src/main/java/com/texthip/thip/ui/common/bottomsheet/MenuBottomSheet.kt
between lines 30 and 57, the clickable area is currently limited to the Text
component inside each item, which reduces accessibility. To fix this, move the
clickable modifier from the Text to the parent Column that wraps the item
content, so the entire item area is clickable. This will expand the clickable
region to the full item height and width, improving accessibility and user
experience.

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ fun OptionChipButton(
modifier: Modifier = Modifier,
text: String,
isFilled: Boolean = false,
isSelected: Boolean? = null, // 추가
isSelected: Boolean? = null,
enabled: Boolean = true,
textStyle: TextStyle = typography.info_r400_s12,
onClick: () -> Unit,
onDisabledClick: () -> Unit = { }
) {
var isClicked by remember { mutableStateOf(false) }
val checked = isSelected ?: isClicked
Expand Down Expand Up @@ -69,9 +70,13 @@ fun OptionChipButton(
color = borderColor,
shape = RoundedCornerShape(20.dp)
)
.clickable(enabled = enabled) {
if (isSelected == null) isClicked = !isClicked
onClick()
.clickable {
if (enabled) {
if (isSelected == null) isClicked = !isClicked
onClick()
} else {
onDisabledClick.invoke()
}
}
.height(30.dp)
.padding(horizontal = 12.dp),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ import com.texthip.thip.ui.theme.ThipTheme.typography

@Composable
fun CardCommentGroup(
data: GroupRoomChatData
data: GroupRoomChatData,
onMenuClick: () -> Unit
) {
Column(
modifier = Modifier
Expand All @@ -27,7 +28,8 @@ fun CardCommentGroup(
ProfileBarWithDate(
profileImage = data.profileImage,
nickname = data.nickname,
dateText = data.date
dateText = data.date,
onMenuClick = onMenuClick
)
Spacer(Modifier.height(8.dp))
Text(
Expand All @@ -47,7 +49,9 @@ private fun CardCommentGroupPreview() {
profileImage = null,
nickname = "user.01",
date = "11시간 전",
content = "이것은 그룹 채팅의 댓글입니다. 이곳에 댓글 내용을 작성할 수 있습니다. 여러 줄로 작성해도 됩니다."
)
content = "이것은 그룹 채팅의 댓글입니다. 이곳에 댓글 내용을 작성할 수 있습니다. 여러 줄로 작성해도 됩니다.",
isMine = false
),
onMenuClick = {}
)
}
114 changes: 65 additions & 49 deletions app/src/main/java/com/texthip/thip/ui/common/cards/CardVote.kt
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package com.texthip.thip.ui.common.cards

import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.pager.HorizontalPager
Expand All @@ -14,9 +16,7 @@ import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.mutableStateMapOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.toMutableStateList
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
Expand All @@ -30,17 +30,12 @@ import com.texthip.thip.ui.theme.ThipTheme.typography

@Composable
fun CardVote(
voteData: List<VoteData>
voteData: List<VoteData>,
onVoteClick: (VoteData) -> Unit = {}
) {
val pageCount = voteData.size
val pagerState = rememberPagerState(pageCount = { pageCount })

// 각 페이지별 상태 기억: 선택 인덱스, 선택 여부 포함한 voteItems
val selectedIndexes = remember { mutableStateMapOf<Int, Int?>() }
val voteItemStates = remember {
voteData.map { it.voteItems.toMutableStateList() }.toMutableStateList()
}

Column(
modifier = Modifier
.fillMaxWidth()
Expand All @@ -55,52 +50,65 @@ fun CardVote(
modifier = Modifier.padding(horizontal = 12.dp)
)

HorizontalPager(
state = pagerState,
modifier = Modifier.fillMaxWidth()
) { page ->
val voteItems = voteItemStates[page]
val selectedIndex = selectedIndexes[page]
val hasVoted = voteItems.any { it.isVoted }

Column(
modifier = Modifier.padding(horizontal = 12.dp),
verticalArrangement = Arrangement.spacedBy(10.dp)
if (voteData.isEmpty()) {
Box(
modifier = Modifier
.fillMaxWidth()
.padding(top = 12.dp)
.padding(vertical = 60.dp),
contentAlignment = Alignment.Center
) {
Text(
text = voteData[page].description,
text = stringResource(R.string.no_vote),
style = typography.info_m500_s12,
color = colors.White,
)

GroupVoteButton(
voteItems = voteItems,
selectedIndex = selectedIndex,
hasVoted = hasVoted,
onOptionSelected = { index ->
selectedIndexes[page] = if (selectedIndex == index) null else index

voteItemStates[page] = voteItems.mapIndexed { i, item ->
item.copy(isVoted = i == index && selectedIndex != index)
}.toMutableStateList()
}
color = colors.Grey
)
}
}
} else {
HorizontalPager(
state = pagerState,
modifier = Modifier.fillMaxWidth()
) { page ->
val vote = voteData[page]
val voteItems = vote.voteItems.take(3) // 최대 3개만

Row(
Modifier
.fillMaxWidth(),
horizontalArrangement = Arrangement.Center
) {
repeat(pageCount) { iteration ->
val color = if (pagerState.currentPage == iteration) colors.White else colors.Grey02
Box(
Column(
modifier = Modifier
.height(176.dp)
.padding(horizontal = 12.dp)
.background(color, CircleShape)
.size(4.dp)
)
.clickable { onVoteClick(vote) }, // 전체 클릭 시 이동
verticalArrangement = Arrangement.spacedBy(10.dp)
) {
Text(
text = vote.description,
style = typography.info_m500_s12,
color = colors.White,
)

GroupVoteButton(
voteItems = voteItems,
selectedIndex = null, // 표시용이므로 선택 없음
hasVoted = false, // 투표 상태 없음
onOptionSelected = { onVoteClick(vote) } // 어떤 항목을 눌러도 이동
)
}
}

Row(
Modifier
.fillMaxWidth(),
horizontalArrangement = Arrangement.Center
) {
repeat(pageCount) { iteration ->
val color =
if (pagerState.currentPage == iteration) colors.White else colors.Grey02
Box(
modifier = Modifier
.padding(horizontal = 12.dp)
.background(color, CircleShape)
.size(4.dp)
)
}
}
Comment on lines +97 to 112
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

빈 데이터 상태에서도 페이지 인디케이터 표시됨

데이터가 비어있을 때도 페이지 인디케이터 점들이 표시되는데, 이는 사용자에게 혼란을 줄 수 있습니다. 빈 상태에서는 인디케이터를 숨기는 것이 좋겠습니다.

-            Row(
-                Modifier
-                    .fillMaxWidth(),
-                horizontalArrangement = Arrangement.Center
-            ) {
-                repeat(pageCount) { iteration ->
-                    val color =
-                        if (pagerState.currentPage == iteration) colors.White else colors.Grey02
-                    Box(
-                        modifier = Modifier
-                            .padding(horizontal = 12.dp)
-                            .background(color, CircleShape)
-                            .size(4.dp)
-                    )
+            if (pageCount > 1) {
+                Row(
+                    Modifier.fillMaxWidth(),
+                    horizontalArrangement = Arrangement.Center
+                ) {
+                    repeat(pageCount) { iteration ->
+                        val color =
+                            if (pagerState.currentPage == iteration) colors.White else colors.Grey02
+                        Box(
+                            modifier = Modifier
+                                .padding(horizontal = 12.dp)
+                                .background(color, CircleShape)
+                                .size(4.dp)
+                        )
+                    }
                 }
             }
📝 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
Row(
Modifier
.fillMaxWidth(),
horizontalArrangement = Arrangement.Center
) {
repeat(pageCount) { iteration ->
val color =
if (pagerState.currentPage == iteration) colors.White else colors.Grey02
Box(
modifier = Modifier
.padding(horizontal = 12.dp)
.background(color, CircleShape)
.size(4.dp)
)
}
}
if (pageCount > 1) {
Row(
Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.Center
) {
repeat(pageCount) { iteration ->
val color =
if (pagerState.currentPage == iteration) colors.White else colors.Grey02
Box(
modifier = Modifier
.padding(horizontal = 12.dp)
.background(color, CircleShape)
.size(4.dp)
)
}
}
}
🤖 Prompt for AI Agents
In app/src/main/java/com/texthip/thip/ui/common/cards/CardVote.kt around lines
97 to 112, the page indicator dots are shown even when the data is empty, which
can confuse users. Add a condition to check if pageCount is greater than zero
before rendering the Row with the indicators, and skip rendering the indicators
entirely when pageCount is zero or less.

}
}
Expand All @@ -109,5 +117,13 @@ fun CardVote(
@Preview
@Composable
private fun CardVotePreview() {
CardVote(voteData = mockVoteData)
Column(
modifier = Modifier
.fillMaxWidth()
.padding(16.dp),
verticalArrangement = Arrangement.spacedBy(16.dp)
) {
CardVote(voteData = mockVoteData)
CardVote(voteData = emptyList())
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.defaultMinSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.text.BasicTextField
import androidx.compose.material3.Icon
Expand Down Expand Up @@ -93,37 +95,41 @@ fun CommentTextField(
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 20.dp, vertical = 10.dp)
.height(36.dp)
.background(colors.DarkGrey, shape = RoundedCornerShape(20.dp)),
verticalAlignment = Alignment.CenterVertically
) {
BasicTextField(
value = input,
onValueChange = onInputChange,
singleLine = true,
maxLines = 5,
textStyle = typography.menu_r400_s14_h24.copy(color = colors.White),
modifier = Modifier
.weight(1f)
.padding(start = 12.dp),
.padding(start = 12.dp, top = 4.dp, bottom = 4.dp, end = 12.dp)
.defaultMinSize(minHeight = 36.dp)
.wrapContentHeight(), // 높이 자동 확장
cursorBrush = SolidColor(colors.NeonGreen),
decorationBox = { innerTextField ->
if (input.isEmpty()) {
Text(
text = hint,
color = colors.Grey02,
style = typography.menu_r400_s14_h24
)
Box {
if (input.isEmpty()) {
Text(
text = hint,
color = colors.Grey02,
style = typography.menu_r400_s14_h24
)
}
innerTextField()
}
innerTextField()
}
)

// 전송 버튼
val isEnabled = input.isNotBlank()
Box(
modifier = Modifier
.padding(end = 4.dp)
.padding(end = 8.dp, bottom = 8.dp)
.size(width = 42.dp, height = 28.dp)
.align(Alignment.Bottom)
.background(
color = if (isEnabled) colors.Purple else colors.Grey02,
shape = RoundedCornerShape(20.dp)
Expand Down
Loading