Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat ::102] 신청 퍼블리싱 #103

Merged
merged 4 commits into from
Jan 18, 2025

Conversation

parkuiery
Copy link
Member

@parkuiery parkuiery commented Jan 18, 2025

개요

신청 화면을 퍼블리싱 하였습니다.

작업사항

  • 신청 화면 퍼블리싱

추가 로 할 말

Summary by CodeRabbit

  • 새로운 기능

    • 버튼 상태에 따른 색상 디자인 개선
    • 애플리케이션 화면의 새로운 레이아웃 구조 추가
    • 애플리케이션 카드 컴포넌트 도입으로 사용자 인터랙션 개선
  • UI 개선

    • 버튼 상태별 색상 피드백 강화
    • 애플리케이션 화면의 레이아웃 및 디자인 리뉴얼

@parkuiery parkuiery added the feat 새로운 기능을 추가 할 경우 label Jan 18, 2025
@parkuiery parkuiery self-assigned this Jan 18, 2025
@parkuiery parkuiery linked an issue Jan 18, 2025 that may be closed by this pull request
1 task
Copy link
Contributor

coderabbitai bot commented Jan 18, 2025

Warning

Rate limit exceeded

@parkuiery has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 24 minutes and 26 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 2482c0e and ac6754d.

📒 Files selected for processing (1)
  • feature/application/src/commonMain/kotlin/team/aliens/dms/kmp/feature/application/ui/ApplicationScreen.kt (2 hunks)

변경 사항 분석

개요

이 풀 리퀘스트는 디자인 시스템의 버튼 컴포넌트와 애플리케이션 화면의 UI 구조를 개선하는 변경 사항을 포함하고 있습니다. 주요 수정 사항은 버튼의 색상 상태 관리와 애플리케이션 화면의 레이아웃 구조 재설계에 집중되어 있습니다.

변경 내용

파일 변경 요약
core/design-system/.../DmsButton.kt 버튼 상태별 색상 할당 로직 세부 조정
feature/application/.../ApplicationScreen.kt 애플리케이션 화면 레이아웃을 정적 텍스트에서 인터랙티브한 카드 기반 레이아웃으로 변경

관련 가능한 풀 리퀘스트

제안된 레이블

refactor

토끼의 시 🐰

버튼의 색깔 춤추고
화면은 카드로 피어나네
코드의 봄이 오네요
🌈✨ 리팩토링의 노래 🎵


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
Contributor

@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: 3

🧹 Nitpick comments (1)
feature/application/src/commonMain/kotlin/team/aliens/dms/kmp/feature/application/ui/ApplicationScreen.kt (1)

67-135: 접근성 개선 제안

ApplicationCard 컴포넌트의 접근성을 개선하기 위해 다음 사항들을 고려해 주세요:

  1. 버튼에 적절한 설명을 제공하는 contentDescription 추가
  2. 카드 전체를 의미 있는 그룹으로 묶기 위한 semantics 수정자 추가
 DmsButton(
     modifier = Modifier.fillMaxWidth(),
     text = buttonText,
     buttonType = ButtonType.Contained,
     buttonColor = ButtonColor.Primary,
+    contentDescription = "$title ${buttonText}",
     onClick = onButtonClick,
 )
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 2401434 and 68744b8.

📒 Files selected for processing (2)
  • core/design-system/src/commonMain/kotlin/team/aliens/dms/kmp/core/designsystem/button/DmsButton.kt (7 hunks)
  • feature/application/src/commonMain/kotlin/team/aliens/dms/kmp/feature/application/ui/ApplicationScreen.kt (2 hunks)
🧰 Additional context used
🪛 GitHub Actions: Kotlin Multiplatform CI
feature/application/src/commonMain/kotlin/team/aliens/dms/kmp/feature/application/ui/ApplicationScreen.kt

[error] 13-13: Unused import detected. This can be auto-corrected using 'ktlint --format'

🔇 Additional comments (1)
core/design-system/src/commonMain/kotlin/team/aliens/dms/kmp/core/designsystem/button/DmsButton.kt (1)

Line range hint 218-311: 색상 변경에 대한 문서화 필요

버튼 상태별 색상 변경에 대한 설명이 필요합니다. 다음 사항들을 문서화해 주세요:

  1. 각 색상 변경의 목적
  2. 디자인 시스템과의 연관성
  3. 접근성 관점에서의 고려사항

특히 다음 변경사항들에 대한 설명이 필요합니다:

  • Primary 버튼의 pressed/disabled 상태 색상 변경
  • Gray 버튼의 배경색 조정
  • Error/Refuse 버튼의 상태별 색상 대비
✅ Verification successful

색상 변경이 Material Design 3 가이드라인을 준수하고 있습니다

버튼 컴포넌트의 색상 변경사항이 다음과 같이 체계적으로 구현되어 있습니다:

  • Material Design 3의 색상 토큰 시스템을 일관되게 활용
  • 상태별(enabled, pressed, disabled) 색상이 시맨틱하게 적용
  • 라이트/다크 테마 모두 지원

별도의 문서화가 없어도 Material Design 3의 표준을 따르고 있어 디자인 의도가 명확합니다.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# 색상 대비율 검증
# Note: 실제 환경에서는 색상 대비 검사 도구를 사용해야 합니다
echo "다음 색상 쌍의 대비율을 확인해주세요:"
echo "1. Primary pressed: secondaryContainer vs inversePrimary"
echo "2. Error disabled: error vs onError"
echo "3. Refuse disabled: onError vs error"

Length of output: 339


Script:

#!/bin/bash
# Search for design system documentation
echo "=== Searching for design system docs ==="
fd -e md -e mdx . core/design-system

# Search for color definitions
echo -e "\n=== Searching for color definitions ==="
rg -l "DmsTheme.colors" core/design-system

# Search for accessibility guidelines
echo -e "\n=== Searching for accessibility docs ==="
rg -i "accessibility|a11y|contrast" -g "*.{md,mdx,kt}" core/design-system

Length of output: 1670


Script:

#!/bin/bash
# Search for theme implementation
echo "=== Searching for DmsTheme implementation ==="
rg -A 5 "object DmsTheme" core/design-system

# Search for color definitions
echo -e "\n=== Searching for color type definitions ==="
ast-grep --pattern 'class Colors {
  $$$
}'

# Check for any comments about colors
echo -e "\n=== Searching for color-related comments ==="
rg -i "color.*scheme|theme.*color" core/design-system

Length of output: 22562

Comment on lines 32 to 64
private fun ApplicationScreen() {
Text("신청")
Column(
modifier = Modifier
.fillMaxSize()
.background(DmsTheme.colors.background),
horizontalAlignment = Alignment.CenterHorizontally,
) {
DmsTopAppBar(title = "신청")
Column(
modifier = Modifier
.fillMaxSize()
.padding(
horizontal = 24.dp,
vertical = 28.dp,
),
verticalArrangement = Arrangement.spacedBy(24.dp),
) {
ApplicationCard(
title = "잔류",
description = "주말 기숙사 잔류 여부를 확인하고, 잔류 신청을 통해서 잔류 또는 귀가를 신청해 보세요.",
buttonText = "잔류 신청하기",
onButtonClick = { },
)
ApplicationCard(
title = "외출",
appliedTitle = "금요 귀가",
description = "기숙사 생활 중 밖으로 나갈 일이 있다면, 외출 신청을 통해서 외출해 보세요.",
buttonText = "와출 신청하기",
onButtonClick = { },
)
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

상태 처리 개선 필요

ApplicationScreen에 다음과 같은 상태 처리를 추가하는 것을 고려해 주세요:

  1. 로딩 상태 표시
  2. 에러 상태 처리
  3. 빈 상태 처리

title = "외출",
appliedTitle = "금요 귀가",
description = "기숙사 생활 중 밖으로 나갈 일이 있다면, 외출 신청을 통해서 외출해 보세요.",
buttonText = "와출 신청하기",
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

오타 수정 필요

"와출 신청하기"에 오타가 있습니다. "외출 신청하기"로 수정해 주세요.

-                buttonText = "와출 신청하기",
+                buttonText = "외출 신청하기",
📝 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
buttonText = "와출 신청하기",
buttonText = "외출 신청하기",

import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Text
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

사용하지 않는 import 제거 필요

androidx.compose.material3.Text는 코드에서 사용되지 않습니다. 이 import 문을 제거해 주세요.

-import androidx.compose.material3.Text
🧰 Tools
🪛 GitHub Actions: Kotlin Multiplatform CI

[error] 13-13: Unused import detected. This can be auto-corrected using 'ktlint --format'

Copy link
Contributor

@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

🧹 Nitpick comments (3)
feature/application/src/commonMain/kotlin/team/aliens/dms/kmp/feature/application/ui/ApplicationScreen.kt (3)

52-52: 빈 클릭 핸들러에 TODO 주석 추가 필요

현재 onButtonClick = { } 부분이 비어있습니다. 구현 예정임을 나타내는 TODO 주석을 추가해 주세요.

-                onButtonClick = { },
+                onButtonClick = { /* TODO: Implement stay application logic */ },
-                onButtonClick = { },
+                onButtonClick = { /* TODO: Implement leave application logic */ },

Also applies to: 59-59


65-73: KDoc 문서화가 필요합니다.

재사용 가능한 컴포넌트의 문서화를 위해 KDoc을 추가해 주세요. 각 매개변수의 용도와 기본값에 대한 설명을 포함해 주세요.

+/**
+ * 신청 카드 컴포넌트
+ *
+ * @param modifier 컴포넌트의 수정자
+ * @param title 신청 항목의 제목
+ * @param appliedTitle 현재 신청된 상태 표시 (선택사항)
+ * @param description 신청 항목에 대한 설명
+ * @param buttonText 신청 버튼의 텍스트
+ * @param onButtonClick 버튼 클릭 시 실행될 콜백
+ */
 @Composable
 private fun ApplicationCard(

98-102: 접근성 개선이 필요합니다.

스크린 리더 사용자를 위해 텍스트 요소에 contentDescription 또는 semantics 수정자를 추가해 주세요.

 DmsText(
     text = title,
     style = DmsTypography.Header3,
     color = DmsTheme.colors.onBackground,
+    modifier = Modifier.semantics { contentDescription = "$title 신청 항목" }
 )
 ...
 DmsText(
     text = description,
     style = DmsTypography.Body3,
     color = DmsTheme.colors.tertiaryContainer,
+    modifier = Modifier.semantics { contentDescription = "$title 신청 항목 설명" }
 )

Also applies to: 121-125

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 68744b8 and 2482c0e.

📒 Files selected for processing (1)
  • feature/application/src/commonMain/kotlin/team/aliens/dms/kmp/feature/application/ui/ApplicationScreen.kt (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Build iOS
  • GitHub Check: Build Desktop
🔇 Additional comments (3)
feature/application/src/commonMain/kotlin/team/aliens/dms/kmp/feature/application/ui/ApplicationScreen.kt (3)

Line range hint 25-29: 함수 구조가 깔끔합니다!

내부 구현을 캡슐화하고 단일 책임 원칙을 잘 따르고 있습니다.


31-63: 상태 처리 로직이 여전히 누락되었습니다.

화면의 다양한 상태(로딩, 에러, 빈 상태 등)를 처리하는 로직을 추가해 주세요.


58-58: 오타가 수정되지 않았습니다.

"와출 신청하기"를 "외출 신청하기"로 수정해 주세요.

@parkuiery parkuiery merged commit 6da8db9 into develop Jan 18, 2025
2 of 5 checks passed
@parkuiery parkuiery deleted the feature/102-feat-신청-퍼블리싱 branch January 18, 2025 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat 새로운 기능을 추가 할 경우
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feat]: 신청 퍼블리싱
1 participant