[Hotfix] 탐색화면 키보드 및 뒤로가기 backstack 이슈 해결#68
Conversation
스플래시 화면에서 탐색 화면으로 이동할 때 기존 백스택을 제거하도록 네비게이션 로직을 수정하고, 릴리스 자동화 워크플로우와 UI 레이아웃을 일부 개선했습니다.
- **네비게이션 로직 수정 (`FestabookScreen.kt`)**:
- 스플래시 화면에서 탐색(`Explore`) 화면으로 이동 시, `popUpTo`와 `inclusive = true` 옵션을 추가하여 백스택에서 스플래시 화면을 제거하도록 변경했습니다.
- **CI 워크플로우 업데이트 (`android-release-drafter.yml`)**:
- `local.properties` 생성 시 이미지 관련 API 엔드포인트(`IMAGE_BASE_URL`, `IMAGE_BASE_URL_DEV`)를 추가하도록 수정했습니다.
- 파일 쓰기 방식을 덮어쓰기(`>`)에서 추가(`>>`) 방식으로 통일하여 설정 누락을 방지했습니다.
- **UI 레이아웃 수정 (`ExploreSearchContent.kt`)**:
- 탐색 검색 바 상단의 불필요한 패딩(20.dp)을 제거하여 화면 구성을 최적화했습니다.
검색 모드(`isSearchMode`)에 따라 전체 화면을 교체하던 방식에서, 로고와 검색창은 고정하고 하단 결과 영역만 `AnimatedContent`로 전환하도록 레이아웃 구조를 리팩터링했습니다. 이를 통해 불필요한 코드 중복을 제거하고 시각적인 일관성을 높였습니다.
- **`ExploreScreen.kt` 수정:**
- **레이아웃 구조 단순화**: 검색 모드 여부와 상관없이 로고와 검색창(`ExploreSearchBar`)이 상단에 유지되도록 `AnimatedContent` 외부로 분리했습니다.
- **검색 결과 표시 로직 변경**: 검색 모드일 때만 `ExploreSearchResultList`가 표시되도록 변경하고, `weight(1f)`를 적용하여 가용 영역을 효율적으로 사용하도록 수정했습니다.
- **컴포넌트 정리**: 기존에 검색 모드 시 중복으로 정의되었던 로고 및 검색창 관련 코드를 제거하고 단일 `Column` 구조로 통합했습니다.
둘러보기 화면(`ExploreScreen`)에서 검색 창 외 빈 공간을 터치했을 때 활성화된 키보드가 자동으로 닫히도록 개선하고, 전반적인 레이아웃 여백을 조정했습니다.
- **`ExploreScreen.kt` 수정:**
- 최상위 `Box` 레이아웃에 `clickable` modifier를 추가하여, 화면 터치 시 `keyboardController`를 통해 키보드를 숨기도록 구현했습니다. 이때 별도의 클릭 피드백(`indication`, `interactionSource`)은 발생하지 않도록 설정했습니다.
- 검색 로고와 입력창을 포함하는 `Column` 상단에 `16.dp` 여백을 추가하여 UI 답답함을 해소했습니다.
앱의 버전 코드와 버전 이름을 업데이트했습니다.
- **`app/build.gradle.kts` 수정**:
- `versionCode`를 `20_000`에서 `20_001`로 변경했습니다.
- `versionName`을 `v 2.0.0`에서 `v 2.0.1`로 변경했습니다.
📝 WalkthroughWalkthrough이 PR은 안드로이드 앱의 버전을 v2.0.0에서 v2.0.1로 업그레이드하고, CI/CD 워크플로우에 이미지 기본 URL 설정을 추가하며, 네비게이션 스택 관리를 개선하고 탐색 화면의 레이아웃을 리팩토링합니다. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@app/src/main/java/com/daedan/festabook/presentation/explore/component/ExploreScreen.kt`:
- Around line 184-191: 현재 문제는 weight(1f)가 AnimatedContent의 콘텐츠
람다(AnimatedContentScope) 내부에서 적용되어 부모 Column의 레이아웃에 영향을 주지 않아 레이아웃 불일치가 발생하는
것입니다; 수정하려면 AnimatedContent 자체에 Modifier.weight(1f)를 적용하고
ExploreSearchResultList 내부에서는 fillMaxSize()로 크기를 맞추거나(즉 ExploreSearchResultList의
Modifier.weight 제거, 대신 Modifier.fillMaxSize()), 대안으로는 검색 모드가 아닐 때만 하단 Spacer를
렌더링하도록(isSearchMode를 확인하여 if (!isSearchMode) { Spacer(modifier =
Modifier.weight(0.7f)) }) 변경하여 검색/비검색 상태 간 레이아웃 분산을 일치시키세요.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: a5159a99-09e1-40d4-8762-caecf8185031
📒 Files selected for processing (5)
.github/workflows/android-release-drafter.ymlapp/build.gradle.ktsapp/src/main/java/com/daedan/festabook/presentation/FestabookScreen.ktapp/src/main/java/com/daedan/festabook/presentation/explore/component/ExploreScreen.ktapp/src/main/java/com/daedan/festabook/presentation/explore/component/ExploreSearchContent.kt
| if (searching) { | ||
| ExploreSearchResultList( | ||
| searchState = searchState, | ||
| onUniversitySelect = onUniversitySelect, | ||
| modifier = Modifier.weight(1f), | ||
| ) | ||
|
|
||
| Spacer(modifier = Modifier.height(24.dp)) | ||
|
|
||
| Box(modifier = Modifier.padding(horizontal = 20.dp)) { | ||
| ExploreSearchContent( | ||
| query = query, | ||
| searchState = searchState, | ||
| onQueryChange = onQueryChange, | ||
| onUniversitySelect = onUniversitySelect, | ||
| ) | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
cd app/src/main/java/com/daedan/festabook/presentation/explore/component && pwdRepository: festabook/android
Length of output: 149
🏁 Script executed:
# First, let's find and read the ExploreScreen.kt file
find . -name "ExploreScreen.kt" -type fRepository: festabook/android
Length of output: 149
🏁 Script executed:
# Check the file structure in the explore directory
ls -la app/src/main/java/com/daedan/festabook/presentation/explore/component/Repository: festabook/android
Length of output: 596
🏁 Script executed:
# Read ExploreScreen.kt around lines 184-191 with context
cat -n app/src/main/java/com/daedan/festabook/presentation/explore/component/ExploreScreen.kt | sed -n '170,205p'Repository: festabook/android
Length of output: 1521
🏁 Script executed:
# Find ExploreSearchResultList.kt
find . -name "ExploreSearchResultList.kt" -type fRepository: festabook/android
Length of output: 159
🏁 Script executed:
# Read the ExploreSearchResultList.kt file, especially around lines 26-31
cat -n app/src/main/java/com/daedan/festabook/presentation/explore/component/ExploreSearchResultList.ktRepository: festabook/android
Length of output: 3508
🏁 Script executed:
# Get the complete context of ExploreScreen.kt around the AnimatedContent
cat -n app/src/main/java/com/daedan/festabook/presentation/explore/component/ExploreScreen.kt | sed -n '150,210p'Repository: festabook/android
Length of output: 2576
🏁 Script executed:
# Check if AnimatedContent has modifier parameter used elsewhere in the code
cat -n app/src/main/java/com/daedan/festabook/presentation/explore/component/ExploreScreen.kt | sed -n '130,200p'Repository: festabook/android
Length of output: 2984
🏁 Script executed:
# Search for any conditional rendering of the Spacer at line 193
rg "weight\(0\.7f\)" app/src/main/java/com/daedan/festabook/presentation/explore/component/ -B 3 -A 3Repository: festabook/android
Length of output: 797
Modifier.weight(1f)가 AnimatedContent 내부에서 동작하지 않습니다.
Modifier.weight()는 ColumnScope 또는 RowScope의 확장 함수입니다. 라인 188의 weight(1f) 수정자는 AnimatedContent의 콘텐츠 람다(AnimatedContentScope) 내부에 있으므로, 부모 Column의 레이아웃 분배에 영향을 주지 않습니다.
또한 ExploreSearchResultList 내부에서 fillMaxSize()를 사용하고 있어, 검색 모드 활성화 시 로고와 검색창이 화면 밖으로 밀려날 수 있습니다. AnimatedContent 자체에 weight 수정자가 없어서, 검색 상태와 비검색 상태 간 레이아웃 불일치가 발생합니다.
🛠️ 권장 수정 방안
AnimatedContent에 weight(1f) 수정자를 적용하고, 내부 컴포저블에서 fillMaxSize()를 사용하세요:
- AnimatedContent(
+ AnimatedContent(
+ modifier = Modifier.weight(1f),
targetState = isSearchMode,
transitionSpec = {
ContentTransform(
targetContentEnter = fadeIn(tween(200)),
initialContentExit = fadeOut(tween(200)),
)
},
) { searching ->
if (searching) {
ExploreSearchResultList(
searchState = searchState,
onUniversitySelect = onUniversitySelect,
- modifier = Modifier.weight(1f),
+ modifier = Modifier.fillMaxSize(),
)
+ } else {
+ Spacer(modifier = Modifier.fillMaxSize())
}
}
-
- Spacer(modifier = Modifier.weight(0.7f))또는 검색 모드가 아닐 때만 하단 Spacer를 표시하는 방식:
if (!isSearchMode) {
Spacer(modifier = Modifier.weight(0.7f))
}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@app/src/main/java/com/daedan/festabook/presentation/explore/component/ExploreScreen.kt`
around lines 184 - 191, 현재 문제는 weight(1f)가 AnimatedContent의 콘텐츠
람다(AnimatedContentScope) 내부에서 적용되어 부모 Column의 레이아웃에 영향을 주지 않아 레이아웃 불일치가 발생하는
것입니다; 수정하려면 AnimatedContent 자체에 Modifier.weight(1f)를 적용하고
ExploreSearchResultList 내부에서는 fillMaxSize()로 크기를 맞추거나(즉 ExploreSearchResultList의
Modifier.weight 제거, 대신 Modifier.fillMaxSize()), 대안으로는 검색 모드가 아닐 때만 하단 Spacer를
렌더링하도록(isSearchMode를 확인하여 if (!isSearchMode) { Spacer(modifier =
Modifier.weight(0.7f)) }) 변경하여 검색/비검색 상태 간 레이아웃 분산을 일치시키세요.
#️⃣ 이슈 번호
🛠️ 작업 내용
🙇🏻 중점 리뷰 요청
📸 이미지 첨부 (Optional)
Screen_Recording_20260305_152500_.Debug.Festabook.mp4
Screen_Recording_20260305_152528_One.UI.Home.mp4