Skip to content

Conversation

wjdrjs00
Copy link
Member

@wjdrjs00 wjdrjs00 commented Aug 10, 2025

[ PR Content ]

Related issue

Screenshot 📸

  • N/A

Work Description

  • 좀 더 유연한 사용성을 위해 BitnagilTextButton 컴포넌트의 fillmaxwith 속성을 제거했습니다.
  • 컴포넌트를 호출하는 곳에서 속성을 부여하는 뱡향으로 수정

To Reviewers 📢

  • 간단한 작업이지만 공통 컴포넌트 작업이라 pr을 생성해서 별도로 작업했습니다.

Summary by CodeRabbit

  • Style
    • 여러 화면에서 버튼이 가로로 최대 너비를 차지하도록 스타일이 개선되었습니다.
    • "변경하기", "건너뛰기", "다음", "등록하기" 등의 버튼이 화면 폭 전체를 활용하여 더 일관된 UI를 제공합니다.
    • 버튼의 너비 조정이 외부에서 더 유연하게 가능해졌습니다.

@wjdrjs00 wjdrjs00 requested a review from l5x5l August 10, 2025 11:15
@wjdrjs00 wjdrjs00 self-assigned this Aug 10, 2025
@wjdrjs00 wjdrjs00 added 🔨 Refactor 기존 기능 개선 📱 UI UI 추가 및 수정 (비지니스 로직을 포함하지 않는 작업) 🧤 대현 labels Aug 10, 2025
Copy link

coderabbitai bot commented Aug 10, 2025

Walkthrough

BitnagilTextButton 컴포넌트 내부에서 fillMaxWidth()를 제거하고, 대신 각 사용처에서 modifier로 fillMaxWidth()를 명시적으로 전달하도록 변경했습니다. 이에 따라 여러 화면에서 해당 버튼의 modifier에 fillMaxWidth()를 추가하여 버튼이 전체 너비를 차지하도록 수정되었습니다.

Changes

Cohort / File(s) Change Summary
BitnagilTextButton 내부 레이아웃 수정
core/designsystem/src/main/java/com/threegap/bitnagil/designsystem/component/atom/BitnagilTextButton.kt
BitnagilTextButton 내부 Box에서 fillMaxWidth() 제거, 버튼의 너비 제어를 외부 modifier로 위임
EmotionScreen 버튼 modifier 수정
presentation/src/main/java/com/threegap/bitnagil/presentation/emotion/EmotionScreen.kt
EmotionRecommendRoutineScreen 내 BitnagilTextButton 2곳에 fillMaxWidth() modifier 추가
OnBoardingSelectTemplate 버튼 modifier 수정
presentation/src/main/java/com/threegap/bitnagil/presentation/onboarding/component/template/OnBoardingSelectTemplate.kt
OnBoardingSelectTemplate 내 "다음", "건너뛰기" 버튼에 fillMaxWidth() modifier 추가
WriteRoutineScreen 버튼 modifier 수정
presentation/src/main/java/com/threegap/bitnagil/presentation/writeroutine/WriteRoutineScreen.kt
WriteRoutineScreen 내 "등록하기" 버튼 modifier에 fillMaxWidth() 추가
TimePickerBottomSheet 버튼 modifier 수정
presentation/src/main/java/com/threegap/bitnagil/presentation/writeroutine/component/template/TimePickerBottomSheet.kt
TimePickerBottomSheetContent 내 BitnagilTextButton modifier에 fillMaxWidth() 추가

Sequence Diagram(s)

sequenceDiagram
    participant Caller as 호출부(화면)
    participant BitnagilTextButton as BitnagilTextButton

    Caller->>BitnagilTextButton: modifier = Modifier.fillMaxWidth()
    BitnagilTextButton-->>Caller: 버튼 렌더링 (modifier 적용)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Assessment against linked issues

Objective Addressed Explanation
BitnagilTextButton 공통 컴포넌트 수정 (#93)

Assessment against linked issues: Out-of-scope changes

(해당 변경사항에는 linked issue의 목적에서 벗어난 변경사항이 없습니다.)

Poem

버튼의 너비, 토끼가 고민했죠
fillMaxWidth는 어디에 둘까요?
컴포넌트 속에 숨지 않고
화면마다 직접 입혀주니
자유롭고 깔끔하게 변신했답니다!
🐰✨

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/#93-common-textbuttom

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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.
    • Explain this complex logic.
    • 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 explain this code block.
  • 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 explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @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: 1

🧹 Nitpick comments (3)
presentation/src/main/java/com/threegap/bitnagil/presentation/writeroutine/WriteRoutineScreen.kt (1)

336-338: 호출부에서 폭 제어 명시 — OK

BitnagilTextButtonfillMaxWidth()를 명시해 이전 레이아웃을 유지한 점 좋습니다.

소소한 스타일 제안:

  • 팀 컨벤션이 있다면(예: 크기 → 간격 순), 아래처럼 순서를 통일하면 가독성이 좋아집니다.
-modifier = Modifier
-    .padding(start = 16.dp, end = 16.dp, top = 14.dp, bottom = 14.dp)
-    .fillMaxWidth(),
+modifier = Modifier
+    .fillMaxWidth()
+    .padding(start = 16.dp, end = 16.dp, top = 14.dp, bottom = 14.dp),
presentation/src/main/java/com/threegap/bitnagil/presentation/writeroutine/component/template/TimePickerBottomSheet.kt (2)

109-112: 사용처에서 폭 제어 명시 — OK (소소한 순서 통일 제안)

레이아웃은 문제없습니다. 다만 다른 파일과의 일관성을 위해 순서를 통일하면 읽기 쉬워집니다.

-modifier = Modifier
-    .padding(start = 16.dp, end = 16.dp, bottom = 14.dp)
-    .fillMaxWidth(),
+modifier = Modifier
+    .fillMaxWidth()
+    .padding(start = 16.dp, end = 16.dp, bottom = 14.dp),

85-87: 불필요한 객체 생성 제거 제안

AndroidView의 factory에서 TimePicker(context).apply { setIs24HourView(true) }를 생성하지만 사용하지 않습니다. 인플레이트한 뷰의 timePicker에 설정하거나, 불필요 생성 코드를 제거하세요.

-                TimePicker(context).apply {
-                    setIs24HourView(true)
-                }
+                // 필요 시 아래처럼 inflate된 timePicker에 적용:
+                // (spinner_time_picker 레이아웃이 24h 설정을 포함하지 않는다면)
+                (view.findViewById<TimePicker>(R.id.time_picker))?.setIs24HourView(true)
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 936e119 and 9d2c2fe.

📒 Files selected for processing (5)
  • core/designsystem/src/main/java/com/threegap/bitnagil/designsystem/component/atom/BitnagilTextButton.kt (2 hunks)
  • presentation/src/main/java/com/threegap/bitnagil/presentation/emotion/EmotionScreen.kt (3 hunks)
  • presentation/src/main/java/com/threegap/bitnagil/presentation/onboarding/component/template/OnBoardingSelectTemplate.kt (3 hunks)
  • presentation/src/main/java/com/threegap/bitnagil/presentation/writeroutine/WriteRoutineScreen.kt (1 hunks)
  • presentation/src/main/java/com/threegap/bitnagil/presentation/writeroutine/component/template/TimePickerBottomSheet.kt (2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-07-21T10:38:49.104Z
Learnt from: l5x5l
PR: YAPP-Github/Bitnagil-Android#38
File: presentation/src/main/java/com/threegap/bitnagil/presentation/writeroutine/component/atom/textbutton/TextButton.kt:30-35
Timestamp: 2025-07-21T10:38:49.104Z
Learning: presentation/src/main/java/com/threegap/bitnagil/presentation/writeroutine/component/atom/textbutton/TextButton.kt의 TextButton 컴포넌트는 임시로 구현된 컴포넌트로, 디자인 시스템 구현시 대체 예정입니다.

Applied to files:

  • core/designsystem/src/main/java/com/threegap/bitnagil/designsystem/component/atom/BitnagilTextButton.kt
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (2)
presentation/src/main/java/com/threegap/bitnagil/presentation/onboarding/component/template/OnBoardingSelectTemplate.kt (1)

5-5: 사용처에서 폭 제어 명시 — OK

  • 다음, 건너뛰기 모두 Modifier.fillMaxWidth() 적용으로 의도대로 전체 폭을 차지합니다.
  • 상위 Column의 좌우 패딩과도 정렬되어 UI 일관성이 유지됩니다.

Also applies to: 80-81, 92-93

presentation/src/main/java/com/threegap/bitnagil/presentation/emotion/EmotionScreen.kt (1)

10-10: 사용처에서 폭 제어 명시 — OK

  • 변경하기, 건너뛰기 버튼 모두 폭 제어를 호출부로 이관하여 일관성 있게 유지했습니다.
  • 건너뛰기는 배경 투명 처리와 조합되어 디자인 의도에 부합합니다.

Also applies to: 204-205, 219-220

Copy link
Contributor

@l5x5l l5x5l left a comment

Choose a reason for hiding this comment

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

🚀

@wjdrjs00 wjdrjs00 merged commit 8149ca8 into develop Aug 10, 2025
2 checks passed
@wjdrjs00 wjdrjs00 deleted the refactor/#93-common-textbuttom branch August 10, 2025 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 Refactor 기존 기능 개선 📱 UI UI 추가 및 수정 (비지니스 로직을 포함하지 않는 작업) 🧤 대현

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[REFACTOR] BitnagilTextButton 공통 컴포넌트 수정

2 participants