Skip to content
Open
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 @@ -16,6 +16,7 @@ import coil.compose.rememberAsyncImagePainter
import com.umcspot.spot.designsystem.R
import com.umcspot.spot.designsystem.theme.SpotTheme
import com.umcspot.spot.model.ImageRef
import com.umcspot.spot.ui.extension.screenWidthDp

@Composable
fun ProfileImage(
Expand Down Expand Up @@ -63,7 +64,7 @@ private fun preview() {
SpotTheme {
ProfileImage(
imageRef = ImageRef.Name("sample"),
modifier = Modifier.size(40.dp)
modifier = Modifier.size(screenWidthDp(33.dp))
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ fun DeleteModal(
modifier = Modifier
.fillMaxWidth()
.wrapContentHeight()
.padding(17.dp),
.padding(screenWidthDp(17.dp), screenHeightDp(17.dp)),
verticalArrangement = Arrangement.Top,
horizontalAlignment = Alignment.CenterHorizontally
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import com.umcspot.spot.designsystem.R
import com.umcspot.spot.designsystem.component.button.TextButton
import com.umcspot.spot.designsystem.component.button.TextButtonState
import com.umcspot.spot.designsystem.shapes.SpotShapes
import com.umcspot.spot.designsystem.theme.G400
import com.umcspot.spot.designsystem.theme.R500
import com.umcspot.spot.designsystem.theme.SpotTheme
import com.umcspot.spot.ui.extension.screenHeightDp
Expand Down Expand Up @@ -83,7 +84,9 @@ fun RejectModal(
contentDescription = null,
modifier = Modifier
.size(screenWidthDp(33.dp)),
colorFilter = ColorFilter.tint(painterTint)
colorFilter = painterTint
.takeUnless { it == Color.Unspecified }
?.let { ColorFilter.tint(it) }
)

Spacer(Modifier.height(screenHeightDp(7.dp)))
Expand Down Expand Up @@ -183,3 +186,23 @@ private fun RejectDialog_Preview() {
)
}
}


@Preview(showBackground = true, widthDp = 360, heightDp = 640)
@Composable
private fun CancelMembbershipDialog_Preview() {
SpotTheme {
RejectDialog(
visible = true,
painter = painterResource(R.drawable.cancel_membership),
painterTint = SpotTheme.colors.G400,
modalTitle = "정말 탈퇴할까요?",
modalDes = null,
okButtonText = "탈퇴",
noButtonText = "취소",
onDismiss = { },
onClick = { },
onCancel = { }
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package com.umcspot.spot.designsystem.component.post
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.layout.wrapContentSize
import androidx.compose.foundation.layout.wrapContentWidth
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
Expand All @@ -15,6 +16,7 @@ import androidx.compose.ui.unit.dp
import com.umcspot.spot.designsystem.component.ProfileImage
import com.umcspot.spot.designsystem.theme.SpotTheme
import com.umcspot.spot.model.ImageRef
import com.umcspot.spot.ui.extension.screenHeightDp
import com.umcspot.spot.ui.extension.screenWidthDp

@Composable
Expand All @@ -25,7 +27,8 @@ fun CommentUserInfo(
) {
Row(
modifier = modifier
.wrapContentSize(),
.wrapContentWidth()
.height(screenHeightDp(33.dp)),
Comment on lines +30 to +31
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 | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

find . -type f -name "CommentUserInfoItem.kt" | head -5

Repository: SPOTeam/Android-V2

Length of output: 164


🏁 Script executed:

wc -l ./core/designsystem/src/main/java/com/umcspot/spot/designsystem/component/post/CommentUserInfoItem.kt

Repository: SPOTeam/Android-V2

Length of output: 167


🏁 Script executed:

cat -n ./core/designsystem/src/main/java/com/umcspot/spot/designsystem/component/post/CommentUserInfoItem.kt

Repository: SPOTeam/Android-V2

Length of output: 2273


🏁 Script executed:

find . -type f -name "*.kt" | xargs grep -l "fun screenHeightDp" | head -5

Repository: SPOTeam/Android-V2

Length of output: 132


🏁 Script executed:

wc -l ./core/ui/src/main/java/com/umcspot/spot/ui/extension/DimensionExt.kt

Repository: SPOTeam/Android-V2

Length of output: 135


🏁 Script executed:

cat -n ./core/ui/src/main/java/com/umcspot/spot/ui/extension/DimensionExt.kt

Repository: SPOTeam/Android-V2

Length of output: 890


🏁 Script executed:

find . -type f -name "*Theme.kt" -o -name "*theme.kt" | grep -i spot | head -10

Repository: SPOTeam/Android-V2

Length of output: 210


🏁 Script executed:

wc -l ./core/designsystem/src/main/java/com/umcspot/spot/designsystem/theme/Theme.kt

Repository: SPOTeam/Android-V2

Length of output: 144


🏁 Script executed:

cat -n ./core/designsystem/src/main/java/com/umcspot/spot/designsystem/theme/Theme.kt

Repository: SPOTeam/Android-V2

Length of output: 3032


🏁 Script executed:

find . -type f -name "Typography.kt" | grep designsystem

Repository: SPOTeam/Android-V2

Length of output: 44


🏁 Script executed:

rg "class SpotTypography" --type kt

Repository: SPOTeam/Android-V2

Length of output: 89


🏁 Script executed:

rg "class SpotTypography"

Repository: SPOTeam/Android-V2

Length of output: 187


🏁 Script executed:

wc -l ./core/designsystem/src/main/java/com/umcspot/spot/designsystem/theme/TypoGraphy.kt

Repository: SPOTeam/Android-V2

Length of output: 150


🏁 Script executed:

rg "medium_400" ./core/designsystem/src/main/java/com/umcspot/spot/designsystem/theme/TypoGraphy.kt -A 3

Repository: SPOTeam/Android-V2

Length of output: 1191


고정 높이로 텍스트 클리핑 위험이 있습니다.

height(screenHeightDp(33.dp))로 Row의 높이가 고정되어 있어, 시스템 폰트 배율이 커질 때 medium_400 스타일(14.sp, lineHeight 21.sp)의 닉네임 Text가 Row를 벗어나 클리핑될 수 있습니다. 최소 높이 제약으로 바꾸면 필요시 자동으로 확장되므로 안전합니다.

제안 수정안
-            .wrapContentWidth()
-            .height(screenHeightDp(33.dp)),
+            .wrapContentWidth()
+            .heightIn(min = screenHeightDp(33.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
.wrapContentWidth()
.height(screenHeightDp(33.dp)),
.wrapContentWidth()
.heightIn(min = screenHeightDp(33.dp)),
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@core/designsystem/src/main/java/com/umcspot/spot/designsystem/component/post/CommentUserInfoItem.kt`
around lines 30 - 31, The Row in CommentUserInfoItem.kt uses a fixed height via
.height(screenHeightDp(33.dp)) which can clip the nickname Text styled with
medium_400 when system font scaling increases; change the fixed height to a
minimum height constraint (e.g., replace .height(screenHeightDp(33.dp)) with a
min-height API such as .heightIn(min = screenHeightDp(33.dp)) or
.defaultMinSize(minHeight = screenHeightDp(33.dp))) so the Row can grow if
content needs more vertical space and avoid clipping the nickname Text.

horizontalArrangement = Arrangement.Start,
verticalAlignment = Alignment.CenterVertically
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ import androidx.compose.foundation.layout.width
import androidx.compose.foundation.layout.wrapContentSize
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.umcspot.spot.designsystem.component.ProfileImage
import com.umcspot.spot.designsystem.theme.SpotTheme
import com.umcspot.spot.model.ImageRef
import com.umcspot.spot.ui.extension.screenHeightDp
import com.umcspot.spot.ui.extension.screenWidthDp

@Composable
fun UserInfo(
Expand All @@ -25,22 +28,21 @@ fun UserInfo(
) {
Row(
modifier = modifier
.wrapContentSize()
.wrapContentSize(),
verticalAlignment = Alignment.CenterVertically
) {
ProfileImage(
imageRef = postWriterImage,
modifier = Modifier.size(44.dp)
modifier = Modifier.size(screenWidthDp(44.dp))
)
Spacer(Modifier.width(10.dp))
Column (

) {
Spacer(Modifier.width(screenWidthDp(7.dp)))
Column {
Text(
text = postWriterName,
style = SpotTheme.typography.medium_400
)

Spacer(Modifier.height(4.dp))
Spacer(Modifier.height(screenHeightDp(4.dp)))

Text(
text = postWriteAt,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
package com.umcspot.spot.feature.board.boardList
package com.umcspot.spot.feature.board.boardList

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.defaultMinSize
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.offset
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.layout.widthIn
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.foundation.layout.wrapContentWidth
import androidx.compose.foundation.layout.wrapContentSize
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.LazyListState
import androidx.compose.foundation.lazy.items
Expand All @@ -22,15 +21,14 @@ import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.ScrollableTabRow
import androidx.compose.material3.Surface
import androidx.compose.material3.Tab
import androidx.compose.material3.TabRowDefaults
import androidx.compose.material3.TabRowDefaults.tabIndicatorOffset
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.derivedStateOf
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableIntStateOf
import androidx.compose.runtime.mutableStateMapOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.saveable.rememberSaveable
Expand All @@ -39,11 +37,12 @@ import androidx.compose.runtime.snapshotFlow
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.drawWithContent
import androidx.compose.ui.draw.paint
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.geometry.Size
import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import androidx.hilt.navigation.compose.hiltViewModel
import androidx.lifecycle.Lifecycle
Expand Down Expand Up @@ -165,6 +164,8 @@ fun BoardListScreen(
.background(SpotTheme.colors.white)
.padding(top = topPad, bottom = bottomPad),
) {
Spacer(modifier = Modifier.height(screenHeightDp(18.dp)))

SelectedLocationTabs(
tabs = tabItems.map { it?.korean ?: "전체" },
selectedIndex = selectedTab,
Expand Down Expand Up @@ -291,6 +292,9 @@ private fun SelectedLocationTabs(

val scrimWidth = screenWidthDp(24.dp)
val bg = SpotTheme.colors.white
val density = LocalDensity.current
val textWidths = remember(tabs) { mutableStateMapOf<Int, androidx.compose.ui.unit.Dp>() }
val minTabWidth = screenWidthDp(50.dp)

Box(
modifier = Modifier
Expand Down Expand Up @@ -323,7 +327,7 @@ private fun SelectedLocationTabs(
) {
ScrollableTabRow(
selectedTabIndex = selectedIndex,
edgePadding = 0.dp,
edgePadding = screenWidthDp(17.dp),
containerColor = Color.Transparent,
divider = {
HorizontalDivider(
Expand All @@ -332,19 +336,34 @@ private fun SelectedLocationTabs(
)
},
indicator = { tabPositions ->
TabRowDefaults.SecondaryIndicator(
val currentTab = tabPositions.getOrNull(selectedIndex) ?: return@ScrollableTabRow
val textWidth = textWidths[selectedIndex] ?: 0.dp
val indicatorWidth = if (textWidth > 0.dp) {
maxOf(minTabWidth, textWidth)
} else {
minTabWidth
}
val indicatorOffsetX = currentTab.left + (currentTab.width - indicatorWidth) / 2

Box(
modifier = Modifier
.tabIndicatorOffset(tabPositions[selectedIndex])
.padding(horizontal = screenWidthDp(17.dp))
.height(1.dp),
color = SpotTheme.colors.B500
.fillMaxWidth()
.wrapContentSize(Alignment.BottomStart)
.offset(x = indicatorOffsetX)
.width(indicatorWidth)
.height(1.dp)
.background(SpotTheme.colors.B500)
)
}
) {
tabs.forEachIndexed { index, name ->
val textWidth = textWidths[index] ?: 0.dp
val tabWidth = if (textWidth > 0.dp) maxOf(minTabWidth, textWidth) else minTabWidth

Tab(
modifier = Modifier
.wrapContentWidth(),
.width(tabWidth)
.padding(horizontal = screenWidthDp(7.dp)), // 1) 탭 간 간격
selected = selectedIndex == index,
onClick = { onTabSelected(index) },
selectedContentColor = SpotTheme.colors.black,
Expand All @@ -353,11 +372,17 @@ private fun SelectedLocationTabs(
Text(
text = name,
style = SpotTheme.typography.h5,
onTextLayout = { textLayoutResult ->
textWidths[index] = with(density) { textLayoutResult.size.width.toDp() }
},
modifier = Modifier
.padding(horizontal = screenWidthDp(7.dp), vertical = screenHeightDp(4.dp))
.padding(
vertical = screenHeightDp(4.dp) // 4) 탭 높이(세로 여백)
),
textAlign = TextAlign.Center
)
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.umcspot.spot.feature.board.main
package com.umcspot.spot.feature.board.main

import androidx.compose.foundation.Image
import androidx.compose.foundation.background
Expand Down Expand Up @@ -79,7 +79,7 @@ fun BoardScreen(
Box(
modifier = Modifier
.fillMaxSize()
.background(Color.White)
.background(SpotTheme.colors.white)
.padding(top = topPad, bottom = bottomPad)
) {
LazyColumn(
Expand Down Expand Up @@ -321,14 +321,11 @@ private fun RecentCardList(
onItemClick: (RecentPostResult) -> Unit
) {
ShapeBox(
modifier = Modifier.fillMaxWidth(),
shape = SpotShapes.Soft,
color = SpotTheme.colors.white,
borderWidth = 1.dp,
borderColor = SpotTheme.colors.G200,
modifier = Modifier
.fillMaxWidth()
.clip(SpotShapes.Soft)
.height(screenHeightDp(162.dp))
) {
when (items) {
is UiState.Loading, is UiState.Empty, is UiState.Failure -> {
Expand All @@ -345,7 +342,7 @@ private fun RecentCardList(

Column(
modifier = Modifier
.fillMaxSize()
.fillMaxWidth()
.padding(screenWidthDp(7.dp)),
verticalArrangement = Arrangement.spacedBy(screenHeightDp(7.dp))
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -557,13 +557,12 @@ private fun preview() {

// 2) 구분선
item(key = "divider") {
Spacer(Modifier.height(8.dp))
HorizontalDivider(
modifier = Modifier.fillMaxWidth(),
thickness = 1.dp,
color = SpotTheme.colors.gray200
)
Spacer(Modifier.height(8.dp))
Spacer(Modifier.height(screenHeightDp(18.dp)))
}

items(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,13 +264,14 @@ private fun BottomToolsRow(
) {
Row(
modifier = Modifier
.padding(horizontal = screenWidthDp(5.dp), vertical = screenHeightDp(2.dp))
.clickable(
onClick = onClickAddPhoto
)
.clip(SpotShapes.Hard)
.clickable(onClick = onClickAddPhoto)
.padding(horizontal = screenWidthDp(5.dp), vertical = screenHeightDp(2.dp)),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.Center,
) {
Image(
modifier = Modifier.size(screenWidthDp(20.dp)),
modifier = Modifier.size(screenWidthDp(14.dp)),
painter = painterResource(R.drawable.camera),
Comment on lines 265 to 275
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 | 🟠 Major | ⚡ Quick win

사진 추가 클릭 영역의 최소 터치 타깃을 보장해 주세요.

현재 vertical = 2.dp + 14.dp 아이콘 기준으로 실제 탭 높이가 작아져 접근성/오탭 이슈가 발생할 수 있습니다. 최소 48dp 터치 타깃을 강제하는 게 안전합니다.

수정 제안
         Row(
             modifier = Modifier
                 .clip(SpotShapes.Hard)
                 .clickable(onClick = onClickAddPhoto)
+                .heightIn(min = 48.dp)
                 .padding(horizontal = screenWidthDp(5.dp), vertical = screenHeightDp(2.dp)),
             verticalAlignment = Alignment.CenterVertically,
             horizontalArrangement = Arrangement.Center,
         ) {
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@feature/board/src/main/java/com/umcspot/spot/feature/board/post/posting/PostingScreen.kt`
around lines 265 - 275, The touch target for the photo-add control is smaller
than the recommended 48dp; update the composable so the clickable area for
onClickAddPhoto is at least 48.dp tall/wide (e.g., give the Row or a wrapping
Box a minimum size of 48.dp or use Compose’s minimum interactive size helper)
and keep the Image (camera) centered inside it; specifically adjust the
Row/Modifier around the Image in PostingScreen.kt (the Row containing Image and
the onClickAddPhoto clickable) to enforce a minimum touch target
(minHeight/minWidth or minimumInteractiveComponentSize) instead of relying on
the current 2.dp vertical padding and 14.dp icon size.

contentDescription = "사진 추가",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,15 @@ private fun CategoryScreen(
bottom = contentPadding.calculateBottomPadding()
)
) {
Spacer(Modifier.height(screenHeightDp(18.dp)))

CategoryTabs(
tabs = allTabs,
selectedIndex = selectedIndex,
onTabSelected = onTabSelected
)

Spacer(Modifier.height(screenHeightDp(12.dp)))
Spacer(Modifier.height(screenHeightDp(12.dp)))

CategoryHeaderRow(
size = studyList.size,
Expand Down
Loading