Skip to content

[UI/#179] 글자수 제한 추가 및 제보 최소 대기시간 수정#180

Merged
l5x5l merged 5 commits intodevelopfrom
ui/#179-character_limit
Feb 17, 2026
Merged

[UI/#179] 글자수 제한 추가 및 제보 최소 대기시간 수정#180
l5x5l merged 5 commits intodevelopfrom
ui/#179-character_limit

Conversation

@l5x5l
Copy link
Contributor

@l5x5l l5x5l commented Feb 17, 2026

[ PR Content ]

  • 루틴 작성/제보하기 화면에 추가된 글자 수 제약을 반영하고, 제보하기에서 로딩 뷰의 최소 표시 시간을 조정했습니다.

Related issue

Screenshot 📸

Work Description

  • 루틴 작성시 루틴 제목, 제보하기의 제보 제목의 글자수 제한을 추가
  • 제보하기에서 제보시 로딩 UI가 표시되는 최소 시간 1초에서 1.5초로 조정
  • 제보하기에서 일부 TextField의 고정 높이를 가변 높이로 변경

To Reviewers 📢

  • Figma상에는 제보 제목 TextField의 높이가 70 고정이라고 명시되었지만, zFlip 시리즈와 같이 가로가 짧은 일부 기기에서는 50자에 근접했을 때 3줄로 표시되어 일부 글자가 보이지 않는 문제가 있어 가변 높이로 변경하였습니다
  • 궁금하거나 수정이 필요한 부분 있으면 코멘트 부탁드립니다!

Summary by CodeRabbit

릴리스 노트

  • 새 기능

    • 보고서 제목 입력 필드에 문자 수 표시 추가
    • 보고서 내용 입력 필드에 문자 수 표시 추가
    • 루틴 이름 입력 필드에 문자 수 표시 추가
  • 버그 수정

    • 입력 필드의 최대 문자 수 제한 적용으로 유효성 검사 강화

@l5x5l l5x5l self-assigned this Feb 17, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 17, 2026

개요

이 풀 리퀘스트는 루틴 작성 화면과 제보 화면에 글자수 제한 기능을 추가하고, 제보 제출 시 로딩 UI의 최소 대기시간을 조정합니다. UI에는 실시간 글자 수 표시 기능이 추가되었습니다.

변경 사항

그룹 / 파일 요약
제보 화면 - 상수 및 유효성 검사
presentation/src/main/java/com/threegap/bitnagil/presentation/report/contract/ReportState.kt, presentation/src/main/java/com/threegap/bitnagil/presentation/report/ReportViewModel.kt
제목(50자), 내용(150자) 최대 글자 수 상수 추가. ViewModel에서 입력값이 제한을 초과하면 업데이트를 방지하는 가드 로직 추가.
제보 화면 - UI 및 레이아웃
presentation/src/main/java/com/threegap/bitnagil/presentation/report/ReportScreen.kt
제목과 내용 필드에 실시간 글자 수 표시 추가. 명시적 높이 제거하고 minLines 설정으로 변경. 플레이스홀더 텍스트 동적 업데이트.
루틴 작성 화면 - 상수 및 유효성 검사
presentation/src/main/java/com/threegap/bitnagil/presentation/writeroutine/contract/WriteRoutineState.kt, presentation/src/main/java/com/threegap/bitnagil/presentation/writeroutine/WriteRoutineViewModel.kt
루틴 이름 최대 글자 수 상수(20자) 추가. ViewModel에서 입력값 초과 시 업데이트 방지.
루틴 작성 화면 - UI
presentation/src/main/java/com/threegap/bitnagil/presentation/writeroutine/WriteRoutineScreen.kt
루틴 이름 필드에 실시간 글자 수 표시 추가. 상단 여백(40dp → 6dp) 감소, 하단 여백(0 → 28dp) 증가로 레이아웃 조정.
제보 제출 로딩 시간
presentation/src/main/java/com/threegap/bitnagil/presentation/report/ReportViewModel.kt
고정된 1000L 지연을 설정 가능한 MIN_LOADING_TIME(1500L) 상수로 변경.

예상 코드 리뷰 소요 시간

🎯 2 (Simple) | ⏱️ ~12분

토끼의 노래

🐰 글자를 세어주는 작은 숫자들이
사용자 손가락을 부드럽게 잡아주고
로딩은 조금 더 기다려 주며
모두 행복한 제보를 나눕니다 ✨📝

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 변경 사항의 주요 내용(글자수 제한 추가, 제보 최소 대기시간 수정)을 정확하게 요약하고 있습니다.
Description check ✅ Passed PR 설명이 관련 이슈, 스크린샷, 작업 설명, 리뷰어 주의사항을 포함하여 템플릿 요구사항을 충족합니다.
Linked Issues check ✅ Passed 모든 이슈 #179 요구사항이 구현되었습니다: 루틴 제목 글자수 제한, 제보 제목 글자수 제한, 로딩 UI 최소 시간 조정.
Out of Scope Changes check ✅ Passed 모든 변경사항이 이슈 #179의 범위 내에 있으며, 추가 범위 밖 변경사항은 없습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ui/#179-character_limit

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
presentation/src/main/java/com/threegap/bitnagil/presentation/report/ReportScreen.kt (1)

264-281: ⚠️ Potential issue | 🟠 Major

제목 필드에서 singleLine 제거 후 keyboardOptions 누락으로 Done 동작 미작동 가능성

singleLine = true가 제거되면서 TextField가 멀티라인이 되었는데, keyboardOptionsimeAction = ImeAction.Done이 명시되어 있지 않습니다. 이 경우 키보드에 Done 버튼 대신 Enter(줄바꿈) 버튼이 표시되어, Line 268-271의 KeyboardActions(onDone = { ... }) 콜백이 호출되지 않을 수 있습니다.

상세 제보 내용 필드(Line 308-309)에는 keyboardOptions = KeyboardOptions(imeAction = ImeAction.Done)이 설정되어 있으므로, 제목 필드에도 동일하게 추가해야 합니다.

🐛 수정 제안
 BitnagilTextField(
     value = uiState.reportTitle,
     onValueChange = onReportTitleChange,
+    keyboardOptions = KeyboardOptions(
+        imeAction = ImeAction.Done,
+    ),
     keyboardActions = KeyboardActions(
         onDone = {
             focusManager.clearFocus()
             onShowReportCategoryBottomSheet()
         },
     ),
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@presentation/src/main/java/com/threegap/bitnagil/presentation/report/ReportScreen.kt`
around lines 264 - 281, The title field BitnagilTextField is now multiline but
missing keyboardOptions so the ImeAction.Done won't appear and
KeyboardActions.onDone may not fire; update the BitnagilTextField invocation
(the one using value = uiState.reportTitle and onValueChange =
onReportTitleChange) to include keyboardOptions = KeyboardOptions(imeAction =
ImeAction.Done) so the keyboard shows a Done button that triggers the existing
KeyboardActions (which calls focusManager.clearFocus() and
onShowReportCategoryBottomSheet()).
🧹 Nitpick comments (2)
presentation/src/main/java/com/threegap/bitnagil/presentation/report/ReportViewModel.kt (1)

37-49: updateReportTitle/updateReportContent에도 동일한 truncation 권장

WriteRoutineViewModel.setRoutineName과 동일한 패턴으로, 붙여넣기 시 입력이 무시되는 문제가 있습니다. title.take(MAX_TITLE_LENGTH) / content.take(MAX_CONTENT_LENGTH)로 잘라서 반영하는 것이 일관되고 사용자 친화적입니다.

♻️ 제안
 fun updateReportTitle(title: String) {
     intent {
-        if (title.length > ReportState.MAX_TITLE_LENGTH) return@intent
-        reduce { state.copy(reportTitle = title) }
+        reduce { state.copy(reportTitle = title.take(ReportState.MAX_TITLE_LENGTH)) }
     }
 }

 fun updateReportContent(content: String) {
     intent {
-        if (content.length > ReportState.MAX_CONTENT_LENGTH) return@intent
-        reduce { state.copy(reportContent = content) }
+        reduce { state.copy(reportContent = content.take(ReportState.MAX_CONTENT_LENGTH)) }
     }
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@presentation/src/main/java/com/threegap/bitnagil/presentation/report/ReportViewModel.kt`
around lines 37 - 49, updateReportTitle and updateReportContent currently
abandon pasted input if it's too long; change them to truncate instead of
returning early by applying title.take(ReportState.MAX_TITLE_LENGTH) and
content.take(ReportState.MAX_CONTENT_LENGTH) before calling reduce so the
ViewModel always updates state (use state.copy(reportTitle = truncatedTitle) and
state.copy(reportContent = truncatedContent) inside the existing intent/reduce
blocks).
presentation/src/main/java/com/threegap/bitnagil/presentation/writeroutine/WriteRoutineViewModel.kt (1)

160-167: 입력값 잘림(truncation) 대신 무시(drop) 처리 시 붙여넣기 UX 문제 가능성

현재 name.length > MAX_ROUTINE_NAME_LENGTH일 때 입력 전체를 무시합니다. 사용자가 긴 텍스트를 붙여넣기하면 아무 변화가 없어 혼란을 줄 수 있습니다. name.take(MAX_ROUTINE_NAME_LENGTH)로 잘라서 반영하는 방식이 UX 측면에서 더 자연스럽습니다.

♻️ 제안
 fun setRoutineName(name: String) = intent {
-    if (name.length > WriteRoutineState.MAX_ROUTINE_NAME_LENGTH) return@intent
+    val trimmedName = name.take(WriteRoutineState.MAX_ROUTINE_NAME_LENGTH)
     reduce {
         state.copy(
-            routineName = name,
+            routineName = trimmedName,
         )
     }
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@presentation/src/main/java/com/threegap/bitnagil/presentation/writeroutine/WriteRoutineViewModel.kt`
around lines 160 - 167, The setRoutineName intent currently ignores the entire
input when name.length > WriteRoutineState.MAX_ROUTINE_NAME_LENGTH which breaks
paste UX; change it to truncate the input instead of returning by using
name.take(WriteRoutineState.MAX_ROUTINE_NAME_LENGTH) (or similar) so the reduce
call always updates state.routineName with either the full name or the truncated
substring; update the logic in setRoutineName to compute the effectiveName and
call state.copy(routineName = effectiveName).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In
`@presentation/src/main/java/com/threegap/bitnagil/presentation/report/ReportScreen.kt`:
- Around line 264-281: The title field BitnagilTextField is now multiline but
missing keyboardOptions so the ImeAction.Done won't appear and
KeyboardActions.onDone may not fire; update the BitnagilTextField invocation
(the one using value = uiState.reportTitle and onValueChange =
onReportTitleChange) to include keyboardOptions = KeyboardOptions(imeAction =
ImeAction.Done) so the keyboard shows a Done button that triggers the existing
KeyboardActions (which calls focusManager.clearFocus() and
onShowReportCategoryBottomSheet()).

---

Nitpick comments:
In
`@presentation/src/main/java/com/threegap/bitnagil/presentation/report/ReportViewModel.kt`:
- Around line 37-49: updateReportTitle and updateReportContent currently abandon
pasted input if it's too long; change them to truncate instead of returning
early by applying title.take(ReportState.MAX_TITLE_LENGTH) and
content.take(ReportState.MAX_CONTENT_LENGTH) before calling reduce so the
ViewModel always updates state (use state.copy(reportTitle = truncatedTitle) and
state.copy(reportContent = truncatedContent) inside the existing intent/reduce
blocks).

In
`@presentation/src/main/java/com/threegap/bitnagil/presentation/writeroutine/WriteRoutineViewModel.kt`:
- Around line 160-167: The setRoutineName intent currently ignores the entire
input when name.length > WriteRoutineState.MAX_ROUTINE_NAME_LENGTH which breaks
paste UX; change it to truncate the input instead of returning by using
name.take(WriteRoutineState.MAX_ROUTINE_NAME_LENGTH) (or similar) so the reduce
call always updates state.routineName with either the full name or the truncated
substring; update the logic in setRoutineName to compute the effectiveName and
call state.copy(routineName = effectiveName).

@l5x5l l5x5l requested a review from wjdrjs00 February 17, 2026 09:54
Copy link
Member

@wjdrjs00 wjdrjs00 left a comment

Choose a reason for hiding this comment

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

가로가 짧은 기기도 고려를 해야하군요..🤮 고생하셨숩니다~!

@l5x5l l5x5l merged commit 057eeb4 into develop Feb 17, 2026
2 checks passed
@l5x5l l5x5l deleted the ui/#179-character_limit branch February 17, 2026 12:44
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.

[UI] 글자수 제한 추가 및 제보 최소 대기시간 수정

2 participants