Skip to content

Conversation

@heewon411
Copy link
Collaborator

@heewon411 heewon411 commented Jan 9, 2026

🔗 관련 이슈 (선택)

closes #366

✨ 작업 내용

전체 화면이 스크롤되게 UI 수정하기

✅ 코드 리뷰어 체크리스트

리뷰어가 확인해야할 부분

  • 틈 요청 기록화면에서 전체 화면이 스크롤되는지 확인해주세요

📸 스크린샷 (선택)

없음

💬 기타 참고 사항

x

Summary by CodeRabbit

  • UI/UX 개선
    • 전체를 스크롤 가능한 레이아웃으로 전환해 더 부드러운 사용 경험 제공
    • 캘린더 헤더 재구성(뒤로가기·제목 이동, 선택된 날짜 표시, 이전/다음 네비게이션 추가)
    • 캘린더 뷰와 요일 행 추가로 달력 탐색성 향상
    • 달력 월 변경 시 요청 목록이 초기화되고 목록 표시가 자동으로 갱신/숨김 처리됨

✏️ Tip: You can customize this high-level summary in your review settings.

@heewon411 heewon411 requested review from Santoragi and sehyeo January 9, 2026 12:16
@heewon411 heewon411 self-assigned this Jan 9, 2026
@heewon411 heewon411 added the ♻️refactor 코드를 리팩토링 합니다. label Jan 9, 2026
@heewon411 heewon411 linked an issue Jan 9, 2026 that may be closed by this pull request
1 task
@coderabbitai
Copy link

coderabbitai bot commented Jan 9, 2026

📝 Walkthrough

Walkthrough

레이아웃을 NestedScrollView로 변경해 전체 화면 스크롤을 지원하도록 하고, Fragment에서 RecyclerView 초기화 순서를 앞당겨 setupRecyclerView()를 먼저 호출하도록 조정했으며, 캘린더 월 변경 시 RecyclerView를 숨기고 어댑터 목록을 초기화하도록 추가했습니다.

Changes

코호트 / 파일(s) 변경 사항
레이아웃 구조 변경
app/src/main/res/layout/fragment_friend_teum_request.xml
루트를 ConstraintLayout에서 NestedScrollView로 교체, 헤더 구조 재배치(뒤로가기 버튼·제목·캘린더 네비게이션 분리), 캘린더뷰 및 요일행 추가, divider2 아래에 RecyclerView 배치 및 tools:listitem 지정
Fragment 초기화·로직 조정
app/src/main/java/com/example/teumteum/ui/friend/FriendTeumRequestFragment.kt
setupRecyclerView() 호출 위치를 setupCalendar() 앞로 이동해 초기화 순서 변경, onViewCreated의 인라인 어댑터 초기화 제거(중앙화), 월 변경 시 RecyclerView 숨김 및 adapter.submitList(emptyList())로 목록 초기화 추가. 일부 포맷/가시성 할당 경미 변경 포함

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested reviewers

  • sehyeo
  • Santoragi
🚥 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목은 전체 화면 스크롤 UI 수정이라는 주요 변경 사항을 명확하게 요약하고 있으며, 이는 코드 변경의 핵심 목표와 일치합니다.
Linked Issues check ✅ Passed 레이아웃 XML에서 NestedScrollView로 루트 변경 및 RecyclerView 추가로 전체 화면 스크롤 기능이 구현되었으며, Kotlin 파일의 RecyclerView 초기화 순서 변경과 월 변경 시 리스트 초기화가 스크롤 동작을 지원합니다.
Out of Scope Changes check ✅ Passed 모든 변경 사항이 전체 화면 스크롤 UI 리팩토링과 관련 있으며, 기능 변경 없이 UI 구조 개선에만 집중하고 있습니다.

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


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.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @app/src/main/res/layout/fragment_friend_teum_request.xml:
- Around line 28-40: The TextView with id textView2 uses
android:textSize="20dp"; change the unit to sp so system font scaling is
respected by replacing the dp unit with sp (e.g., set android:textSize="20sp")
on the TextView with id textView2 and ensure no other textSize attributes nearby
use dp.
🧹 Nitpick comments (1)
app/src/main/res/layout/fragment_friend_teum_request.xml (1)

128-142: RecyclerView의 중첩 스크롤 설정이 올바릅니다.

Line 138의 nestedScrollingEnabled="false" 설정은 NestedScrollView 내부에서 RecyclerView가 올바르게 작동하도록 하는 필수 설정입니다. 이를 통해 부모와 자식 간의 스크롤 충돌을 방지합니다.

Line 137에서 visibility="visible"로 설정되어 있지만, Fragment 코드(line 260)에서는 초기에 isVisible = false로 설정하고 있습니다. XML에서도 android:visibility="gone"으로 설정하면 더 일관성 있는 코드가 됩니다.

♻️ 선택적 개선 사항
-            android:visibility="visible"
+            android:visibility="gone"
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8645459 and 4f86cfa.

📒 Files selected for processing (2)
  • app/src/main/java/com/example/teumteum/ui/friend/FriendTeumRequestFragment.kt
  • app/src/main/res/layout/fragment_friend_teum_request.xml
🧰 Additional context used
📓 Path-based instructions (2)
app/src/**/ui/**

⚙️ CodeRabbit configuration file

app/src/**/ui/**: [UI(Kotlin) 점검]

  • ViewBinding 생명주기: Fragment는 onDestroyView()에서 binding=null 처리, 외부에 뷰 참조 보관 금지.
  • 수명주기 안전 수집: repeatOnLifecycle + viewLifecycleOwner 사용, GlobalScope 금지, cancel 처리 확인.
  • 리스트/어댑터: DiffUtil 사용, notifyDataSetChanged 지양, ViewHolder 바인딩 최소화.
  • 상태 반영: 중복 네비게이션/중복 클릭 방지, 단발성 이벤트는 SharedFlow/Channel로 처리.

Files:

  • app/src/main/java/com/example/teumteum/ui/friend/FriendTeumRequestFragment.kt
app/src/main/res/layout/**/*.xml

⚙️ CodeRabbit configuration file

app/src/main/res/layout/**/*.xml: [Layout 점검]

  • 구조: include/merge 적절 활용으로 중첩 최소화, 재사용성 확보.
  • ConstraintLayout: 제약 조건 충돌/경고 여부, 체인/가이드라인/Barrier 등으로 가로세로 정렬 일관성.
  • 성능: 중첩 뷰 최소화, 불필요한 weights 제거, list item 레이아웃은 경량 설계.
  • 미리보기용 tools: 속성 적극 활용(visibility, text 등), runtime 빌드에 영향 없게 유지.
  • 이미지: 벡터 드로어블 우선, 큰 비트맵은 적절한 크기/압축 사용.

Files:

  • app/src/main/res/layout/fragment_friend_teum_request.xml
🧬 Code graph analysis (1)
app/src/main/java/com/example/teumteum/ui/friend/FriendTeumRequestFragment.kt (4)
app/src/main/java/com/example/teumteum/ui/friend/FriendTodoListFragment.kt (2)
  • setupRecyclerView (238-242)
  • circleFill (268-273)
app/src/main/java/com/example/teumteum/ui/friend/FriendPromiseFragment.kt (2)
  • setupRecyclerView (239-245)
  • circleFill (282-287)
app/src/main/java/com/example/teumteum/ui/main/HomeFragment.kt (1)
  • circleFill (846-851)
app/src/main/java/com/example/teumteum/ui/friend/FriendRoommateDateFragment.kt (1)
  • circleFill (296-301)
🔇 Additional comments (4)
app/src/main/java/com/example/teumteum/ui/friend/FriendTeumRequestFragment.kt (3)

78-78: 초기화 순서 변경이 적절합니다.

RecyclerView 설정을 캘린더 설정보다 먼저 호출하도록 순서를 변경한 것은 전체 화면 스크롤 구조에 맞게 리팩토링한 것으로 보입니다. 두 컴포넌트 간 의존성이 없으므로 안전한 변경입니다.


136-138: 월 변경 시 리스트 초기화 로직이 좋습니다.

달이 변경될 때 RecyclerView를 숨기고 기존 데이터를 비우는 것은 사용자가 이전 월의 데이터를 보지 않도록 하는 좋은 UX 패턴입니다. submitList(emptyList())를 사용하여 DiffUtil을 통해 효율적으로 처리하고 있습니다.


256-261: RecyclerView 설정이 올바릅니다.

RecyclerView 초기화 로직이 다른 Fragment들(FriendTodoListFragment, FriendPromiseFragment)과 일관된 패턴을 따르고 있으며, 초기에는 숨김 처리하고 데이터가 있을 때만 표시하는 방식이 적절합니다.

app/src/main/res/layout/fragment_friend_teum_request.xml (1)

2-9: NestedScrollView 설정이 전체 화면 스크롤에 적합합니다.

루트 레이아웃을 NestedScrollView로 변경하고 fillViewport="true"overScrollMode="never" 속성을 추가한 것은 PR 목표인 전체 화면 스크롤을 구현하기에 적절한 구조입니다.

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

🤖 Fix all issues with AI agents
In @app/src/main/res/layout/fragment_friend_teum_request.xml:
- Around line 53-83: The previous/next calendar ImageViews
(calendar_previous_date_iv and calendar_next_date_iv) lack accessibility and
proper touch feedback; replace them with ImageButton or make them accessible by
adding meaningful contentDescription attributes, set clickable="true" and
focusable="true", ensure a visible touch/ripple feedback (e.g., use
?attr/selectableItemBackgroundBorderless as foreground/background) and guarantee
minimum touch target (minWidth/minHeight or padding to reach 48dp). Update the
layout for both calendar_previous_date_iv and calendar_next_date_iv accordingly
so screen readers announce their purpose and users get visual/touch feedback.
- Around line 127-143: The RecyclerView with id requestHistoryRecyclerView uses
wrap_content and nestedScrollingEnabled="false" which is acceptable for
single-date loads via getTeumRequestsByDate(date) but may suffer if one date
returns many items; update the adapter for requestHistoryRecyclerView to use a
DiffUtil.ItemCallback and ListAdapter (or implement DiffUtil.DiffResult updates)
so updates are efficient for large single-day result sets, and keep
nestedScrollingEnabled as needed or switch to match_parent if layout/scroll
behavior requires it.
🧹 Nitpick comments (3)
app/src/main/res/layout/fragment_friend_teum_request.xml (3)

2-13: 하드코딩 색상(#FFFFFF) 대신 테마/리소스 사용 권장

다크모드/테마 대응을 위해 android:background="#FFFFFF"?attr/colorBackground 또는 @color/...로 교체하는 게 안전합니다. (구분선 #EAEAEA도 동일)


15-40: 상단 여백(70dp) 하드코딩은 인셋 환경에서 깨질 수 있음 + 문자열 리소스화 권장

layout_marginTop="70dp"는 상태바/노치/폰트 스케일에 따라 어긋날 수 있어, 인셋 기반 처리(또는 공통 툴바/앱바 사용)로 맞추는 쪽이 안정적입니다. 또한 android:text, android:contentDescription의 리터럴은 @string/...로 빼는 게 좋습니다.


53-65: 런타임 텍스트/색상 하드코딩은 tools 속성/리소스로 분리 권장

selected_date_tv"2025년 6월"은 실제 값이 코드에서 세팅되는 성격이면 android:text 대신 tools:text로 미리보기만 주는 편이 안전합니다. 구분선 색상도 리소스화 권장입니다.

Also applies to: 115-125

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4f86cfa and 1551a55.

📒 Files selected for processing (1)
  • app/src/main/res/layout/fragment_friend_teum_request.xml
🧰 Additional context used
📓 Path-based instructions (1)
app/src/main/res/layout/**/*.xml

⚙️ CodeRabbit configuration file

app/src/main/res/layout/**/*.xml: [Layout 점검]

  • 구조: include/merge 적절 활용으로 중첩 최소화, 재사용성 확보.
  • ConstraintLayout: 제약 조건 충돌/경고 여부, 체인/가이드라인/Barrier 등으로 가로세로 정렬 일관성.
  • 성능: 중첩 뷰 최소화, 불필요한 weights 제거, list item 레이아웃은 경량 설계.
  • 미리보기용 tools: 속성 적극 활용(visibility, text 등), runtime 빌드에 영향 없게 유지.
  • 이미지: 벡터 드로어블 우선, 큰 비트맵은 적절한 크기/압축 사용.

Files:

  • app/src/main/res/layout/fragment_friend_teum_request.xml

Comment on lines +53 to +83
<TextView
android:id="@+id/selected_date_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="38dp"
android:fontFamily="@font/pretendard_medium"
android:text="2025년 6월"
android:textColor="@color/text_primary"
android:textSize="20sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<LinearLayout
android:id="@+id/calendar_weekdays_row"
android:layout_marginStart="5dp"
android:layout_marginEnd="5dp"
android:layout_marginTop="20dp"
<ImageView
android:id="@+id/calendar_previous_date_iv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="20dp"
android:src="@drawable/previous"
app:layout_constraintEnd_toStartOf="@id/calendar_next_date_iv"
app:layout_constraintTop_toTopOf="@id/selected_date_tv" />

<ImageView
android:id="@+id/calendar_next_date_iv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="20dp"
android:src="@drawable/next"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/selected_date_tv" />

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

캘린더 이전/다음 버튼 접근성(a11y) 누락 + 클릭 피드백/터치 타깃 보장 필요

calendar_previous_date_iv, calendar_next_date_ivcontentDescription이 없고 ImageView라 클릭 요소로 인지되지 않을 수 있습니다(코드에서 클릭을 달아도 a11y가 약해짐). ImageButton으로 전환하거나 최소한 clickable/focusable/foregroundcontentDescription을 추가해 주세요.

Proposed diff
-            <ImageView
+            <ImageButton
                 android:id="@+id/calendar_previous_date_iv"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_marginEnd="20dp"
                 android:src="@drawable/previous"
+                android:background="?attr/selectableItemBackgroundBorderless"
+                android:contentDescription="@string/cd_calendar_prev_month"
+                android:padding="8dp"
                 app:layout_constraintEnd_toStartOf="@id/calendar_next_date_iv"
                 app:layout_constraintTop_toTopOf="@id/selected_date_tv" />

-            <ImageView
+            <ImageButton
                 android:id="@+id/calendar_next_date_iv"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_marginEnd="20dp"
                 android:src="@drawable/next"
+                android:background="?attr/selectableItemBackgroundBorderless"
+                android:contentDescription="@string/cd_calendar_next_month"
+                android:padding="8dp"
                 app:layout_constraintEnd_toEndOf="parent"
                 app:layout_constraintTop_toTopOf="@id/selected_date_tv" />

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

🤖 Prompt for AI Agents
In @app/src/main/res/layout/fragment_friend_teum_request.xml around lines 53 -
83, The previous/next calendar ImageViews (calendar_previous_date_iv and
calendar_next_date_iv) lack accessibility and proper touch feedback; replace
them with ImageButton or make them accessible by adding meaningful
contentDescription attributes, set clickable="true" and focusable="true", ensure
a visible touch/ripple feedback (e.g., use
?attr/selectableItemBackgroundBorderless as foreground/background) and guarantee
minimum touch target (minWidth/minHeight or padding to reach 48dp). Update the
layout for both calendar_previous_date_iv and calendar_next_date_iv accordingly
so screen readers announce their purpose and users get visual/touch feedback.

Comment on lines +127 to 143
<!-- RecyclerView: 틈 요청 기록 리스트 -->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/requestHistoryRecyclerView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
app:cv_dayViewResource="@layout/calendar_day_layout"
app:cv_orientation="horizontal"
app:cv_outDateStyle="endOfRow"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:layout_marginTop="38dp"
android:clipToPadding="false"
android:paddingBottom="24dp"
android:visibility="visible"
android:nestedScrollingEnabled="false"
app:layout_constraintTop_toBottomOf="@id/divider2"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/calendar_weekdays_row" />
tools:listitem="@layout/item_request_history" />

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

fd "fragment_friend_teum_request.xml" --type f

Repository: UMC8-TeumTeum/FE

Length of output: 116


🏁 Script executed:

cat -n app/src/main/res/layout/fragment_friend_teum_request.xml | head -160

Repository: UMC8-TeumTeum/FE

Length of output: 7566


🏁 Script executed:

rg "requestHistoryRecyclerView|RequestHistoryAdapter" --type java --type kotlin -A 5

Repository: UMC8-TeumTeum/FE

Length of output: 2748


🏁 Script executed:

rg "NestedScrollView" app/src/main/res/layout/fragment_friend_teum_request.xml -B 5 -A 10

Repository: UMC8-TeumTeum/FE

Length of output: 803


🏁 Script executed:

rg "TeumRequestAdapter|RequestHistoryAdapter" --type java --type kotlin -l

Repository: UMC8-TeumTeum/FE

Length of output: 216


🏁 Script executed:

rg "class.*Adapter.*TeumRequest|class.*Adapter.*RequestHistory" --type java --type kotlin -A 10

Repository: UMC8-TeumTeum/FE

Length of output: 42


🏁 Script executed:

rg "submitList|TeumRequestDateResult" --type java --type kotlin -B 3 -A 3

Repository: UMC8-TeumTeum/FE

Length of output: 20878


🏁 Script executed:

cat -n app/src/main/java/com/example/teumteum/ui/friend/adapter/TeumRequestAdapter.kt

Repository: UMC8-TeumTeum/FE

Length of output: 7489


🏁 Script executed:

cat -n app/src/main/java/com/example/teumteum/ui/friend/FriendTeumRequestFragment.kt | grep -A 20 "loadTeumRequestsByDate"

Repository: UMC8-TeumTeum/FE

Length of output: 840


RecyclerView의 wrap_content 크기 설정은 최적이 아니나, 일일 단위 데이터 로딩이 성능 리스크를 완화함

현재 구조에서는 캘린더에서 날짜를 선택할 때마다 해당 날짜의 요청만 API로 조회하므로(getTeumRequestsByDate(date)), 전체 달의 데이터를 한 번에 로드하는 상황이 아닙니다. 따라서 wrap_content + nestedScrollingEnabled=false의 성능 영향이 월간 대량 데이터보다는 제한적입니다.

다만 개선 가능한 점:

  • 단일 날짜에 요청이 많은 경우에 대비해 DiffUtil 기반 어댑터 업데이트 사용 검토
  • 단일 날짜 요청 개수가 보장된다면 현재 구조는 수용 가능
🤖 Prompt for AI Agents
In @app/src/main/res/layout/fragment_friend_teum_request.xml around lines 127 -
143, The RecyclerView with id requestHistoryRecyclerView uses wrap_content and
nestedScrollingEnabled="false" which is acceptable for single-date loads via
getTeumRequestsByDate(date) but may suffer if one date returns many items;
update the adapter for requestHistoryRecyclerView to use a DiffUtil.ItemCallback
and ListAdapter (or implement DiffUtil.DiffResult updates) so updates are
efficient for large single-day result sets, and keep nestedScrollingEnabled as
needed or switch to match_parent if layout/scroll behavior requires it.

@heewon411 heewon411 merged commit a4a6c50 into dev Jan 10, 2026
1 check passed
@sehyeo sehyeo deleted the refactor/#366-teum-request-scroll branch January 10, 2026 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

♻️refactor 코드를 리팩토링 합니다. 🐰희원🐰

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[REFACTOR] 틈 요청 기록 전체 화면 스크롤되게 수정

2 participants