Skip to content

[UI] 기록장 상세 페이지 구현 완료#49

Merged
Nico1eKim merged 23 commits intoTHIP-TextHip:developfrom
Nico1eKim:ui/#34-group_note_create_page
Jul 22, 2025
Merged

[UI] 기록장 상세 페이지 구현 완료#49
Nico1eKim merged 23 commits intoTHIP-TextHip:developfrom
Nico1eKim:ui/#34-group_note_create_page

Conversation

@Nico1eKim
Copy link
Member

@Nico1eKim Nico1eKim commented Jul 18, 2025

➕ 이슈 링크


🔎 작업 내용

  • 기록 작성 페이지 완료했습니다
  • 투표 생성 페이지 완료했습니다

📸 스크린샷

기록 작성 페이지 (총평 활성화 안된 경우)

2025-07-19.12.42.21.mov

기록 작성 페이지 (총평 활성화 된 경우)

2025-07-19.12.44.51.mov

투표 생성 페이지

2025-07-19.12.46.40.mov

😢 해결하지 못한 과제

  • 이전에 작업했던 화면들에서 새로 생긴 데이터가 없는 경우의 화면들은 새로 이슈 파서 작업하겠습니다 .. 작업 시간이 딜레이돼서 죄송함다ㅠ


📢 리뷰어들에게

  • 참고해야 할 사항들을 적어주세요

Nico1eKim added 23 commits July 10, 2025 19:16
…into ui/THIP-TextHip#34-group_note_create_page

# Conflicts:
#	app/src/main/java/com/texthip/thip/ui/group/myroom/screen/GroupRoomScreen.kt
#	app/src/main/res/values/strings.xml
@coderabbitai
Copy link

coderabbitai bot commented Jul 18, 2025

Walkthrough

이번 변경에서는 그룹 노트 및 투표 생성 화면, 입력 섹션(페이지, 의견, 투표), 커스텀 입력 필드 등 다양한 Jetpack Compose UI 컴포넌트가 대거 추가 및 리팩터링되었습니다. 주요 입력 컴포넌트의 상태 관리 방식이 외부 제어형으로 전환되고, 아이콘 및 리소스가 추가·수정되었습니다.

Changes

파일/경로 요약 변경 내용 요약
.../ExpandableFloatingButton.kt 확장 메뉴 컨테이너 및 플로팅 버튼의 패딩, 크기 조정
.../ToggleSwitchButton.kt enabled 매개변수 추가, Switch 색상 및 modifier 개선, 함수 시그니처 변경
.../forms/BookPageTextField.kt 내부 상태 제거, 외부 제어형으로 리팩터링, 파라미터 명확화, 에러 처리 개선, 함수 시그니처 변경
.../forms/BorderedTextField.kt OutlinedTextField → BasicTextField 커스텀 구현, 외부 상태 관리, 아이콘 로직 확장, 함수 시그니처 변경
.../modal/ToolTip.kt isEligible 파라미터 추가, 텍스트 색상 분기, 화살표 패딩 확대, 프리뷰 개선
.../group/note/component/OpinionInputSection.kt 의견 입력 UI 컴포넌트 신설, 글자수 표시 및 제한, 프리뷰 추가
.../group/note/component/PageInputSection.kt 페이지 입력 + 일반 리뷰 토글 UI 컴포넌트 신설, 프리뷰 추가
.../group/note/component/VoteInputSection.kt 투표 제목/옵션 입력 UI 컴포넌트 신설, 옵션 동적 추가/삭제, 프리뷰 추가
.../group/note/screen/GroupNoteCreateScreen.kt 그룹 노트 생성 화면 신설, 입력 상태 관리, 툴팁 모달 위치 계산 및 표시, 프리뷰 추가
.../group/note/screen/GroupVoteCreateScreen.kt 그룹 투표 생성 화면 신설, 입력 상태 및 유효성 관리, 툴팁 모달 표시, 프리뷰 추가
.../res/drawable/ic_x_circle_darkgrey.xml 다크그레이 원형 X 아이콘 벡터 리소스 신설
.../res/drawable/ic_x_circle_grey.xml 그레이 원형 X 아이콘 크기 축소, 색상 및 좌표 조정
.../res/values/strings.xml 그룹노트/투표 관련 다수의 string 리소스 추가 및 수정, 에러 메시지 개선

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant GroupNoteCreateScreen
    participant PageInputSection
    participant OpinionInputSection
    participant ToolTipModal

    User->>GroupNoteCreateScreen: 화면 진입
    GroupNoteCreateScreen->>PageInputSection: 페이지 입력/일반리뷰 토글 렌더링
    GroupNoteCreateScreen->>OpinionInputSection: 의견 입력 렌더링
    User->>PageInputSection: 페이지 입력/토글 조작
    User->>OpinionInputSection: 의견 입력
    User->>PageInputSection: info 아이콘 클릭
    PageInputSection->>GroupNoteCreateScreen: 위치 전달
    GroupNoteCreateScreen->>ToolTipModal: 툴팁 표시
    User->>ToolTipModal: 닫기
    ToolTipModal-->>GroupNoteCreateScreen: 툴팁 닫힘
Loading
sequenceDiagram
    participant User
    participant GroupVoteCreateScreen
    participant PageInputSection
    participant VoteInputSection
    participant ToolTipModal

    User->>GroupVoteCreateScreen: 화면 진입
    GroupVoteCreateScreen->>PageInputSection: 페이지 입력/일반리뷰 토글 렌더링
    GroupVoteCreateScreen->>VoteInputSection: 투표 제목/옵션 입력 렌더링
    User->>VoteInputSection: 옵션 입력/추가/삭제
    User->>PageInputSection: info 아이콘 클릭
    PageInputSection->>GroupVoteCreateScreen: 위치 전달
    GroupVoteCreateScreen->>ToolTipModal: 툴팁 표시
    User->>ToolTipModal: 닫기
    ToolTipModal-->>GroupVoteCreateScreen: 툴팁 닫힘
Loading

Possibly related PRs

  • THIP-TextHip/THIP-Android#22: 기존 BookPageTextField의 내부 상태 관리 방식을 외부 제어형으로 리팩터링하고, 유효성 검증을 강화하는 등 본 PR의 변경과 직접적으로 연관됨.

Suggested labels

🍀 refactor

Suggested reviewers

  • rbqks529

Poem

🐇
새싹이 피는 입력란,
토글과 투표, 의견도 활짝!
툴팁이 속삭이고,
X 아이콘이 반짝반짝.
코드밭에 변화의 바람,
토끼는 깡충 뛰며 노래해요—
"새 UI, 참 예쁘다!"
🥕

✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 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.
    • @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 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.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

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

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.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in 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: 6

♻️ Duplicate comments (1)
app/src/main/java/com/texthip/thip/ui/group/note/screen/GroupVoteCreateScreen.kt (1)

46-46: TODO 주석 해결

서버 데이터 연동 관련 TODO가 남아있습니다.

GroupNoteCreateScreen과 동일한 이슈입니다.

🧹 Nitpick comments (2)
app/src/main/java/com/texthip/thip/ui/group/note/screen/GroupNoteCreateScreen.kt (1)

45-45: TODO 주석 해결

서버 데이터 연동 관련 TODO가 남아있습니다.

isEligible 상태를 서버에서 가져오는 로직을 구현하거나, 향후 작업을 위한 별도 이슈를 생성하시겠습니까?

app/src/main/java/com/texthip/thip/ui/group/note/component/VoteInputSection.kt (1)

125-127: Preview에서 중복 로직 제거

컴포넌트 내부의 maxOptions 체크와 Preview의 체크가 중복됩니다.

         onAddOption = {
-            if (options.size < 5) {
-                options = options.toMutableList().also { it.add("") }
-            }
+            options = options.toMutableList().also { it.add("") }
         },

컴포넌트 내부에서 이미 maxOptions 체크를 하고 있으므로 Preview에서는 중복 체크가 불필요합니다.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 6fa3d25 and 01c17d5.

📒 Files selected for processing (13)
  • app/src/main/java/com/texthip/thip/ui/common/buttons/ExpandableFloatingButton.kt (2 hunks)
  • app/src/main/java/com/texthip/thip/ui/common/buttons/ToggleSwitchButton.kt (2 hunks)
  • app/src/main/java/com/texthip/thip/ui/common/forms/BookPageTextField.kt (4 hunks)
  • app/src/main/java/com/texthip/thip/ui/common/forms/BorderedTextField.kt (1 hunks)
  • app/src/main/java/com/texthip/thip/ui/common/modal/ToolTip.kt (5 hunks)
  • app/src/main/java/com/texthip/thip/ui/group/note/component/OpinionInputSection.kt (1 hunks)
  • app/src/main/java/com/texthip/thip/ui/group/note/component/PageInputSection.kt (1 hunks)
  • app/src/main/java/com/texthip/thip/ui/group/note/component/VoteInputSection.kt (1 hunks)
  • app/src/main/java/com/texthip/thip/ui/group/note/screen/GroupNoteCreateScreen.kt (1 hunks)
  • app/src/main/java/com/texthip/thip/ui/group/note/screen/GroupVoteCreateScreen.kt (1 hunks)
  • app/src/main/res/drawable/ic_x_circle_darkgrey.xml (1 hunks)
  • app/src/main/res/drawable/ic_x_circle_grey.xml (1 hunks)
  • app/src/main/res/values/strings.xml (4 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: rbqks529
PR: THIP-TextHip/THIP-Android#30
File: app/src/main/java/com/texthip/thip/ui/common/cards/CardItemRoomSmall.kt:108-112
Timestamp: 2025-07-01T07:19:10.981Z
Learning: The user rbqks529 prefers to extract hardcoded UI strings to StringResource files (strings.xml) rather than keeping them inline in Compose components, which is a good practice for maintainability and localization in Android development.
app/src/main/java/com/texthip/thip/ui/common/modal/ToolTip.kt (1)
Learnt from: rbqks529
PR: THIP-TextHip/THIP-Android#30
File: app/src/main/java/com/texthip/thip/ui/common/cards/CardItemRoomSmall.kt:108-112
Timestamp: 2025-07-01T07:19:10.981Z
Learning: The user rbqks529 prefers to extract hardcoded UI strings to StringResource files (strings.xml) rather than keeping them inline in Compose components, which is a good practice for maintainability and localization in Android development.
app/src/main/java/com/texthip/thip/ui/group/note/component/OpinionInputSection.kt (1)
Learnt from: rbqks529
PR: THIP-TextHip/THIP-Android#30
File: app/src/main/java/com/texthip/thip/ui/common/cards/CardItemRoomSmall.kt:108-112
Timestamp: 2025-07-01T07:19:10.981Z
Learning: The user rbqks529 prefers to extract hardcoded UI strings to StringResource files (strings.xml) rather than keeping them inline in Compose components, which is a good practice for maintainability and localization in Android development.
app/src/main/res/values/strings.xml (1)
Learnt from: rbqks529
PR: THIP-TextHip/THIP-Android#30
File: app/src/main/java/com/texthip/thip/ui/common/cards/CardItemRoomSmall.kt:108-112
Timestamp: 2025-07-01T07:19:10.981Z
Learning: The user rbqks529 prefers to extract hardcoded UI strings to StringResource files (strings.xml) rather than keeping them inline in Compose components, which is a good practice for maintainability and localization in Android development.
app/src/main/java/com/texthip/thip/ui/common/forms/BookPageTextField.kt (1)
Learnt from: rbqks529
PR: THIP-TextHip/THIP-Android#30
File: app/src/main/java/com/texthip/thip/ui/common/cards/CardItemRoomSmall.kt:108-112
Timestamp: 2025-07-01T07:19:10.981Z
Learning: The user rbqks529 prefers to extract hardcoded UI strings to StringResource files (strings.xml) rather than keeping them inline in Compose components, which is a good practice for maintainability and localization in Android development.
🧬 Code Graph Analysis (2)
app/src/main/java/com/texthip/thip/ui/group/note/component/VoteInputSection.kt (1)
app/src/main/java/com/texthip/thip/ui/common/forms/BorderedTextField.kt (1)
  • BorderedTextField (35-119)
app/src/main/java/com/texthip/thip/ui/group/note/component/PageInputSection.kt (2)
app/src/main/java/com/texthip/thip/ui/common/forms/BookPageTextField.kt (1)
  • BookPageTextField (42-134)
app/src/main/java/com/texthip/thip/ui/common/buttons/ToggleSwitchButton.kt (1)
  • ToggleSwitchButton (23-54)
🔇 Additional comments (23)
app/src/main/java/com/texthip/thip/ui/common/modal/ToolTip.kt (5)

59-59: 새로운 isEligible 파라미터 추가 승인

적격성에 따른 UI 피드백을 제공하는 파라미터 추가가 적절합니다. 기본값 true로 설정하여 기존 코드와의 호환성을 유지한 점도 좋습니다.


73-73: 화살표 패딩 증가 승인

패딩을 24.dp에서 64.dp로 증가시켜 툴팁 화살표의 위치를 조정한 것이 적절합니다. 이는 더 나은 시각적 균형을 제공할 것입니다.

Also applies to: 80-80


98-98: 조건부 텍스트 색상 로직 승인

isEligible 값에 따라 텍스트 색상을 조건부로 변경하는 로직이 명확하고 직관적입니다. 적격한 경우 NeonGreen, 부적격한 경우 Red로 표시하여 사용자에게 명확한 피드백을 제공합니다.


120-120: 문자열 리소스 사용 승인

하드코딩된 문자열을 stringResource로 변경한 것이 좋습니다. 이전 학습 내용에 따르면 사용자가 문자열을 StringResource 파일로 추출하는 것을 선호하므로 이는 적절한 변경입니다.

Also applies to: 127-127, 134-134


139-139: 프리뷰에서 isEligible 파라미터 테스트 승인

프리뷰에서 isEligible = false를 명시적으로 설정하여 빨간색 텍스트 색상을 테스트하는 것이 좋습니다. 이를 통해 두 가지 상태 모두를 시각적으로 확인할 수 있습니다.

app/src/main/java/com/texthip/thip/ui/common/buttons/ExpandableFloatingButton.kt (2)

68-68: 메뉴 컨테이너 패딩 조정 승인

확장된 메뉴의 bottom 패딩을 94.dp에서 62.dp로 줄이고 end 패딩을 제거한 것이 적절합니다. 이는 더 균형 잡힌 레이아웃을 제공할 것입니다.


103-103: FloatingActionButton 크기 조정 승인

버튼 크기를 56.dp에서 50.dp로 줄인 것이 더 컴팩트한 디자인을 제공합니다. 이는 전체적인 UI 일관성을 향상시킬 것입니다.

app/src/main/res/drawable/ic_x_circle_darkgrey.xml (1)

1-16: 새로운 아이콘 리소스 추가 승인

다크 그레이 X 원형 아이콘이 잘 정의되어 있습니다. 기존 ic_x_circle_grey.xml과 함께 다양한 UI 상태에서 사용할 수 있는 일관된 아이콘 세트를 제공합니다.

app/src/main/res/drawable/ic_x_circle_grey.xml (2)

2-5: 아이콘 크기 표준화 승인

아이콘 크기를 25dp에서 24dp로 변경하여 크기를 표준화한 것이 좋습니다. 뷰포트와 패스 좌표도 적절히 조정되었습니다.


7-7: 색상 및 패스 좌표 업데이트 승인

스트로크 색상을 #FEFEFE에서 #3D3D3D로 변경하여 더 나은 시각적 대비를 제공하고, 패스 좌표를 새로운 크기에 맞게 조정한 것이 적절합니다.

Also applies to: 10-10, 14-14

app/src/main/java/com/texthip/thip/ui/common/buttons/ToggleSwitchButton.kt (4)

26-26: enabled 파라미터 추가 승인

Switch 컴포넌트의 활성/비활성 상태를 제어할 수 있는 enabled 파라미터 추가가 적절합니다. 기본값을 true로 설정하여 기존 코드와의 호환성을 유지했습니다.


30-30: height 제약 추가 승인

Switch에 height(30.dp) 제약을 추가하여 일관된 크기를 제공하는 것이 좋습니다. 이는 다양한 화면에서 일관된 UI를 보장합니다.


35-35: disabled 상태 색상 설정 승인

비활성 상태에서도 활성 상태와 동일한 색상을 유지하도록 설정한 것이 적절합니다. 이는 일관된 시각적 경험을 제공하면서도 사용자가 컴포넌트의 상태를 명확히 인식할 수 있게 합니다.

Also applies to: 37-37, 39-39, 41-41, 43-43


45-45: enabled 파라미터 전달 승인

새로 추가된 enabled 파라미터를 Switch 컴포넌트에 적절히 전달하여 기능을 완성했습니다.

app/src/main/java/com/texthip/thip/ui/group/note/component/OpinionInputSection.kt (1)

25-32: 컴포넌트 설계가 잘 되어 있습니다

매개변수의 기본값 설정과 외부 상태 관리 방식이 적절하며, 재사용성을 고려한 설계가 돋보입니다.

app/src/main/java/com/texthip/thip/ui/group/note/screen/GroupNoteCreateScreen.kt (1)

54-55: 빈 콜백 함수 구현 필요

네비게이션 콜백들이 빈 상태로 남아있어 실제 기능이 동작하지 않습니다.

실제 네비게이션 로직이 구현되어야 합니다. 매개변수로 콜백을 받도록 수정하는 것을 고려해보세요.

app/src/main/java/com/texthip/thip/ui/group/note/component/VoteInputSection.kt (1)

32-42: 컴포넌트 매개변수 설계가 우수합니다

동적 옵션 관리를 위한 콜백 구조와 제약 조건 매개변수가 잘 설계되어 있습니다.

app/src/main/java/com/texthip/thip/ui/group/note/screen/GroupVoteCreateScreen.kt (1)

49-53: 복잡한 validation 로직이 잘 구현되어 있습니다

여러 조건을 고려한 완료 버튼 활성화 로직이 명확하고 정확합니다.

app/src/main/java/com/texthip/thip/ui/group/note/component/PageInputSection.kt (2)

99-106: 토글 상태 변경 시 텍스트 처리 로직이 우수합니다

토글 활성화 시 텍스트를 자동으로 클리어하고, 비활성화 시 적절한 초기값을 설정하는 로직이 사용자 경험을 고려한 좋은 구현입니다.


80-90: 툴팁 위치 캡처 로직이 잘 구현되어 있습니다

onGloballyPositioned를 사용한 아이콘 위치 캡처와 클릭 이벤트 처리가 적절하게 구현되어 있습니다.

app/src/main/java/com/texthip/thip/ui/common/forms/BorderedTextField.kt (1)

36-119: 외부 상태 관리 패턴으로의 리팩토링이 잘 구현되었습니다.

OutlinedTextField에서 BasicTextField로의 전환과 외부 상태 관리 패턴 적용이 깔끔하게 처리되었습니다. 포커스 상태에 따른 아이콘 변경 로직도 명확합니다.

app/src/main/res/values/strings.xml (1)

14-14: 그룹 노트 및 투표 관련 문자열 리소스가 잘 추가되었습니다.

새로운 기능을 위한 문자열 리소스들이 적절한 섹션에 체계적으로 추가되었으며, 네이밍 컨벤션도 일관성 있게 유지되고 있습니다.

Also applies to: 154-190

app/src/main/java/com/texthip/thip/ui/common/forms/BookPageTextField.kt (1)

45-134: 제어 컴포넌트 패턴으로의 리팩토링이 훌륭합니다.

  • bookPage에서 bookTotalPage로의 파라미터 이름 변경이 더 명확합니다
  • enabled 파라미터 추가로 유연성이 향상되었습니다
  • 입력 검증 로직이 적절히 구현되었습니다
  • 에러 상태에 따른 UI 변경이 잘 처리되었습니다

Comment on lines +48 to +50
onValueChange = {
if (it.length <= maxLength) onTextChange(it)
},
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

텍스트 입력 제한 로직 개선 필요

현재 로직에서는 maxLength를 초과하면 입력을 차단하지만, 초과된 텍스트가 이미 있는 경우 사용자가 텍스트를 수정하거나 줄일 수 없게 됩니다.

다음과 같이 수정하여 초과 상태에서도 텍스트 편집이 가능하도록 개선하세요:

-                onValueChange = {
-                    if (it.length <= maxLength) onTextChange(it)
-                },
+                onValueChange = { newText ->
+                    // 길이가 줄어들거나 최대 길이 이하일 때만 허용
+                    if (newText.length <= text.length || newText.length <= maxLength) {
+                        onTextChange(newText)
+                    }
+                },
📝 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
onValueChange = {
if (it.length <= maxLength) onTextChange(it)
},
onValueChange = { newText ->
// 길이가 줄어들거나 최대 길이 이하일 때만 허용
if (newText.length <= text.length || newText.length <= maxLength) {
onTextChange(newText)
}
},
🤖 Prompt for AI Agents
In
app/src/main/java/com/texthip/thip/ui/group/note/component/OpinionInputSection.kt
around lines 48 to 50, the current onValueChange logic blocks input when the
text length exceeds maxLength, preventing users from editing or reducing the
text if it is already too long. Modify the logic to always allow text changes
but truncate the input to maxLength if it exceeds the limit, ensuring users can
edit and shorten the text even when over the limit.

isGeneralReview = isGeneralReview,
onGeneralReviewToggle = { isGeneralReview = it },
isEligible = isEligible,
bookTotalPage = 600,
Copy link

@coderabbitai coderabbitai bot Jul 18, 2025

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

하드코딩된 값을 매개변수로 변경

bookTotalPage = 600이 하드코딩되어 있습니다. 이는 동적으로 전달받아야 하는 값입니다.

 @Composable
-fun GroupNoteCreateScreen() {
+fun GroupNoteCreateScreen(
+    bookTotalPage: Int = 600, // 기본값은 유지하되 외부에서 주입 가능하도록
+    onNavigateBack: () -> Unit = {},
+    onComplete: () -> Unit = {}
+) {
🤖 Prompt for AI Agents
In
app/src/main/java/com/texthip/thip/ui/group/note/screen/GroupNoteCreateScreen.kt
at line 69, the value 600 is hardcoded for bookTotalPage. Modify the code to
accept bookTotalPage as a parameter to the function or constructor where this
value is used, and pass the dynamic value instead of the fixed 600.

Copy link
Collaborator

Choose a reason for hiding this comment

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

그러게요 이거는 변수로 바꾸면 좋을듯용

Copy link

Choose a reason for hiding this comment

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

@rbqks529 맞습니다! 하드코딩된 값을 매개변수로 변경하면 컴포넌트의 재사용성과 유지보수성이 훨씬 좋아지죠.

이 변경사항을 구현하도록 도와드릴까요? `` 태그를 사용해서 코드 변경을 계획할 수 있습니다.

🐰✨

  /|   /|   
 ( :v:  ) 
  |(_)|  

🧠 Learnings used
Learnt from: rbqks529
PR: THIP-TextHip/THIP-Android#30
File: app/src/main/java/com/texthip/thip/ui/common/cards/CardItemRoomSmall.kt:108-112
Timestamp: 2025-07-01T07:19:10.981Z
Learning: The user rbqks529 prefers to extract hardcoded UI strings to StringResource files (strings.xml) rather than keeping them inline in Compose components, which is a good practice for maintainability and localization in Android development.

⏳ Preparing changes...

Copy link

Choose a reason for hiding this comment

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

A summary of the changes CodeRabbit can apply:

  • Modify GroupNoteCreateScreen.kt by updating the GroupNoteCreateScreen function to accept parameters for total pages and navigation callbacks, and replace hardcoded values and inline callbacks with these parameters to enable dynamic behavior and external control.
  • ✅ Create PR with these edits
  • 📌 Create commit in current branch
  • 📋 Get copyable edits

isGeneralReview = isGeneralReview,
onGeneralReviewToggle = { isGeneralReview = it },
isEligible = isEligible,
bookTotalPage = 600,
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

하드코딩된 값을 매개변수로 변경

GroupNoteCreateScreen과 동일한 이슈로 bookTotalPage = 600이 하드코딩되어 있습니다.

 @Composable
-fun GroupVoteCreateScreen() {
+fun GroupVoteCreateScreen(
+    bookTotalPage: Int = 600,
+    onNavigateBack: () -> Unit = {},
+    onComplete: () -> Unit = {}
+) {

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

🤖 Prompt for AI Agents
In
app/src/main/java/com/texthip/thip/ui/group/note/screen/GroupVoteCreateScreen.kt
at line 75, the value 600 for bookTotalPage is hardcoded. Modify the code to
pass bookTotalPage as a parameter to the function or constructor instead of
using the fixed value 600, ensuring it can be dynamically set from outside the
method or class.

Copy link
Collaborator

@rbqks529 rbqks529 left a comment

Choose a reason for hiding this comment

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

전체 코드 확인했습니다. 이제 기록장은 다 완성된거일까요?

Copy link
Collaborator

Choose a reason for hiding this comment

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

기존 코드 수정이 됬네요 확인했습니다!

Copy link
Collaborator

Choose a reason for hiding this comment

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

투표 생성 페이지에서 사용될 수 있게 수정하신거 같네요 확인했습니다!

) {
var text by rememberSaveable { mutableStateOf("") }
val myStyle = typography.menu_r400_s14_h24.copy(lineHeight = 14.sp)
val interactionSource = remember { MutableInteractionSource() }
Copy link
Collaborator

Choose a reason for hiding this comment

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

처음 보는 코드인데 혹시 어떤 역할인지 물어봐도 될까요? InteractionSource는 처음봤네요

Copy link
Member Author

Choose a reason for hiding this comment

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

이 textfield가 focus가 안됐을 때, 됐을 때, 입력창이 채워졌을 때 등 여러가지 상태가 있는데 그 중에서 focus일 때의 상태를 받기 위한 코드입니닷!

import com.texthip.thip.ui.theme.ThipTheme.typography
import androidx.compose.ui.platform.LocalDensity

enum class ArrowPosition {
Copy link
Collaborator

Choose a reason for hiding this comment

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

이 이넘 클래스는 해당 툴팁 함수에서 같이 사용되는건가요?

Copy link
Member Author

Choose a reason for hiding this comment

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

이거 제가 만든 코드 아니고 주연이가 만든 코드에서 위치만 살짝 수정한거입니둣 ..ㅎ... 근데 이 툴팁에서만 사용되는거같아요 ~

isGeneralReview = isGeneralReview,
onGeneralReviewToggle = { isGeneralReview = it },
isEligible = isEligible,
bookTotalPage = 600,
Copy link
Collaborator

Choose a reason for hiding this comment

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

그러게요 이거는 변수로 바꾸면 좋을듯용

@Nico1eKim Nico1eKim merged commit 23c94fa into THIP-TextHip:develop Jul 22, 2025
1 check passed
@coderabbitai coderabbitai bot mentioned this pull request Aug 12, 2025
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[UI] 기록장 상세 페이지 [(THIP2025-81)]

2 participants