-
Notifications
You must be signed in to change notification settings - Fork 0
[Fix/#127] 네비게이션 스택이 중복으로 생성되는 문제를 해결합니다. #128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughHomeBottomNavigationBar가 현재 백스택 엔트리의 라우트( Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User as 사용자
participant UI as HomeBottomNavigationBar
participant Nav as NavController
User->>UI: 탭 클릭
UI->>Nav: currentBackStackEntry 조회
Nav-->>UI: currentRoute 반환
alt targetRoute != currentRoute
UI->>Nav: navigate(targetRoute, options)
Note right of Nav: options: popUpTo(0) { inclusive = true }
Nav-->>UI: 이동 완료
else 동일 라우트
UI-->>User: No-op (이동 없음)
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ 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)
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.
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 (4)
app/src/main/java/com/threegap/bitnagil/navigation/home/HomeBottomNavigationBar.kt (4)
33-33
: route 직접 비교 대신 hierarchy 사용 권장동적 파라미터/중첩 그래프에서 동일 탭임에도 불필요한 네비게이션/선택 표시 오류가 날 수 있습니다.
destination.hierarchy
기반으로 판단하도록 전환을 제안합니다.- val currentRoute = navBackStackEntry?.destination?.route + val currentDestination = navBackStackEntry?.destination(아래
selected
및 클릭 가드에서도currentDestination
를 사용)
56-63
: 현재 탭 재선택(reselect) UX 정의 필요동일 탭을 다시 누르면 아무 동작도 하지 않는데, 보편적으로는 루트로 pop하거나 리스트를 맨 위로 스크롤합니다. 제품 의도에 맞게 결정하고 반영하는 것을 권장합니다.
예시:
val inSameTab = currentDestination?.hierarchy?.any { it.route == homeRoute.route } == true if (!inSameTab) { // navigate (save/restore 포함) } else { // 예: 해당 탭 루트까지 pop navController.popBackStack(homeRoute.route, inclusive = false) }
64-64
: selected 계산도 hierarchy 기반으로 통일탭 내부의 하위 화면에 있을 때도 탭이 선택 상태로 보이도록 해야 합니다.
- selected = currentRoute == homeRoute.route, + selected = currentDestination?.hierarchy + ?.any { it.route == homeRoute.route } == true,
99-109
: 아이콘/텍스트 접근성 개선스크린리더 대응을 위해
contentDescription
(혹은semantics { contentDescription = title }
)을 제공하세요. 현재는indication = null
로 리플도 비활성화되어 있어 시각적/보조기술 피드백이 부족합니다.예시:
BitnagilIcon( id = icon, modifier = Modifier.size(24.dp), tint = contentTintColor, contentDescription = title, // BitnagilIcon이 지원한다면 )또는
Column( modifier = modifier .semantics { contentDescription = title } .clickable( ... ) .padding(4.dp), ... )
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
app/src/main/java/com/threegap/bitnagil/navigation/home/HomeBottomNavigationBar.kt
(2 hunks)
⏰ 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
app/src/main/java/com/threegap/bitnagil/navigation/home/HomeBottomNavigationBar.kt
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다! 🚀
[ PR Content ]
Related issue
Screenshot 📸
Work Description
To Reviewers 📢
Summary by CodeRabbit