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
@@ -0,0 +1,115 @@
package com.cherrish.android.presentation.challenge

import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.material3.Icon
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.cherrish.android.R
import com.cherrish.android.core.common.extension.noRippleClickable
import com.cherrish.android.core.designsystem.theme.CherrishTheme

@Composable
fun ChallengeLoadingScreen(
paddingValues: PaddingValues,
modifier: Modifier = Modifier,
onCloseClick: () -> Unit
) {
Column(
modifier = modifier
.fillMaxSize()
.padding(horizontal = 10.dp)
.padding(paddingValues)
.navigationBarsPadding(),
horizontalAlignment = Alignment.CenterHorizontally
) {
Spacer(modifier = Modifier.height(44.dp))

Icon(
modifier = Modifier
.noRippleClickable(onClick = onCloseClick)
.align(Alignment.Start)
.padding(10.dp),
imageVector = ImageVector.vectorResource(R.drawable.ic_arrow_left),
contentDescription = null,
tint = CherrishTheme.colors.gray1000
)
Comment on lines +44 to +52

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

접근성: 클릭 가능한 아이콘에 contentDescription 필요
현재 뒤로가기 아이콘이 클릭 가능하지만 contentDescription = null이라 스크린리더가 기능을 알 수 없습니다. 접근성상 차단 이슈이므로 라벨을 제공해 주세요.

🔧 제안 수정
-            contentDescription = null,
+            contentDescription = stringResource(R.string.challenge_loading_close),
🤖 Prompt for AI Agents
In
`@app/src/main/java/com/cherrish/android/presentation/challenge/ChallengeLoadingScreen.kt`
around lines 39 - 46, The Icon in ChallengeLoadingScreen.kt is clickable
(noRippleClickable with onCloseClick) but has contentDescription = null; update
the Icon to provide an accessible label by setting contentDescription to a
localized string (use stringResource with a new string like R.string.cd_back or
reuse an existing "back" label) so screen readers announce the action; ensure
the string resource key and usage reference the Icon in ChallengeLoadingScreen
(and add the string to res/values/strings.xml).


Spacer(modifier = Modifier.weight(84f))

Row(horizontalArrangement = Arrangement.spacedBy(4.dp)) {
Text(
text = "피부 컨디션",
color = CherrishTheme.colors.red700,
style = CherrishTheme.typography.title1SB18
)

Text(
text = "관리 방향을 바탕으로",
color = CherrishTheme.colors.gray800,
style = CherrishTheme.typography.title1SB18
)
}

Spacer(modifier = Modifier.height(2.dp))

Text(
text = "TO-DO 미션을 만들고 있어요.",
color = CherrishTheme.colors.gray800,
style = CherrishTheme.typography.title1SB18
)

Spacer(modifier = Modifier.height(60.dp))

Image(

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.

p1: 이거 그냥 size 150.dp 지정해주느게 좋을 것 같아요!

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.

이미지요 ??

painter = painterResource(id = R.drawable.img_challenge_loading),
contentDescription = null,
modifier = Modifier.size(150.dp)
)

Spacer(modifier = Modifier.height(80.dp))

Text(
text = "잠시만 기다려주세요!",
color = CherrishTheme.colors.gray800,
style = CherrishTheme.typography.title2SB16
)

Spacer(modifier = Modifier.weight(147f))

Text(
text = "AI가 맞춤형 루틴을 제작하고 있어요.",
color = CherrishTheme.colors.gray600,
style = CherrishTheme.typography.body3M12
)

Spacer(modifier = Modifier.height(30.dp))
}
}

@Preview(showBackground = true)
@Composable
private fun ChallengeLoadingScreenPreview() {
CherrishTheme {
ChallengeLoadingScreen(
paddingValues = PaddingValues(),
onCloseClick = {}
)
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.