Skip to content

Conversation

@xx-lvr
Copy link
Collaborator

@xx-lvr xx-lvr commented Feb 19, 2025

๐Ÿ’ก ๊ฐœ์š”

SignIn Page๋ฅผ ํผ๋ธ”๋ฆฌ์‹ฑ ํ–ˆ์Šต๋‹ˆ๋‹ค.

๐Ÿ“ƒ ์ž‘์—…๋‚ด์šฉ

SingIn Page ํผ๋ธ”๋ฆฌ์‹ฑ, DoMaLogin, DoMaInputId, DoMaInputPassword๊ตฌํ˜„

๐Ÿ”€ ๋ณ€๊ฒฝ์‚ฌํ•ญ

SignIn Page์— screen๊ณผ component

๐Ÿ™‹โ€โ™‚๏ธ ์งˆ๋ฌธ์‚ฌํ•ญ

  • ๊ฐœ์„ ํ•  ์ , ์˜คํƒ€, ์ฝ”๋“œ์— ์ด์‚ฐํ•œ ๋ถ€๋ถ„์ด ์žˆ๋‹ค๋ฉด Comment ๋‹ฌ์•„์ฃผ์„ธ์š”.

๐Ÿด ์‚ฌ์šฉ๋ฐฉ๋ฒ•

๐ŸŽธ ๊ธฐํƒ€

Summary by CodeRabbit

  • New Features

    • ์ƒˆ๋กœ์šด ๋กœ๊ทธ์ธ ํ™”๋ฉด์ด ๋„์ž…๋˜์–ด, ์‚ฌ์šฉ์ž ID์™€ ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์ž…๋ ฅํ•  ์ˆ˜ ์žˆ๋Š” ์ง๊ด€์ ์ธ ์ž…๋ ฅ ํ•„๋“œ์™€ ๋กœ๊ทธ์ธ ๋ฒ„ํŠผ์ด ์ถ”๊ฐ€๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
    • Google ์ธ์ฆ ๊ธฐ๋Šฅ์ด ํ†ตํ•ฉ๋˜์–ด, ํ•œ์ธต ์›ํ™œํ•œ ๋กœ๊ทธ์ธ ๊ฒฝํ—˜์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.
    • ์‚ฌ์šฉ์ž ID ์ž…๋ ฅ ํ•„๋“œ์™€ ๋น„๋ฐ€๋ฒˆํ˜ธ ์ž…๋ ฅ ํ•„๋“œ๊ฐ€ ์ถ”๊ฐ€๋˜์–ด, ๋ณด๋‹ค ํŽธ๋ฆฌํ•œ ๋กœ๊ทธ์ธ ์ ˆ์ฐจ๋ฅผ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค.
    • ๋กœ๊ทธ์ธ ๋ฒ„ํŠผ์ด ์ƒˆ๋กญ๊ฒŒ ๋””์ž์ธ๋˜์–ด, ์‚ฌ์šฉ์ž ์ธํ„ฐํŽ˜์ด์Šค๊ฐ€ ๊ฐœ์„ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
    • ์ƒˆ๋กœ์šด ์ƒ‰์ƒ ์†์„ฑ์ธ Green๊ณผ Background๊ฐ€ ์ถ”๊ฐ€๋˜์–ด, ์ƒ‰์ƒ ํ…Œ๋งˆ๊ฐ€ ์—…๋ฐ์ดํŠธ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
  • Bug Fixes

    • ์„ ํƒ ์ƒํƒœ์˜ ๋ถˆํ•„์š”ํ•œ ์š”์†Œ๋“ค์ด ์ œ๊ฑฐ๋˜์–ด, ์„ค์ • ๊ตฌ์„ฑ์ด ๊ฐ„์†Œํ™”๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
  • Style

    • ์ƒ‰์ƒ ํ…Œ๋งˆ๊ฐ€ ์—…๋ฐ์ดํŠธ๋˜์–ด, ์ƒˆ๋กœ์šด ์ƒ‰์ƒ ์†์„ฑ์ด ์ถ”๊ฐ€๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
    • ์ƒ‰์ƒ ์ •์˜๊ฐ€ ์ˆ˜์ •๋˜์–ด, ๋ถˆํ•„์š”ํ•œ ์ƒ‰์ƒ ์†์„ฑ์ด ์ œ๊ฑฐ๋˜๊ณ  ์ƒˆ๋กœ์šด ์ƒ‰์ƒ์ด ์ถ”๊ฐ€๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

@coderabbitai
Copy link

coderabbitai bot commented Feb 19, 2025

Walkthrough

์ด๋ฒˆ PR์—์„œ๋Š” ์„ค์ • ํŒŒ์ผ๊ณผ ๋นŒ๋“œ ๊ด€๋ จ ํŒŒ์ผ์˜ ๊ฐ„์†Œํ™” ์ž‘์—…๊ณผ ํ•จ๊ป˜, ์‚ฌ์šฉ์ž ๋กœ๊ทธ์ธ UI๋ฅผ ์œ„ํ•œ ์ƒˆ๋กœ์šด Jetpack Compose ๊ธฐ๋ฐ˜ ์ปดํฌ๋„ŒํŠธ๋“ค์„ ์ถ”๊ฐ€ํ•˜์˜€์Šต๋‹ˆ๋‹ค. XML ๊ตฌ์„ฑ ํŒŒ์ผ์—์„œ๋Š” ๋ถˆํ•„์š”ํ•œ <SelectionState> ์š”์†Œ๋“ค์ด ์ œ๊ฑฐ๋˜์—ˆ์œผ๋ฉฐ, ๋นŒ๋“œ ์Šคํฌ๋ฆฝํŠธ ํŒŒ์ผ์—์„œ๋Š” ๋ผ์ธ ์ˆ˜๊ฐ€ ์ถ•์†Œ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ๋˜ํ•œ, ID ์ž…๋ ฅ, ๋น„๋ฐ€๋ฒˆํ˜ธ ์ž…๋ ฅ, ๋กœ๊ทธ์ธ ๋ฒ„ํŠผ์„ ํฌํ•จํ•œ ๋‹ค์–‘ํ•œ ์ปดํฌ์ €๋ธ” ํ•จ์ˆ˜๋“ค๊ณผ ์ด๋ฅผ ํ™œ์šฉํ•œ SignInScreen ๋ฐ SignInSubScreen ํŒŒ์ผ์ด ์ถ”๊ฐ€๋˜์–ด ์‚ฌ์šฉ์ž ์ธ์ฆ ํ”„๋กœ์„ธ์Šค์˜ UI ๊ตฌ์„ฑ์ด ์ด๋ฃจ์–ด์กŒ์Šต๋‹ˆ๋‹ค.

Changes

ํŒŒ์ผ ๊ฒฝ๋กœ ๋ณ€๊ฒฝ ๋‚ด์šฉ
.idea/deploymentTargetSelector.xml <SelectionState> ํ•ญ๋ชฉ ์ค‘ data, data2, domain, presentation ์š”์†Œ ์ œ๊ฑฐํ•˜์—ฌ ์„ค์ • ๋‹จ์ˆœํ™”
buildSrc/.../counters.tab 2์ค„ ์‚ญ์ œ๋กœ ๋ฐ์ดํ„ฐ ๊ตฌ์กฐ ๋˜๋Š” ์„ค์ •์˜ ๊ฐ„์†Œํ™”
presentation/.../view/signin/component/DoMaInputID.kt,
presentation/.../view/signin/component/DoMaInputPassword.kt,
presentation/.../view/signin/component/DoMaLoginButton.kt
์ƒˆ๋กœ์šด Compose UI ์ปดํฌ๋„ŒํŠธ ์ถ”๊ฐ€: ID ์ž…๋ ฅ ํ•„๋“œ, ๋น„๋ฐ€๋ฒˆํ˜ธ ์ž…๋ ฅ ํ•„๋“œ, ๋กœ๊ทธ์ธ ๋ฒ„ํŠผ ๋ฐ ๊ด€๋ จ ๋ฏธ๋ฆฌ๋ณด๊ธฐ ๊ธฐ๋Šฅ ๊ตฌํ˜„
presentation/.../view/signin/screen/SignInScreen.kt,
presentation/.../view/signin/screen/SignInSubScreen.kt
์‹ ๊ทœ ๋กœ๊ทธ์ธ ํ™”๋ฉด ๋ฐ ์„œ๋ธŒ ์Šคํฌ๋ฆฐ ์ถ”๊ฐ€, Google ์ธ์ฆ ํ”„๋กœ์„ธ์Šค ๋ฐ UI ๋ ˆ์ด์•„์›ƒ ๊ตฌํ˜„
presentation/.../view/theme/DomaAndroidTheme.kt DoMaAndroidTheme ํ•จ์ˆ˜์— typography ๋งค๊ฐœ๋ณ€์ˆ˜ ์ถ”๊ฐ€
presentation/.../view/theme/color/ColorTheme.kt,
presentation/.../view/theme/color/DoMaColor.kt
์ƒ‰์ƒ ์†์„ฑ ์ˆ˜์ •: GRAY ์ œ๊ฑฐ, Green ๋ฐ Background ์ถ”๊ฐ€
.idea/other.xml ์‚ผ์„ฑ ๊ธฐ๊ธฐ ์„ ํƒ ๋ฐ์ดํ„ฐ ์ถ”๊ฐ€ ๋ฐ ๊ธฐ์กด Galaxy Tab A7 Lite ํ•ญ๋ชฉ ์ œ๊ฑฐ
presentation/.../view/Mypage/component/MyClean.kt Text ์ปดํฌ๋„ŒํŠธ ์ƒ‰์ƒ ๋ณ€๊ฒฝ: colors.GRAY์—์„œ colors.Green์œผ๋กœ ๋ณ€๊ฒฝ

Suggested labels

1๏ธโƒฃ Priority: High

Poem

๋‚˜๋Š” ํ† ๋ผ, ์ฝ”๋“œ ์ˆฒ์„ ๋‹ฌ๋ ค
XML ์žŽ์‚ฌ๊ท€ ๋–จ์–ด์ง€๋“ฏ ์ •๋ฆฌ๋˜๋„ค
๋ถˆํ•„์š”ํ•œ ์ƒํƒœ๋Š” ๋ชจ๋‘ ๋– ๋‚˜๊ณ 
์˜ค์ง ์•ฑ๋งŒ ๋ฐ˜์ง์ด๋ฉฐ ๋น›๋‚˜๋„ค
์ƒˆ๋กœ์šด UI, ๋กœ๊ทธ์ธ ํ™”๋ฉด ์ถค์ถ”๋ฉฐ
์ฝ”๋“œ์˜ ๋“คํŒ์—์„œ ๋‚˜์˜ ๋ฐœ์ž๊ตญ์„ ๋‚จ๊ธฐ๋„ค ๐Ÿ‡
๋‹ฌ๋น› ์•„๋ž˜, ํ–‰๋ณตํ•œ ๋ณ€ํ™”์˜ ๋…ธ๋ž˜๋ฅผ ๋ถ€๋ฅด๋ฆฌ!

โœจ Finishing Touches
  • ๐Ÿ“ Generate Docstrings (Beta)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

โค๏ธ Share
๐Ÿชง Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 8

๐Ÿงน Nitpick comments (3)
presentation/src/main/java/view/signin/component/DoMaLoginButton.kt (1)

31-31: ์ƒ‰์ƒ ๊ฐ’์„ ํ…Œ๋งˆ๋กœ ์ด๋™ํ•˜๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค.

ํ•˜๋“œ์ฝ”๋”ฉ๋œ ์ƒ‰์ƒ ๊ฐ’์„ ํ…Œ๋งˆ ์‹œ์Šคํ…œ์œผ๋กœ ์ด๋™ํ•˜์—ฌ ์ผ๊ด€์„ฑ ์žˆ๋Š” ๋””์ž์ธ์„ ์œ ์ง€ํ•˜๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค.

-            .background(color = Color(0xFF494949), shape = RoundedCornerShape(size = 10.dp))
+            .background(color = DoMaTheme.colors.buttonBackground, shape = RoundedCornerShape(size = 10.dp))
presentation/src/main/java/view/signin/screen/SignInScreen.kt (2)

26-96: ์ƒ‰์ƒ ๊ด€๋ฆฌ์™€ ์ฝ”๋“œ ์žฌ์‚ฌ์šฉ์„ฑ ๊ฐœ์„ ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

  • ํ•˜๋“œ์ฝ”๋”ฉ๋œ ์ƒ‰์ƒ๊ฐ’๋“ค์„ ํ…Œ๋งˆ ํŒŒ์ผ๋กœ ์ด๋™ํ•˜์—ฌ ์ค‘์•™ ๊ด€๋ฆฌ๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.
  • ์œ ์‚ฌํ•œ ์Šคํƒ€์ผ์˜ Text ์ปดํฌ๋„ŒํŠธ๋“ค์„ ์žฌ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ์ปดํฌ๋„ŒํŠธ๋กœ ์ถ”์ถœํ•˜๋ฉด ์ข‹๊ฒ ์Šต๋‹ˆ๋‹ค.

์ƒ‰์ƒ๊ฐ’์„ ํ…Œ๋งˆ๋กœ ์ด๋™ํ•˜๊ณ  ๊ณตํ†ต ํ…์ŠคํŠธ ์ปดํฌ๋„ŒํŠธ๋ฅผ ๋งŒ๋“œ๋Š” ๊ฒƒ์„ ์ œ์•ˆํ•ฉ๋‹ˆ๋‹ค:

+// Colors.kt
+val DarkBackground = Color(0xFF1E1E1E)
+val PrimaryGreen = Color(0xFF9BFFA6)
+val TextWhite = Color(0xFFFFFFFF)
+val TextLightGray = Color(0xFFFAFAFA)

+// CommonText.kt
+@Composable
+fun DoMaText(
+    text: String,
+    style: TextStyle = DoMaTypography.labelLarge,
+    color: Color = TextLightGray,
+    textAlign: TextAlign = TextAlign.Start
+) {
+    Text(
+        text = text,
+        style = style.copy(color = color),
+        textAlign = textAlign
+    )
+}

109-117: ํ”„๋ฆฌ๋ทฐ ํ•จ์ˆ˜ ๊ฐœ์„ ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

  • ๋” ์˜๋ฏธ ์žˆ๋Š” ํ”„๋ฆฌ๋ทฐ๋ฅผ ์œ„ํ•ด mock ๊ตฌํ˜„์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.
  • ๋‹ค์–‘ํ•œ ํ…Œ๋งˆ์™€ ์ƒํƒœ์— ๋Œ€ํ•œ ํ”„๋ฆฌ๋ทฐ๊ฐ€ ์žˆ์œผ๋ฉด ์ข‹๊ฒ ์Šต๋‹ˆ๋‹ค.

๋‹ค์Œ๊ณผ ๊ฐ™์€ ํ”„๋ฆฌ๋ทฐ ๊ตฌ์„ฑ์„ ์ œ์•ˆํ•ฉ๋‹ˆ๋‹ค:

+@Preview(name = "Light Theme")
 @Preview(name = "Dark Theme", uiMode = UI_MODE_NIGHT_YES)
 @Composable
-fun PreviewSignInScreen() {
+fun PreviewSignInScreen() {
+    val mockGAuthLogin: (String) -> Unit = { code ->
+        println("Auth code received: $code")
+    }
+
+    val mockLoginClick: () -> Unit = {
+        println("Login button clicked")
+    }
+
     SignInScreen(
-        ClickButton = false,
-        gAuthLogin = {},
-        leIsClickLoginButton = {}
+        clickButton = false,
+        gAuthLogin = mockGAuthLogin,
+        leIsClickLoginButton = mockLoginClick
     )
 }
๐Ÿ“œ Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

๐Ÿ“ฅ Commits

Reviewing files that changed from the base of the PR and between 0a1e29a and fa249a3.

โ›” Files ignored due to path filters (3)
  • buildSrc/build/kotlin/compileKotlin/cacheable/last-build.bin is excluded by !**/*.bin
  • buildSrc/build/kotlin/compileKotlin/local-state/build-history.bin is excluded by !**/*.bin
  • buildSrc/build/libs/buildSrc.jar is excluded by !**/*.jar
๐Ÿ“’ Files selected for processing (7)
  • .idea/deploymentTargetSelector.xml (0 hunks)
  • buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/counters.tab (1 hunks)
  • presentation/src/main/java/view/signin/component/DoMaInputID.kt (1 hunks)
  • presentation/src/main/java/view/signin/component/DoMaInputPassword.kt (1 hunks)
  • presentation/src/main/java/view/signin/component/DoMaLoginButton.kt (1 hunks)
  • presentation/src/main/java/view/signin/screen/SignInScreen.kt (1 hunks)
  • presentation/src/main/java/view/signin/screen/SignInSubScreen.kt (1 hunks)
๐Ÿ’ค Files with no reviewable changes (1)
  • .idea/deploymentTargetSelector.xml
โœ… Files skipped from review due to trivial changes (1)
  • buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/counters.tab
โฐ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build

Comment on lines 21 to 47
fun DoMaLoginButton(
modifier: Modifier = Modifier,
onClick: () -> Unit,
) {
Row(
horizontalArrangement = Arrangement.spacedBy(10.dp, Alignment.CenterHorizontally),
verticalAlignment = Alignment.CenterVertically,
modifier = modifier
.fillMaxWidth()
.clickablesingle(onClick = onClick)
.background(color = Color(0xFF494949), shape = RoundedCornerShape(size = 10.dp))
.padding(
horizontal = 16.dp,
vertical = 12.dp,
),

) {
Text(
text = "๋กœ๊ทธ์ธ",
style = TextStyle(
fontSize = 16.sp,
fontWeight = FontWeight(700),
color = Color(0xFFE0E0E0),
)
)
}
}
Copy link

Choose a reason for hiding this comment

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

๐Ÿ› ๏ธ Refactor suggestion

๋กœ๋”ฉ ์ƒํƒœ ๋ฐ ์ ‘๊ทผ์„ฑ ๊ฐœ์„ ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

  1. ๋กœ๋”ฉ ์ƒํƒœ๋ฅผ ์ถ”๊ฐ€ํ•˜์—ฌ ์‚ฌ์šฉ์ž์—๊ฒŒ ํ”ผ๋“œ๋ฐฑ์„ ์ œ๊ณตํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
  2. ์ ‘๊ทผ์„ฑ์„ ์œ„ํ•œ contentDescription์„ ์ถ”๊ฐ€ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
 fun DoMaLoginButton(
     modifier: Modifier = Modifier,
+    isLoading: Boolean = false,
     onClick: () -> Unit,
 ) {
     Row(
         horizontalArrangement = Arrangement.spacedBy(10.dp, Alignment.CenterHorizontally),
         verticalAlignment = Alignment.CenterVertically,
         modifier = modifier
             .fillMaxWidth()
             .clickablesingle(onClick = onClick)
             .background(color = Color(0xFF494949), shape = RoundedCornerShape(size = 10.dp))
+            .semantics { contentDescription = "๋กœ๊ทธ์ธ ๋ฒ„ํŠผ" }
             .padding(
                 horizontal = 16.dp,
                 vertical = 12.dp,
             ),
     ) {
+        if (isLoading) {
+            CircularProgressIndicator(
+                color = Color(0xFFE0E0E0),
+                modifier = Modifier.size(16.dp)
+            )
+        } else {
             Text(
                 text = "๋กœ๊ทธ์ธ",
                 style = TextStyle(
                     fontSize = 16.sp,
                     fontWeight = FontWeight(700),
                     color = Color(0xFFE0E0E0),
                 )
             )
+        }
     }
 }
๐Ÿ“ 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
fun DoMaLoginButton(
modifier: Modifier = Modifier,
onClick: () -> Unit,
) {
Row(
horizontalArrangement = Arrangement.spacedBy(10.dp, Alignment.CenterHorizontally),
verticalAlignment = Alignment.CenterVertically,
modifier = modifier
.fillMaxWidth()
.clickablesingle(onClick = onClick)
.background(color = Color(0xFF494949), shape = RoundedCornerShape(size = 10.dp))
.padding(
horizontal = 16.dp,
vertical = 12.dp,
),
) {
Text(
text = "๋กœ๊ทธ์ธ",
style = TextStyle(
fontSize = 16.sp,
fontWeight = FontWeight(700),
color = Color(0xFFE0E0E0),
)
)
}
}
fun DoMaLoginButton(
modifier: Modifier = Modifier,
isLoading: Boolean = false,
onClick: () -> Unit,
) {
Row(
horizontalArrangement = Arrangement.spacedBy(10.dp, Alignment.CenterHorizontally),
verticalAlignment = Alignment.CenterVertically,
modifier = modifier
.fillMaxWidth()
.clickablesingle(onClick = onClick)
.background(color = Color(0xFF494949), shape = RoundedCornerShape(size = 10.dp))
.semantics { contentDescription = "๋กœ๊ทธ์ธ ๋ฒ„ํŠผ" }
.padding(
horizontal = 16.dp,
vertical = 12.dp,
),
) {
if (isLoading) {
CircularProgressIndicator(
color = Color(0xFFE0E0E0),
modifier = Modifier.size(16.dp)
)
} else {
Text(
text = "๋กœ๊ทธ์ธ",
style = TextStyle(
fontSize = 16.sp,
fontWeight = FontWeight(700),
color = Color(0xFFE0E0E0),
)
)
}
}
}

fun DoMaInputID(
modifier: Modifier = Modifier,
) {
val idState = remember { mutableStateOf(TextFieldValue("")) } // viewmodel ๊ตฌํ˜„ ํ›„ ์ˆ˜์ • ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.
Copy link

Choose a reason for hiding this comment

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

๐Ÿ› ๏ธ Refactor suggestion

์ƒํƒœ ๊ด€๋ฆฌ ๊ฐœ์„ ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

ViewModel ๊ตฌํ˜„ ์ „์ด๋ผ๋„ ์ƒํƒœ๋ฅผ ์ƒ์œ„ ์ปดํฌ๋„ŒํŠธ๋กœ ํ˜ธ์ด์ŠคํŒ…ํ•˜์—ฌ ๊ด€๋ฆฌํ•˜๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค.

 fun DoMaInputID(
     modifier: Modifier = Modifier,
+    value: TextFieldValue,
+    onValueChange: (TextFieldValue) -> Unit,
 ) {
-    val idState = remember { mutableStateOf(TextFieldValue("")) }
๐Ÿ“ 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
val idState = remember { mutableStateOf(TextFieldValue("")) } // viewmodel ๊ตฌํ˜„ ํ›„ ์ˆ˜์ • ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.
fun DoMaInputID(
modifier: Modifier = Modifier,
value: TextFieldValue,
onValueChange: (TextFieldValue) -> Unit,
) {
// Removed internal state management and use the hoisted state instead.
// val idState = remember { mutableStateOf(TextFieldValue("")) }
// Implementation code that utilizes 'value' and 'onValueChange' should follow.
}

Comment on lines 35 to 54
OutlinedTextField(
modifier = Modifier.fillMaxWidth(),
value = idState.value,
onValueChange = { idState.value = it },
textStyle = DoMaTypography.labelLarge.copy(color = Color.White),
shape = RoundedCornerShape(12.dp),
singleLine = true,
placeholder = {
Text(
text = "์•„์ด๋””๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.",
style = DoMaTypography.labelLarge.copy(color = Color(0xFF989898))
)
},
colors = TextFieldDefaults.outlinedTextFieldColors(
backgroundColor = Color(0xFF1E1E1E),
cursorColor = Color.White,
focusedBorderColor = Color(0xFFB9B9B9),
unfocusedBorderColor = Color(0xFFB9B9B9)
)
)
Copy link

Choose a reason for hiding this comment

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

โš ๏ธ Potential issue

์ž…๋ ฅ ์œ ํšจ์„ฑ ๊ฒ€์‚ฌ ๋ฐ ๋ณด์•ˆ ๊ฐœ์„ ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

  1. ID ์ž…๋ ฅ ์ œํ•œ ๋ฐ ์œ ํšจ์„ฑ ๊ฒ€์‚ฌ๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.
  2. ์ž…๋ ฅ๊ฐ’ ํ•„ํ„ฐ๋ง์„ ํ†ตํ•œ ๋ณด์•ˆ ๊ฐ•ํ™”๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.
 OutlinedTextField(
     modifier = Modifier.fillMaxWidth(),
-    value =  idState.value,
-    onValueChange = { idState.value = it },
+    value = value,
+    onValueChange = { newValue ->
+        // ID ๊ธธ์ด ์ œํ•œ
+        if (newValue.text.length <= 20) {
+            // ํŠน์ˆ˜๋ฌธ์ž ํ•„ํ„ฐ๋ง
+            val filteredText = newValue.text.filter { it.isLetterOrDigit() || it == '_' }
+            onValueChange(TextFieldValue(
+                text = filteredText,
+                selection = TextRange(filteredText.length)
+            ))
+        }
+    },
     textStyle = DoMaTypography.labelLarge.copy(color = Color.White),
     shape = RoundedCornerShape(12.dp),
     singleLine = true,
+    isError = !isValidId(value.text),
     placeholder = {
๐Ÿ“ 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
OutlinedTextField(
modifier = Modifier.fillMaxWidth(),
value = idState.value,
onValueChange = { idState.value = it },
textStyle = DoMaTypography.labelLarge.copy(color = Color.White),
shape = RoundedCornerShape(12.dp),
singleLine = true,
placeholder = {
Text(
text = "์•„์ด๋””๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.",
style = DoMaTypography.labelLarge.copy(color = Color(0xFF989898))
)
},
colors = TextFieldDefaults.outlinedTextFieldColors(
backgroundColor = Color(0xFF1E1E1E),
cursorColor = Color.White,
focusedBorderColor = Color(0xFFB9B9B9),
unfocusedBorderColor = Color(0xFFB9B9B9)
)
)
OutlinedTextField(
modifier = Modifier.fillMaxWidth(),
value = value,
onValueChange = { newValue ->
// ID ๊ธธ์ด ์ œํ•œ
if (newValue.text.length <= 20) {
// ํŠน์ˆ˜๋ฌธ์ž ํ•„ํ„ฐ๋ง
val filteredText = newValue.text.filter { it.isLetterOrDigit() || it == '_' }
onValueChange(
TextFieldValue(
text = filteredText,
selection = TextRange(filteredText.length)
)
)
}
},
textStyle = DoMaTypography.labelLarge.copy(color = Color.White),
shape = RoundedCornerShape(12.dp),
singleLine = true,
isError = !isValidId(value.text),
placeholder = {
Text(
text = "์•„์ด๋””๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.",
style = DoMaTypography.labelLarge.copy(color = Color(0xFF989898))
)
},
colors = TextFieldDefaults.outlinedTextFieldColors(
backgroundColor = Color(0xFF1E1E1E),
cursorColor = Color.White,
focusedBorderColor = Color(0xFFB9B9B9),
unfocusedBorderColor = Color(0xFFB9B9B9)
)
)

Comment on lines 25 to 56
val idState = remember { mutableStateOf(TextFieldValue("")) } // viewmodel ๊ตฌํ˜„ ํ›„ ์ˆ˜์ • ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

Column(
modifier = Modifier
) {
Text(
text = "๋น„๋ฐ€๋ฒˆํ˜ธ",
style = DoMaTypography.bodyMedium.copy(color = Color(0xFFFAFAFA))
)
Spacer(
modifier = Modifier.height(4.dp)
)
OutlinedTextField(
modifier = Modifier.fillMaxWidth(),
value = idState.value,
onValueChange = { idState.value = it },
textStyle = DoMaTypography.labelLarge.copy(color = Color.White),
shape = RoundedCornerShape(12.dp),
singleLine = true,
placeholder = {
Text(
text = "๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.",
style = DoMaTypography.labelLarge.copy(color = Color(0xFF989898))
)
},
colors = TextFieldDefaults.outlinedTextFieldColors(
backgroundColor = Color(0xFF1E1E1E),
cursorColor = Color.White,
focusedBorderColor = Color(0xFFB9B9B9),
unfocusedBorderColor = Color(0xFFB9B9B9)
)
)
Copy link

Choose a reason for hiding this comment

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

โš ๏ธ Potential issue

๋น„๋ฐ€๋ฒˆํ˜ธ ์ž…๋ ฅ ํ•„๋“œ์˜ ๋ณด์•ˆ ๋ฐ UX ๊ฐœ์„ ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

  1. ๋น„๋ฐ€๋ฒˆํ˜ธ ํ‘œ์‹œ/์ˆจ๊น€ ํ† ๊ธ€์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.
  2. ๋น„๋ฐ€๋ฒˆํ˜ธ ์š”๊ตฌ์‚ฌํ•ญ ํ‘œ์‹œ๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.
  3. ๋น„๋ฐ€๋ฒˆํ˜ธ ์ž…๋ ฅ ์‹œ ๋งˆ์Šคํ‚น์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.
+import androidx.compose.material.IconButton
+import androidx.compose.material.icons.Icons
+import androidx.compose.material.icons.filled.Visibility
+import androidx.compose.material.icons.filled.VisibilityOff
+import androidx.compose.ui.text.input.PasswordVisualTransformation
+import androidx.compose.ui.text.input.VisualTransformation

 fun DoMaInputPassword(
     modifier: Modifier = Modifier,
+    value: TextFieldValue,
+    onValueChange: (TextFieldValue) -> Unit,
 ) {
-    val idState = remember { mutableStateOf(TextFieldValue("")) }
+    var passwordVisible by remember { mutableStateOf(false) }

     Column(
         modifier = Modifier
     ) {
         Text(
             text = "๋น„๋ฐ€๋ฒˆํ˜ธ",
             style = DoMaTypography.bodyMedium.copy(color = Color(0xFFFAFAFA))
         )
+        Text(
+            text = "8์ž ์ด์ƒ, ์˜๋ฌธ/์ˆซ์ž/ํŠน์ˆ˜๋ฌธ์ž ์กฐํ•ฉ",
+            style = DoMaTypography.caption.copy(color = Color(0xFF989898))
+        )
         Spacer(
             modifier = Modifier.height(4.dp)
         )
         OutlinedTextField(
             modifier = Modifier.fillMaxWidth(),
-            value = idState.value,
-            onValueChange = { idState.value = it },
+            value = value,
+            onValueChange = onValueChange,
             textStyle = DoMaTypography.labelLarge.copy(color = Color.White),
             shape = RoundedCornerShape(12.dp),
             singleLine = true,
+            visualTransformation = if (passwordVisible) 
+                VisualTransformation.None 
+            else 
+                PasswordVisualTransformation(),
+            trailingIcon = {
+                IconButton(onClick = { passwordVisible = !passwordVisible }) {
+                    Icon(
+                        imageVector = if (passwordVisible) 
+                            Icons.Filled.Visibility
+                        else 
+                            Icons.Filled.VisibilityOff,
+                        contentDescription = if (passwordVisible) 
+                            "๋น„๋ฐ€๋ฒˆํ˜ธ ์ˆจ๊ธฐ๊ธฐ" 
+                        else 
+                            "๋น„๋ฐ€๋ฒˆํ˜ธ ํ‘œ์‹œ"
+                    )
+                }
+            },
๐Ÿ“ 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
val idState = remember { mutableStateOf(TextFieldValue("")) } // viewmodel ๊ตฌํ˜„ ํ›„ ์ˆ˜์ • ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.
Column(
modifier = Modifier
) {
Text(
text = "๋น„๋ฐ€๋ฒˆํ˜ธ",
style = DoMaTypography.bodyMedium.copy(color = Color(0xFFFAFAFA))
)
Spacer(
modifier = Modifier.height(4.dp)
)
OutlinedTextField(
modifier = Modifier.fillMaxWidth(),
value = idState.value,
onValueChange = { idState.value = it },
textStyle = DoMaTypography.labelLarge.copy(color = Color.White),
shape = RoundedCornerShape(12.dp),
singleLine = true,
placeholder = {
Text(
text = "๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.",
style = DoMaTypography.labelLarge.copy(color = Color(0xFF989898))
)
},
colors = TextFieldDefaults.outlinedTextFieldColors(
backgroundColor = Color(0xFF1E1E1E),
cursorColor = Color.White,
focusedBorderColor = Color(0xFFB9B9B9),
unfocusedBorderColor = Color(0xFFB9B9B9)
)
)
import androidx.compose.material.IconButton
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Visibility
import androidx.compose.material.icons.filled.VisibilityOff
import androidx.compose.material.TextFieldDefaults
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.text.input.PasswordVisualTransformation
import androidx.compose.ui.text.input.TextFieldValue
import androidx.compose.ui.text.input.VisualTransformation
fun DoMaInputPassword(
modifier: Modifier = Modifier,
value: TextFieldValue,
onValueChange: (TextFieldValue) -> Unit,
) {
var passwordVisible by remember { mutableStateOf(false) }
Column(
modifier = Modifier
) {
Text(
text = "๋น„๋ฐ€๋ฒˆํ˜ธ",
style = DoMaTypography.bodyMedium.copy(color = Color(0xFFFAFAFA))
)
Text(
text = "8์ž ์ด์ƒ, ์˜๋ฌธ/์ˆซ์ž/ํŠน์ˆ˜๋ฌธ์ž ์กฐํ•ฉ",
style = DoMaTypography.caption.copy(color = Color(0xFF989898))
)
Spacer(
modifier = Modifier.height(4.dp)
)
OutlinedTextField(
modifier = Modifier.fillMaxWidth(),
value = value,
onValueChange = onValueChange,
textStyle = DoMaTypography.labelLarge.copy(color = Color.White),
shape = RoundedCornerShape(12.dp),
singleLine = true,
placeholder = {
Text(
text = "๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.",
style = DoMaTypography.labelLarge.copy(color = Color(0xFF989898))
)
},
visualTransformation = if (passwordVisible)
VisualTransformation.None
else
PasswordVisualTransformation(),
trailingIcon = {
IconButton(onClick = { passwordVisible = !passwordVisible }) {
Icon(
imageVector = if (passwordVisible)
Icons.Filled.Visibility
else
Icons.Filled.VisibilityOff,
contentDescription = if (passwordVisible)
"๋น„๋ฐ€๋ฒˆํ˜ธ ์ˆจ๊ธฐ๊ธฐ"
else
"๋น„๋ฐ€๋ฒˆํ˜ธ ํ‘œ์‹œ"
)
}
},
colors = TextFieldDefaults.outlinedTextFieldColors(
backgroundColor = Color(0xFF1E1E1E),
cursorColor = Color.White,
focusedBorderColor = Color(0xFFB9B9B9),
unfocusedBorderColor = Color(0xFFB9B9B9)
)
)
}
}

Comment on lines 86 to 87
clientId = "ghskfend",
redirectUri = "ghskfen"
Copy link

Choose a reason for hiding this comment

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

โš ๏ธ Potential issue

๋ณด์•ˆ ์ทจ์•ฝ์ : ํ•˜๋“œ์ฝ”๋”ฉ๋œ ์ธ์ฆ ์ •๋ณด

ํด๋ผ์ด์–ธํŠธ ID์™€ ๋ฆฌ๋‹ค์ด๋ ‰ํŠธ URI๊ฐ€ ํ•˜๋“œ์ฝ”๋”ฉ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๋Š” ์‹ฌ๊ฐํ•œ ๋ณด์•ˆ ์œ„ํ—˜์„ ์ดˆ๋ž˜ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

-                clientId = "ghskfend",
-                redirectUri = "ghskfen"
+                clientId = BuildConfig.CLIENT_ID,
+                redirectUri = BuildConfig.REDIRECT_URI
๐Ÿ“ 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
clientId = "ghskfend",
redirectUri = "ghskfen"
clientId = BuildConfig.CLIENT_ID,
redirectUri = BuildConfig.REDIRECT_URI

Comment on lines 19 to 93
fun SignInSubScreen(
modifier: Modifier = Modifier,
ClickButton: Boolean,
gAuthLogin: (String) -> Unit,
leIsClickLoginButton: () -> Unit,
) {
Column(
modifier = modifier
.fillMaxSize()
.background(color = Color(0xFF1E1E1E))
.padding(horizontal = 20.dp),
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.CenterHorizontally
) {
Column(
modifier = Modifier
.fillMaxWidth()
.weight(1f),
verticalArrangement = Arrangement.Center
) {
Row(
modifier = Modifier.fillMaxWidth(),
verticalAlignment = Alignment.Bottom,
horizontalArrangement = Arrangement.Start
) {
Text(
text = "์•„์ด๋””",
style = DoMaTypography.headlineSmall.copy(color = Color(0xFF9AD54A)),
)
Text(
text = "์™€",
style = DoMaTypography.headlineSmall.copy(color = Color(0xFFFAFAFA)),
)
Text(
text = " ๋น„๋ฐ€๋ฒˆํ˜ธ",
style = DoMaTypography.headlineSmall.copy(color = Color(0xFF9AD54A)),
)
Text(
text = "๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”!",
style = DoMaTypography.headlineSmall.copy(color = Color(0xFFFAFAFA)),
)
}

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

DoMaInputID(
modifier = Modifier
.fillMaxWidth()
)

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

DoMaInputPassword(
modifier = Modifier
.fillMaxWidth()
)
}

DoMaLoginButton(
onClick = leIsClickLoginButton,
modifier = Modifier
.fillMaxWidth()
.padding(bottom = 30.dp)
)

if (ClickButton) {
GAuthSigninWebView(
clientId = "ghskfend",
redirectUri = "ghskfen"
) { code ->
gAuthLogin(code)
}
}
}
}
Copy link

Choose a reason for hiding this comment

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

๐Ÿ› ๏ธ Refactor suggestion

์—๋Ÿฌ ์ฒ˜๋ฆฌ ๋ฐ ์‚ฌ์šฉ์ž ํ”ผ๋“œ๋ฐฑ ๊ฐœ์„ ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

  1. ๋กœ๊ทธ์ธ ์‹คํŒจ ์‹œ ์—๋Ÿฌ ์ฒ˜๋ฆฌ๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.
  2. ์‚ฌ์šฉ์ž์—๊ฒŒ ์ ์ ˆํ•œ ํ”ผ๋“œ๋ฐฑ์„ ์ œ๊ณตํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
  3. ๋„คํŠธ์›Œํฌ ์ƒํƒœ ์ฒ˜๋ฆฌ๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.
 fun SignInSubScreen(
     modifier: Modifier = Modifier,
     ClickButton: Boolean,
     gAuthLogin: (String) -> Unit,
     leIsClickLoginButton: () -> Unit,
+    loginState: LoginState,
+    errorMessage: String? = null,
 ) {
+    var showError by remember { mutableStateOf(false) }
+
+    LaunchedEffect(errorMessage) {
+        errorMessage?.let {
+            showError = true
+        }
+    }
+
     Column(
         // ... existing code ...
     ) {
+        if (showError) {
+            Text(
+                text = errorMessage ?: "๋กœ๊ทธ์ธ ์ค‘ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค.",
+                color = Color.Red,
+                modifier = Modifier.padding(bottom = 8.dp)
+            )
+        }
+
+        when (loginState) {
+            LoginState.Loading -> {
+                CircularProgressIndicator()
+            }
+            LoginState.Error -> {
+                // Error UI
+            }
+            else -> {
                 // ... existing content ...
+            }
+        }
     }
 }

+enum class LoginState {
+    Idle,
+    Loading,
+    Success,
+    Error
+}
๐Ÿ“ 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
fun SignInSubScreen(
modifier: Modifier = Modifier,
ClickButton: Boolean,
gAuthLogin: (String) -> Unit,
leIsClickLoginButton: () -> Unit,
) {
Column(
modifier = modifier
.fillMaxSize()
.background(color = Color(0xFF1E1E1E))
.padding(horizontal = 20.dp),
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.CenterHorizontally
) {
Column(
modifier = Modifier
.fillMaxWidth()
.weight(1f),
verticalArrangement = Arrangement.Center
) {
Row(
modifier = Modifier.fillMaxWidth(),
verticalAlignment = Alignment.Bottom,
horizontalArrangement = Arrangement.Start
) {
Text(
text = "์•„์ด๋””",
style = DoMaTypography.headlineSmall.copy(color = Color(0xFF9AD54A)),
)
Text(
text = "์™€",
style = DoMaTypography.headlineSmall.copy(color = Color(0xFFFAFAFA)),
)
Text(
text = " ๋น„๋ฐ€๋ฒˆํ˜ธ",
style = DoMaTypography.headlineSmall.copy(color = Color(0xFF9AD54A)),
)
Text(
text = "๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”!",
style = DoMaTypography.headlineSmall.copy(color = Color(0xFFFAFAFA)),
)
}
Spacer(modifier = Modifier.height(20.dp))
DoMaInputID(
modifier = Modifier
.fillMaxWidth()
)
Spacer(modifier = Modifier.height(12.dp))
DoMaInputPassword(
modifier = Modifier
.fillMaxWidth()
)
}
DoMaLoginButton(
onClick = leIsClickLoginButton,
modifier = Modifier
.fillMaxWidth()
.padding(bottom = 30.dp)
)
if (ClickButton) {
GAuthSigninWebView(
clientId = "ghskfend",
redirectUri = "ghskfen"
) { code ->
gAuthLogin(code)
}
}
}
}
fun SignInSubScreen(
modifier: Modifier = Modifier,
ClickButton: Boolean,
gAuthLogin: (String) -> Unit,
leIsClickLoginButton: () -> Unit,
loginState: LoginState,
errorMessage: String? = null,
) {
var showError by remember { mutableStateOf(false) }
LaunchedEffect(errorMessage) {
errorMessage?.let {
showError = true
}
}
Column(
modifier = modifier
.fillMaxSize()
.background(color = Color(0xFF1E1E1E))
.padding(horizontal = 20.dp),
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.CenterHorizontally
) {
if (showError) {
Text(
text = errorMessage ?: "๋กœ๊ทธ์ธ ์ค‘ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค.",
color = Color.Red,
modifier = Modifier.padding(bottom = 8.dp)
)
}
when (loginState) {
LoginState.Loading -> {
CircularProgressIndicator()
}
LoginState.Error -> {
// Error UI
}
else -> {
Column(
modifier = Modifier
.fillMaxWidth()
.weight(1f),
verticalArrangement = Arrangement.Center
) {
Row(
modifier = Modifier.fillMaxWidth(),
verticalAlignment = Alignment.Bottom,
horizontalArrangement = Arrangement.Start
) {
Text(
text = "์•„์ด๋””",
style = DoMaTypography.headlineSmall.copy(color = Color(0xFF9AD54A)),
)
Text(
text = "์™€",
style = DoMaTypography.headlineSmall.copy(color = Color(0xFFFAFAFA)),
)
Text(
text = " ๋น„๋ฐ€๋ฒˆํ˜ธ",
style = DoMaTypography.headlineSmall.copy(color = Color(0xFF9AD54A)),
)
Text(
text = "๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”!",
style = DoMaTypography.headlineSmall.copy(color = Color(0xFFFAFAFA)),
)
}
Spacer(modifier = Modifier.height(20.dp))
DoMaInputID(
modifier = Modifier
.fillMaxWidth()
)
Spacer(modifier = Modifier.height(12.dp))
DoMaInputPassword(
modifier = Modifier
.fillMaxWidth()
)
}
DoMaLoginButton(
onClick = leIsClickLoginButton,
modifier = Modifier
.fillMaxWidth()
.padding(bottom = 30.dp)
)
if (ClickButton) {
GAuthSigninWebView(
clientId = "ghskfend",
redirectUri = "ghskfen"
) { code ->
gAuthLogin(code)
}
}
}
}
}
}
enum class LoginState {
Idle,
Loading,
Success,
Error
}

Comment on lines 98 to 105
if (ClickButton) {
GAuthSigninWebView(
clientId = "ghskfend",
redirectUri = "ghskfen"
) { code ->
gAuthLogin(code)
}
}
Copy link

Choose a reason for hiding this comment

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

โš ๏ธ Potential issue

๋ณด์•ˆ ๊ฐ•ํ™”์™€ ์˜ค๋ฅ˜ ์ฒ˜๋ฆฌ๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

  • Google ์ธ์ฆ ์ •๋ณด๊ฐ€ ์ฝ”๋“œ์— ํ•˜๋“œ์ฝ”๋”ฉ๋˜์–ด ์žˆ์–ด ๋ณด์•ˆ์ƒ ์œ„ํ—˜ํ•ฉ๋‹ˆ๋‹ค.
  • ์ธ์ฆ ๊ณผ์ •์—์„œ ๋ฐœ์ƒํ•  ์ˆ˜ ์žˆ๋Š” ์˜ค๋ฅ˜ ์ฒ˜๋ฆฌ๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค.

๋‹ค์Œ๊ณผ ๊ฐ™์€ ๊ฐœ์„ ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค:

  1. ์ธ์ฆ ์ •๋ณด๋ฅผ BuildConfig๋‚˜ ํ™˜๊ฒฝ ๋ณ€์ˆ˜๋กœ ์ด๋™:
-    clientId = "ghskfend",
-    redirectUri = "ghskfen"
+    clientId = BuildConfig.GAUTH_CLIENT_ID,
+    redirectUri = BuildConfig.GAUTH_REDIRECT_URI
  1. ์˜ค๋ฅ˜ ์ฒ˜๋ฆฌ ์ถ”๊ฐ€:
 ) { code ->
-    gAuthLogin(code)
+    try {
+        gAuthLogin(code)
+    } catch (e: Exception) {
+        // ์˜ค๋ฅ˜ ์ฒ˜๋ฆฌ ๋กœ์ง ์ถ”๊ฐ€
+    }
 }
๐Ÿ“ 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
if (ClickButton) {
GAuthSigninWebView(
clientId = "ghskfend",
redirectUri = "ghskfen"
) { code ->
gAuthLogin(code)
}
}
if (ClickButton) {
GAuthSigninWebView(
clientId = BuildConfig.GAUTH_CLIENT_ID,
redirectUri = BuildConfig.GAUTH_REDIRECT_URI
) { code ->
try {
gAuthLogin(code)
} catch (e: Exception) {
// ์˜ค๋ฅ˜ ์ฒ˜๋ฆฌ ๋กœ์ง ์ถ”๊ฐ€
}
}
}

Comment on lines 20 to 25
fun SignInScreen(
modifier: Modifier = Modifier,
ClickButton: Boolean,
gAuthLogin: (String) -> Unit,
leIsClickLoginButton: () -> Unit,
) {
Copy link

Choose a reason for hiding this comment

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

๐Ÿ› ๏ธ Refactor suggestion

๋งค๊ฐœ๋ณ€์ˆ˜ ์ด๋ฆ„ ๊ทœ์น™๊ณผ ๋ฌธ์„œํ™” ๊ฐœ์„ ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

  • ClickButton ๋งค๊ฐœ๋ณ€์ˆ˜๋Š” Kotlin ๋ช…๋ช… ๊ทœ์น™์— ๋”ฐ๋ผ clickButton์œผ๋กœ ์ˆ˜์ •ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
  • ๊ฐ ๋งค๊ฐœ๋ณ€์ˆ˜์˜ ์šฉ๋„๋ฅผ ์„ค๋ช…ํ•˜๋Š” KDoc ๋ฌธ์„œํ™”๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ˆ˜์ •ํ•˜๋Š” ๊ฒƒ์„ ์ œ์•ˆํ•ฉ๋‹ˆ๋‹ค:

+/**
+ * ๋กœ๊ทธ์ธ ํ™”๋ฉด์„ ํ‘œ์‹œํ•˜๋Š” Composable ํ•จ์ˆ˜
+ *
+ * @param modifier ํ™”๋ฉด ๋ ˆ์ด์•„์›ƒ ์ˆ˜์ •์ž
+ * @param clickButton Google ์ธ์ฆ ์›น๋ทฐ ํ‘œ์‹œ ์—ฌ๋ถ€
+ * @param gAuthLogin Google ์ธ์ฆ ์™„๋ฃŒ ์‹œ ํ˜ธ์ถœ๋˜๋Š” ์ฝœ๋ฐฑ
+ * @param leIsClickLoginButton ๋กœ๊ทธ์ธ ๋ฒ„ํŠผ ํด๋ฆญ ์‹œ ํ˜ธ์ถœ๋˜๋Š” ์ฝœ๋ฐฑ
+ */
 @Composable
 fun SignInScreen(
     modifier: Modifier = Modifier,
-    ClickButton: Boolean,
+    clickButton: Boolean,
     gAuthLogin: (String) -> Unit,
     leIsClickLoginButton: () -> Unit,
 )
๐Ÿ“ 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
fun SignInScreen(
modifier: Modifier = Modifier,
ClickButton: Boolean,
gAuthLogin: (String) -> Unit,
leIsClickLoginButton: () -> Unit,
) {
/**
* ๋กœ๊ทธ์ธ ํ™”๋ฉด์„ ํ‘œ์‹œํ•˜๋Š” Composable ํ•จ์ˆ˜
*
* @param modifier ํ™”๋ฉด ๋ ˆ์ด์•„์›ƒ ์ˆ˜์ •์ž
* @param clickButton Google ์ธ์ฆ ์›น๋ทฐ ํ‘œ์‹œ ์—ฌ๋ถ€
* @param gAuthLogin Google ์ธ์ฆ ์™„๋ฃŒ ์‹œ ํ˜ธ์ถœ๋˜๋Š” ์ฝœ๋ฐฑ
* @param leIsClickLoginButton ๋กœ๊ทธ์ธ ๋ฒ„ํŠผ ํด๋ฆญ ์‹œ ํ˜ธ์ถœ๋˜๋Š” ์ฝœ๋ฐฑ
*/
@Composable
fun SignInScreen(
modifier: Modifier = Modifier,
clickButton: Boolean,
gAuthLogin: (String) -> Unit,
leIsClickLoginButton: () -> Unit,
) {
// Function body goes here...
}

) {
Text(
text = "์•„์ด๋””",
style = DoMaTypography.bodyMedium.copy(color = Color(0xFFFAFAFA))
Copy link
Collaborator

Choose a reason for hiding this comment

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

DoMaAndroidTheme ์„ ์‚ฌ์šฉํ•ด์ฃผ์„ธ์š”

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

๐Ÿงน Nitpick comments (2)
presentation/src/main/java/view/theme/color/ColorTheme.kt (1)

10-10: ์ƒ‰์ƒ ์ด๋ฆ„ ์ปจ๋ฒค์…˜ ๊ฐœ์„ ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

์ผ๊ด€์„ฑ์„ ์œ„ํ•ด ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ˆ˜์ •ํ•˜๋Š” ๊ฒƒ์„ ์ œ์•ˆํ•ฉ๋‹ˆ๋‹ค:

  • Green์€ ๋‹ค๋ฅธ ์ƒ‰์ƒ๋“ค๊ณผ ๊ฐ™์ด ๋ชจ๋‘ ๋Œ€๋ฌธ์ž๋กœ GREEN์œผ๋กœ ์ˆ˜์ •
  • Background๋Š” ์šฉ๋„๋ฅผ ๋‚˜ํƒ€๋‚ด๋Š” ์ด๋ฆ„์ด๋ฏ€๋กœ BACKGROUND๋กœ ์ˆ˜์ •
-    abstract val Green: Color
+    abstract val GREEN: Color
-    abstract val Background: Color
+    abstract val BACKGROUND: Color

Also applies to: 21-21

presentation/src/main/java/view/theme/color/DoMaColor.kt (1)

10-10: ์ƒ‰์ƒ ์ด๋ฆ„ ์ปจ๋ฒค์…˜ ๊ฐœ์„ ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

ColorTheme ํด๋ž˜์Šค์˜ ๋ณ€๊ฒฝ์‚ฌํ•ญ๊ณผ ์ผ๊ด€๋˜๊ฒŒ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ˆ˜์ •ํ•˜๋Š” ๊ฒƒ์„ ์ œ์•ˆํ•ฉ๋‹ˆ๋‹ค:

-    override val Green = Color(0xFF9AD54A)
+    override val GREEN = Color(0xFF9AD54A)
-    override val Background = Color(0xFF1E1E1E)
+    override val BACKGROUND = Color(0xFF1E1E1E)

Also applies to: 20-20

๐Ÿ“œ Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

๐Ÿ“ฅ Commits

Reviewing files that changed from the base of the PR and between fa249a3 and 5385138.

โ›” Files ignored due to path filters (2)
  • buildSrc/build/kotlin/compileKotlin/cacheable/last-build.bin is excluded by !**/*.bin
  • buildSrc/build/kotlin/compileKotlin/local-state/build-history.bin is excluded by !**/*.bin
๐Ÿ“’ Files selected for processing (8)
  • presentation/src/main/java/view/signin/component/DoMaInputID.kt (1 hunks)
  • presentation/src/main/java/view/signin/component/DoMaInputPassword.kt (1 hunks)
  • presentation/src/main/java/view/signin/component/DoMaLoginButton.kt (1 hunks)
  • presentation/src/main/java/view/signin/screen/SignInScreen.kt (1 hunks)
  • presentation/src/main/java/view/signin/screen/SignInSubScreen.kt (1 hunks)
  • presentation/src/main/java/view/theme/DomaAndroidTheme.kt (1 hunks)
  • presentation/src/main/java/view/theme/color/ColorTheme.kt (2 hunks)
  • presentation/src/main/java/view/theme/color/DoMaColor.kt (2 hunks)
๐Ÿšง Files skipped from review as they are similar to previous changes (4)
  • presentation/src/main/java/view/signin/component/DoMaInputPassword.kt
  • presentation/src/main/java/view/signin/component/DoMaLoginButton.kt
  • presentation/src/main/java/view/signin/component/DoMaInputID.kt
  • presentation/src/main/java/view/signin/screen/SignInSubScreen.kt
๐Ÿ”‡ Additional comments (3)
presentation/src/main/java/view/theme/DomaAndroidTheme.kt (1)

11-12: ํƒ€์ดํฌ๊ทธ๋ž˜ํ”ผ ์ถ”๊ฐ€๊ฐ€ ์ž˜ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค!

Material Design 3์˜ ๊ถŒ์žฅ์‚ฌํ•ญ์— ๋”ฐ๋ผ ํƒ€์ดํฌ๊ทธ๋ž˜ํ”ผ๋ฅผ ํ…Œ๋งˆ์— ํ†ตํ•ฉํ•œ ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค.

presentation/src/main/java/view/signin/screen/SignInScreen.kt (2)

21-26: ๋งค๊ฐœ๋ณ€์ˆ˜ ์ด๋ฆ„ ๊ทœ์น™๊ณผ ๋ฌธ์„œํ™” ๊ฐœ์„ ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

์ด์ „ ๋ฆฌ๋ทฐ ์˜๊ฒฌ๊ณผ ๋™์ผํ•œ ์ด์Šˆ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.


96-101: ๋ณด์•ˆ ๊ฐ•ํ™”์™€ ์˜ค๋ฅ˜ ์ฒ˜๋ฆฌ๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

์ด์ „ ๋ฆฌ๋ทฐ ์˜๊ฒฌ๊ณผ ๋™์ผํ•œ ์ด์Šˆ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.

Comment on lines +42 to +49
Text(
text = "์•ˆ๋…•ํ•˜์„ธ์š”!",
style = DoMaTypography.headlineSmall.copy(color = colors.WHITE),
)
Text(
text = "๋กœ๊ทธ์ธ์„ ํ•ด๋ณผ๊นŒ์š”?",
style = DoMaTypography.headlineSmall.copy(color = colors.Green),
)
Copy link

Choose a reason for hiding this comment

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

๐Ÿ› ๏ธ Refactor suggestion

์ ‘๊ทผ์„ฑ ๋ ˆ์ด๋ธ” ์ถ”๊ฐ€๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

์Šคํฌ๋ฆฐ ๋ฆฌ๋” ์‚ฌ์šฉ์ž๋ฅผ ์œ„ํ•ด ๋ชจ๋“  ํ…์ŠคํŠธ ์š”์†Œ์— contentDescription์„ ์ถ”๊ฐ€ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

 Text(
     text = "์•ˆ๋…•ํ•˜์„ธ์š”!",
+    modifier = Modifier.semantics { contentDescription = "ํ™˜์˜ ๋ฉ”์‹œ์ง€" },
     style = DoMaTypography.headlineSmall.copy(color = colors.WHITE),
 )

Also applies to: 65-76, 88-92

Comment on lines 65 to 76
Text(
text = "์•„์ด๋”” ์ฐพ๊ธฐ",
style = DoMaTypography.labelLarge.copy(color = colors.WHITE),
)
Text(
text = "|",
style = DoMaTypography.labelLarge.copy(color = colors.WHITE),
)
Text(
text = "๋น„๋ฐ€๋ฒˆํ˜ธ ์ฐพ๊ธฐ",
style = DoMaTypography.labelLarge.copy(color = colors.WHITE),
)
Copy link

Choose a reason for hiding this comment

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

๐Ÿ› ๏ธ Refactor suggestion

ํด๋ฆญ ๊ฐ€๋Šฅํ•œ ํ…์ŠคํŠธ์— ๋Œ€ํ•œ ์ƒํ˜ธ์ž‘์šฉ ์ฒ˜๋ฆฌ๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

'์•„์ด๋”” ์ฐพ๊ธฐ'์™€ '๋น„๋ฐ€๋ฒˆํ˜ธ ์ฐพ๊ธฐ' ํ…์ŠคํŠธ๋Š” ํด๋ฆญ ๊ฐ€๋Šฅํ•ด์•ผ ํ•˜๋ฉฐ, ์ ์ ˆํ•œ ํ”ผ๋“œ๋ฐฑ์„ ์ œ๊ณตํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

+import androidx.compose.foundation.clickable
+import androidx.compose.material.ripple.rememberRipple

 Text(
     text = "์•„์ด๋”” ์ฐพ๊ธฐ",
+    modifier = Modifier
+        .clickable(
+            interactionSource = remember { MutableInteractionSource() },
+            indication = rememberRipple(),
+            onClick = { /* TODO: ์•„์ด๋”” ์ฐพ๊ธฐ ์ฒ˜๋ฆฌ */ }
+        ),
     style = DoMaTypography.labelLarge.copy(color = colors.WHITE),
 )

Committable suggestion skipped: line range outside the PR's diff.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

โ™ป๏ธ Duplicate comments (2)
presentation/src/main/java/view/signin/screen/SignInScreen.kt (2)

92-99: โš ๏ธ Potential issue

๋ณด์•ˆ ์ทจ์•ฝ์ : ์ธ์ฆ ์ •๋ณด๊ฐ€ ํ•˜๋“œ์ฝ”๋”ฉ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.

  1. ํด๋ผ์ด์–ธํŠธ ID์™€ ๋ฆฌ๋‹ค์ด๋ ‰ํŠธ URI๋ฅผ ํ™˜๊ฒฝ ๋ณ€์ˆ˜๋‚˜ BuildConfig๋กœ ์ด๋™ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
  2. ์ธ์ฆ ๊ณผ์ •์˜ ์˜ค๋ฅ˜ ์ฒ˜๋ฆฌ๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

62-73: ๐Ÿ› ๏ธ Refactor suggestion

ID/๋น„๋ฐ€๋ฒˆํ˜ธ ์ฐพ๊ธฐ ๊ธฐ๋Šฅ ๊ตฌํ˜„์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

  1. ํ…์ŠคํŠธ์— ํด๋ฆญ ์ด๋ฒคํŠธ ์ฒ˜๋ฆฌ๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.
  2. ์š”์†Œ๋“ค ์‚ฌ์ด์˜ ๊ฐ„๊ฒฉ ์กฐ์ •์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.
+Row(
+    horizontalArrangement = Arrangement.spacedBy(8.dp),
+    modifier = Modifier.clickable { /* TODO: ID ์ฐพ๊ธฐ ์ฒ˜๋ฆฌ */ }
+) {
     Text(
         text = "์•„์ด๋”” ์ฐพ๊ธฐ",
+        modifier = Modifier.semantics { 
+            contentDescription = "์•„์ด๋”” ์ฐพ๊ธฐ ๋ฒ„ํŠผ"
+        },
         style = DoMaTypography.labelLarge.copy(color = colors.WHITE),
     )
 }
๐Ÿงน Nitpick comments (2)
presentation/src/main/java/view/signin/screen/SignInScreen.kt (2)

39-46: ์ ‘๊ทผ์„ฑ ๋ ˆ์ด๋ธ”๊ณผ ํ…์ŠคํŠธ ์Šคํƒ€์ผ ๊ฐœ์„ ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

  1. ์Šคํฌ๋ฆฐ ๋ฆฌ๋” ์‚ฌ์šฉ์ž๋ฅผ ์œ„ํ•œ ์ ‘๊ทผ์„ฑ ๋ ˆ์ด๋ธ” ์ถ”๊ฐ€๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.
  2. ํ…์ŠคํŠธ ์Šคํƒ€์ผ์„ ์ƒ์ˆ˜๋กœ ๋ถ„๋ฆฌํ•˜์—ฌ ์žฌ์‚ฌ์šฉ์„ฑ์„ ๋†’์ด๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค.
+val WelcomeTextStyle = DoMaTypography.headlineSmall
 Text(
     text = "์•ˆ๋…•ํ•˜์„ธ์š”!",
+    modifier = Modifier.semantics { 
+        contentDescription = "ํ™˜์˜ ์ธ์‚ฌ๋ง" 
+    },
-    style = DoMaTypography.headlineSmall.copy(color = colors.WHITE),
+    style = WelcomeTextStyle.copy(color = colors.WHITE),
 )

104-112: ํ”„๋ฆฌ๋ทฐ ํ•จ์ˆ˜ ๊ฐœ์„ ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

๋‹ค์–‘ํ•œ ์ƒํƒœ์˜ ํ”„๋ฆฌ๋ทฐ๋ฅผ ์ถ”๊ฐ€ํ•˜์—ฌ UI ํ…Œ์ŠคํŠธ๋ฅผ ์šฉ์ดํ•˜๊ฒŒ ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

 @Preview
 @Composable
-fun PreviewSignInScreen() {
+fun SignInScreenPreviews() {
+    Column {
+        // ๊ธฐ๋ณธ ์ƒํƒœ
+        SignInScreen(
+            ClickButton = false,
+            gAuthLogin = {},
+            leIsClickLoginButton = {}
+        )
+        
+        // ๋กœ๊ทธ์ธ ์ง„ํ–‰ ์ค‘ ์ƒํƒœ
+        SignInScreen(
+            ClickButton = true,
+            gAuthLogin = {},
+            leIsClickLoginButton = {}
+        )
+    }
 }
๐Ÿ“œ Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

๐Ÿ“ฅ Commits

Reviewing files that changed from the base of the PR and between 5385138 and c681066.

๐Ÿ“’ Files selected for processing (2)
  • presentation/src/main/java/view/signin/screen/SignInScreen.kt (1 hunks)
  • presentation/src/main/java/view/signin/screen/SignInSubScreen.kt (1 hunks)
๐Ÿšง Files skipped from review as they are similar to previous changes (1)
  • presentation/src/main/java/view/signin/screen/SignInSubScreen.kt
๐Ÿ”‡ Additional comments (1)
presentation/src/main/java/view/signin/screen/SignInScreen.kt (1)

17-23: ๋งค๊ฐœ๋ณ€์ˆ˜ ๋ช…๋ช… ๊ทœ์น™์„ ์ค€์ˆ˜ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

ClickButton ๋งค๊ฐœ๋ณ€์ˆ˜๋Š” Kotlin ๋ช…๋ช… ๊ทœ์น™์— ๋”ฐ๋ผ ์นด๋ฉœ ์ผ€์ด์Šค๋กœ ์ž‘์„ฑ๋˜์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

Comment on lines 85 to 89
Text(
text = "์•„์ง ํ•จ๊ป˜ํ•˜์ง€ ๋ชปํ–ˆ๋‹ค๋ฉด? ํšŒ์›๊ฐ€์ž… ํ•˜๊ธฐ",
style = DoMaTypography.labelLarge.copy(color = colors.WHITE),
textAlign = TextAlign.Center
)
Copy link

Choose a reason for hiding this comment

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

๐Ÿ› ๏ธ Refactor suggestion

ํšŒ์›๊ฐ€์ž… ๋งํฌ ๊ธฐ๋Šฅ ๊ตฌํ˜„์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

ํšŒ์›๊ฐ€์ž… ํ…์ŠคํŠธ๋ฅผ ํด๋ฆญ ๊ฐ€๋Šฅํ•œ ๋งํฌ๋กœ ๊ตฌํ˜„ํ•˜๊ณ , ์‹œ๊ฐ์  ํ”ผ๋“œ๋ฐฑ์„ ์ถ”๊ฐ€ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

+Text(
+    text = "์•„์ง ํ•จ๊ป˜ํ•˜์ง€ ๋ชปํ–ˆ๋‹ค๋ฉด? ",
+    style = DoMaTypography.labelLarge.copy(color = colors.WHITE),
+)
 Text(
-    text = "์•„์ง ํ•จ๊ป˜ํ•˜์ง€ ๋ชปํ–ˆ๋‹ค๋ฉด? ํšŒ์›๊ฐ€์ž… ํ•˜๊ธฐ",
+    text = "ํšŒ์›๊ฐ€์ž… ํ•˜๊ธฐ",
+    modifier = Modifier
+        .clickable { /* TODO: ํšŒ์›๊ฐ€์ž… ํ™”๋ฉด์œผ๋กœ ์ด๋™ */ }
+        .semantics { contentDescription = "ํšŒ์›๊ฐ€์ž… ํŽ˜์ด์ง€๋กœ ์ด๋™" },
     style = DoMaTypography.labelLarge.copy(color = colors.WHITE),
     textAlign = TextAlign.Center
 )
๐Ÿ“ 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
Text(
text = "์•„์ง ํ•จ๊ป˜ํ•˜์ง€ ๋ชปํ–ˆ๋‹ค๋ฉด? ํšŒ์›๊ฐ€์ž… ํ•˜๊ธฐ",
style = DoMaTypography.labelLarge.copy(color = colors.WHITE),
textAlign = TextAlign.Center
)
Text(
text = "์•„์ง ํ•จ๊ป˜ํ•˜์ง€ ๋ชปํ–ˆ๋‹ค๋ฉด? ",
style = DoMaTypography.labelLarge.copy(color = colors.WHITE),
)
Text(
text = "ํšŒ์›๊ฐ€์ž… ํ•˜๊ธฐ",
modifier = Modifier
.clickable { /* TODO: ํšŒ์›๊ฐ€์ž… ํ™”๋ฉด์œผ๋กœ ์ด๋™ */ }
.semantics { contentDescription = "ํšŒ์›๊ฐ€์ž… ํŽ˜์ด์ง€๋กœ ์ด๋™" },
style = DoMaTypography.labelLarge.copy(color = colors.WHITE),
textAlign = TextAlign.Center
)

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

๐Ÿ”ญ Outside diff range comments (2)
presentation/src/main/java/view/Mypage/component/MyClean.kt (2)

37-38: โš ๏ธ Potential issue

ํŒŒ์ดํ”„๋ผ์ธ ์˜ค๋ฅ˜๋ฅผ ์ˆ˜์ •ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

UsersUiState.Fail ์ผ€์ด์Šค์—์„œ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์ปดํŒŒ์ผ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค:

  • exception ์ฐธ์กฐ๋ฅผ ์ฐพ์„ ์ˆ˜ ์—†์Œ
  • error ์ฐธ์กฐ๋ฅผ ์ฐพ์„ ์ˆ˜ ์—†์Œ

๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ˆ˜์ •ํ•˜๋Š” ๊ฒƒ์„ ์ œ์•ˆํ•ฉ๋‹ˆ๋‹ค:

- onErrorToast(usersUiState.exception, R.string.error)
+ onErrorToast(usersUiState.throwable, R.string.common_error)
๐Ÿงฐ Tools
๐Ÿช› GitHub Actions: Android CI

[error] 37-39: Unresolved reference: exception


[error] 37-59: Unresolved reference: error


[error] 44-24: Type mismatch: inferred type is ImmutableList but UsersResponseModel was expected


44-45: โš ๏ธ Potential issue

ํƒ€์ž… ๋ถˆ์ผ์น˜ ์˜ค๋ฅ˜๋ฅผ ์ˆ˜์ •ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

data ๋งค๊ฐœ๋ณ€์ˆ˜์˜ ํƒ€์ž…์ด UsersResponseModel์ด์–ด์•ผ ํ•˜๋Š”๋ฐ ImmutableList<UsersResponseModel>๊ฐ€ ์ „๋‹ฌ๋˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.

๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ˆ˜์ •ํ•˜๋Š” ๊ฒƒ์„ ์ œ์•ˆํ•ฉ๋‹ˆ๋‹ค:

- data = data
+ data = data.first() // ๋ฆฌ์ŠคํŠธ์˜ ์ฒซ ๋ฒˆ์งธ ํ•ญ๋ชฉ์„ ์‚ฌ์šฉํ•˜๊ฑฐ๋‚˜
+ data = data[0]      // ์ธ๋ฑ์Šค๋กœ ์ ‘๊ทผ

๋˜๋Š” UsersResponseModel ํƒ€์ž…์„ ๋ฆฌ์ŠคํŠธ ํƒ€์ž…์œผ๋กœ ๋ณ€๊ฒฝํ•˜์—ฌ ์ˆ˜์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๐Ÿงฐ Tools
๐Ÿช› GitHub Actions: Android CI

[error] 44-24: Type mismatch: inferred type is ImmutableList but UsersResponseModel was expected


[error] 121-40: Unresolved reference: roomNum

โ™ป๏ธ Duplicate comments (2)
presentation/src/main/java/view/signin/screen/SignInScreen.kt (2)

122-127: โš ๏ธ Potential issue

๋ณด์•ˆ ์ทจ์•ฝ์ : ํ•˜๋“œ์ฝ”๋”ฉ๋œ ์ธ์ฆ ์ •๋ณด

Google ์ธ์ฆ ์ •๋ณด๊ฐ€ ์ฝ”๋“œ์— ์ง์ ‘ ํ•˜๋“œ์ฝ”๋”ฉ๋˜์–ด ์žˆ์–ด ๋ณด์•ˆ์ƒ ์œ„ํ—˜ํ•ฉ๋‹ˆ๋‹ค.

๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ˆ˜์ •ํ•˜๋Š” ๊ฒƒ์„ ์ œ์•ˆํ•ฉ๋‹ˆ๋‹ค:

 GAuthSigninWebView(
-    clientId = "ghskfend",
-    redirectUri = "ghskfen"
+    clientId = BuildConfig.GAUTH_CLIENT_ID,
+    redirectUri = BuildConfig.GAUTH_REDIRECT_URI
 ) { code ->
-    gAuthLogin(code)
+    try {
+        gAuthLogin(code)
+    } catch (e: Exception) {
+        // ์˜ค๋ฅ˜ ์ฒ˜๋ฆฌ ๋กœ์ง ์ถ”๊ฐ€
+    }
 }

45-52: ๐Ÿ› ๏ธ Refactor suggestion

์ ‘๊ทผ์„ฑ ๋ ˆ์ด๋ธ”์ด ๋ˆ„๋ฝ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

์Šคํฌ๋ฆฐ ๋ฆฌ๋” ์‚ฌ์šฉ์ž๋ฅผ ์œ„ํ•œ ์ ‘๊ทผ์„ฑ ๋ ˆ์ด๋ธ”์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ˆ˜์ •ํ•˜๋Š” ๊ฒƒ์„ ์ œ์•ˆํ•ฉ๋‹ˆ๋‹ค:

 Text(
     text = "์•ˆ๋…•ํ•˜์„ธ์š”!",
+    modifier = Modifier.semantics { contentDescription = "ํ™˜์˜ ์ธ์‚ฌ๋ง" },
     style = DoMaTypography.headlineSmall.copy(color = colors.WHITE),
 )
 Text(
     text = "๋กœ๊ทธ์ธ์„ ํ•ด๋ณผ๊นŒ์š”?",
+    modifier = Modifier.semantics { contentDescription = "๋กœ๊ทธ์ธ ์•ˆ๋‚ด ๋ฉ”์‹œ์ง€" },
     style = DoMaTypography.headlineSmall.copy(color = colors.Green),
 )
๐Ÿงน Nitpick comments (1)
presentation/src/main/java/view/signin/screen/SignInScreen.kt (1)

74-75: TODO ์ฃผ์„ ๊ตฌํ˜„์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

์—ฌ๋Ÿฌ ๊ธฐ๋Šฅ์— ๋Œ€ํ•œ TODO ์ฃผ์„์ด ๋‚จ์•„์žˆ์Šต๋‹ˆ๋‹ค:

  • ์•„์ด๋”” ์ฐพ๊ธฐ
  • ๋น„๋ฐ€๋ฒˆํ˜ธ ์ฐพ๊ธฐ
  • ํšŒ์›๊ฐ€์ž… ํ™”๋ฉด ์ด๋™

์ด๋Ÿฌํ•œ ๊ธฐ๋Šฅ๋“ค์˜ ๊ตฌํ˜„์„ ๋„์™€๋“œ๋ฆด ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ƒˆ๋กœ์šด ์ด์Šˆ๋ฅผ ์ƒ์„ฑํ•˜์—ฌ ๊ฐ ๊ธฐ๋Šฅ์˜ ๊ตฌํ˜„์„ ์ถ”์ ํ•˜์‹œ๊ฒ ์Šต๋‹ˆ๊นŒ?

Also applies to: 88-89, 114-115

๐Ÿ“œ Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

๐Ÿ“ฅ Commits

Reviewing files that changed from the base of the PR and between c681066 and 22140b6.

โ›” Files ignored due to path filters (24)
  • buildSrc/build/classes/kotlin/main/Dependency$AndroidX.class is excluded by !**/*.class
  • buildSrc/build/classes/kotlin/main/Dependency$Coil.class is excluded by !**/*.class
  • buildSrc/build/classes/kotlin/main/Dependency$Compose.class is excluded by !**/*.class
  • buildSrc/build/classes/kotlin/main/Dependency$DataStore.class is excluded by !**/*.class
  • buildSrc/build/classes/kotlin/main/Dependency$Gauth.class is excluded by !**/*.class
  • buildSrc/build/classes/kotlin/main/Dependency$Google.class is excluded by !**/*.class
  • buildSrc/build/classes/kotlin/main/Dependency$Gradle.class is excluded by !**/*.class
  • buildSrc/build/classes/kotlin/main/Dependency$Hilt.class is excluded by !**/*.class
  • buildSrc/build/classes/kotlin/main/Dependency$Moshi.class is excluded by !**/*.class
  • buildSrc/build/classes/kotlin/main/Dependency$OkHttp.class is excluded by !**/*.class
  • buildSrc/build/classes/kotlin/main/Dependency$Retrofit.class is excluded by !**/*.class
  • buildSrc/build/classes/kotlin/main/Dependency$Test.class is excluded by !**/*.class
  • buildSrc/build/classes/kotlin/main/Dependency.class is excluded by !**/*.class
  • buildSrc/build/classes/kotlin/main/ProjectProperties$Files.class is excluded by !**/*.class
  • buildSrc/build/classes/kotlin/main/ProjectProperties$Id.class is excluded by !**/*.class
  • buildSrc/build/classes/kotlin/main/ProjectProperties$NameSpace.class is excluded by !**/*.class
  • buildSrc/build/classes/kotlin/main/ProjectProperties$Test.class is excluded by !**/*.class
  • buildSrc/build/classes/kotlin/main/ProjectProperties$Versions.class is excluded by !**/*.class
  • buildSrc/build/classes/kotlin/main/ProjectProperties.class is excluded by !**/*.class
  • buildSrc/build/classes/kotlin/main/Versions.class is excluded by !**/*.class
  • buildSrc/build/kotlin/compileKotlin/cacheable/last-build.bin is excluded by !**/*.bin
  • buildSrc/build/kotlin/compileKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin is excluded by !**/*.bin
  • buildSrc/build/kotlin/compileKotlin/local-state/build-history.bin is excluded by !**/*.bin
  • buildSrc/build/libs/buildSrc.jar is excluded by !**/*.jar
๐Ÿ“’ Files selected for processing (5)
  • .idea/other.xml (2 hunks)
  • buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/counters.tab (0 hunks)
  • presentation/src/main/java/view/Mypage/component/MyClean.kt (5 hunks)
  • presentation/src/main/java/view/signin/screen/SignInScreen.kt (1 hunks)
  • presentation/src/main/java/view/signin/screen/SignInSubScreen.kt (1 hunks)
๐Ÿ’ค Files with no reviewable changes (1)
  • buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/counters.tab
๐Ÿšง Files skipped from review as they are similar to previous changes (1)
  • presentation/src/main/java/view/signin/screen/SignInSubScreen.kt
๐Ÿงฐ Additional context used
๐Ÿช› GitHub Actions: Android CI
presentation/src/main/java/view/Mypage/component/MyClean.kt

[error] 37-39: Unresolved reference: exception


[error] 37-59: Unresolved reference: error


[error] 44-24: Type mismatch: inferred type is ImmutableList but UsersResponseModel was expected


[error] 121-40: Unresolved reference: roomNum

๐Ÿ”‡ Additional comments (3)
.idea/other.xml (2)

61-71: ์ƒˆ๋กœ์šด ์‚ผ์„ฑ A35 ๊ธฐ๊ธฐ ์ •๋ณด ์ถ”๊ฐ€ ํ™•์ธ ์š”์ฒญ:

์ด ๋ธ”๋ก์€ ์ƒˆ๋กœ์šด ์‚ผ์„ฑ A35 ๊ธฐ๊ธฐ์˜ ์ •๋ณด๋ฅผ ์ถ”๊ฐ€ํ•œ ๋ถ€๋ถ„์ž…๋‹ˆ๋‹ค.
๊ฐ ์˜ต์…˜ ๊ฐ’(์˜ˆ: API, ๋ธŒ๋žœ๋“œ, codename, id, ์ œ์กฐ์‚ฌ, ๊ธฐ๊ธฐ๋ช…, screenDensity, screenX, screenY)์ด ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ์ž…๋ ฅ๋˜์—ˆ๋Š”์ง€ ํ™•์ธํ•ด ์ฃผ์„ธ์š”. ํŠนํžˆ, codename์ด "a35x"๋กœ ์„ค์ •๋œ ์ ์ด ํ”„๋กœ์ ํŠธ์˜ ๊ธฐ์กด ๋ช…๋ช… ๊ทœ์น™๊ณผ ์ผ๊ด€๋˜๋Š”์ง€ ๊ฒ€ํ†  ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค.


425-435: ์ƒˆ๋กœ์šด ๊ฐค๋Ÿญ์‹œ S21 Plus ๊ธฐ๊ธฐ ์ •๋ณด ์ถ”๊ฐ€ ๊ฒ€์ฆ ์š”์ฒญ:

์ด ๋ธ”๋ก์€ ๊ฐค๋Ÿญ์‹œ S21 Plus ๊ธฐ๊ธฐ์˜ ์ •๋ณด๋ฅผ ์ถ”๊ฐ€ํ•œ ๋ถ€๋ถ„์ž…๋‹ˆ๋‹ค.
ํŠนํžˆ, screenDensity ๊ฐ’์ด "394"๋กœ ์„ค์ •๋œ ๊ฒƒ์ด ์˜๋„ํ•œ ๊ฐ’์ธ์ง€ ํ™•์ธํ•ด ์ฃผ์‹œ๊ณ , ๋‹ค๋ฅธ ์˜ต์…˜๋“ค(brand, codename, id, manufacturer, name, screenX, screenY) ์—ญ์‹œ ํŒ€์˜ ๋ช…๋ช… ๊ทœ์น™๊ณผ ๋ฐ์ดํ„ฐ ์ผ๊ด€์„ฑ ์ธก๋ฉด์—์„œ ์ ์ ˆํ•œ์ง€ ๊ฒ€ํ†  ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค.

presentation/src/main/java/view/Mypage/component/MyClean.kt (1)

84-85: ์ƒ‰์ƒ ํ…Œ๋งˆ ๋ณ€๊ฒฝ์— ๋Œ€ํ•œ ๊ฒ€ํ† ๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

์—ฌ๋Ÿฌ Text ์ปดํฌ๋„ŒํŠธ์—์„œ colors.GRAY์—์„œ colors.Green์œผ๋กœ ์ƒ‰์ƒ์ด ๋ณ€๊ฒฝ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์ด๋Š” ์‹œ๊ฐ์  ์ผ๊ด€์„ฑ๊ณผ ์ ‘๊ทผ์„ฑ์— ์˜ํ–ฅ์„ ๋ฏธ์น  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋‹ค์Œ ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์‹คํ–‰ํ•˜์—ฌ ์ƒ‰์ƒ ๋Œ€๋น„๋ฅผ ํ™•์ธํ•˜์„ธ์š”:

#!/usr/bin/python3
from colorsys import rgb_to_hls

def check_contrast(color_hex):
    # 0xFF9AD54A to RGB
    r = int(color_hex[4:6], 16) / 255.0
    g = int(color_hex[6:8], 16) / 255.0
    b = int(color_hex[2:4], 16) / 255.0
    
    # Convert to HLS
    h, l, s = rgb_to_hls(r, g, b)
    
    # Check lightness for readability
    if l < 0.5:
        print(f"Warning: Color {color_hex} might be too dark for good readability")
    
    print(f"Lightness value: {l:.2f}")

# Check the new green color
check_contrast("0xFF9AD54A")

Also applies to: 126-127, 156-157, 186-187, 216-217

๐Ÿงฐ Tools
๐Ÿช› GitHub Actions: Android CI

[error] 121-40: Unresolved reference: roomNum

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants