-
Notifications
You must be signed in to change notification settings - Fork 0
[FIX] 튜토리얼 화면 기기별 대응 #64
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
- OnboardingScreen을 상태를 가지지 않는 `OnboardingScreen`과 상태를 주입하는 `OnboardingRoute`로 분리하여 역할과 책임을 명확히 했습니다. - `collectAsState`를 `collectAsStateWithLifecycle`로 변경하여 라이프사이클을 고려한 UI 상태 수집을 하도록 수정했습니다.
- 기존 Composable로 구현되었던 배경을 이미지 리소스로 대체했습니다. - 다양한 해상도를 지원하기 위해 `drawable` 폴더별로 이미지를 추가했습니다.
- `NearFrame` 컴포저블에 `applySystemBarsPadding` 파라미터를 추가하여, 시스템 바(상태 바) 패딩 적용 여부를 선택할 수 있도록 수정했습니다. - `OnboardingScreen`에서 `NearFrame` 사용 시 상단 패딩을 제거하기 위해 `applySystemBarsPadding` 값을 `false`로 설정했습니다.
- 온보딩 화면의 레이아웃 간격을 조정했습니다.
- 온보딩 화면의 레이아웃을 `weight`를 사용하여 보다 유연하게 조정했습니다. - 컴포넌트 간 간격을 `Spacer`를 활용하여 일관성 있게 수정했습니다. - `DevicePreview`를 적용하여 다양한 디바이스에서의 화면을 확인할 수 있도록 개선했습니다.
다양한 기기 해상도에서 컴포즈 화면을 쉽게 테스트할 수 있도록 공용 프리뷰 컴포넌트와 디바이스 스펙을 추가했습니다. - `DevicePreviewFrame`: 지정된 기기 해상도로 프리뷰 캔버스를 렌더링하는 컴포저블 - `DevicePreviewSpec`: 기기명, 너비(dp), 높이(dp)를 포함하는 데이터 클래스 - `DevicePreviewParameterProvider`: 삼성 기기들의 해상도 스펙을 제공하여 프리뷰에서 활용
Summary of ChangesHello @stopstone, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 PR은 튜토리얼 화면의 사용자 경험을 개선하기 위해 다양한 기기에서의 UI 일관성을 확보하는 데 중점을 둡니다. 이를 위해 화면 레이아웃을 조정하고, 새로운 배경 이미지를 추가했으며, 개발자가 여러 기기에서 UI를 쉽게 테스트할 수 있도록 프리뷰 기능을 강화했습니다. 또한, 시스템 바 패딩 처리를 유연하게 할 수 있도록 핵심 UI 컴포넌트를 리팩토링했습니다. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
튜토리얼 화면의 기기별 대응을 위한 리팩토링 작업이 인상적입니다. OnboardingScreen을 상태 없는(stateless) 컴포저블로 분리하고 OnboardingRoute를 도입하여 테스트 용이성과 코드 구조를 개선한 점이 좋습니다. 또한 PreviewParameter를 활용해 다양한 기기에서 UI를 쉽게 확인할 수 있도록 개선한 점도 훌륭합니다. 전반적으로 PR의 목표를 잘 달성했으며, 코드 품질을 높이는 좋은 변경이라고 생각합니다. 몇 가지 개선점을 제안드립니다.
| val columnModifier = | ||
| if (applySystemBarsPadding) { | ||
| baseModifier.padding(top = statusBarHeightDp, bottom = navigationBarHeightDp) | ||
| } else { | ||
| baseModifier.padding(bottom = navigationBarHeightDp) | ||
| } |
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.
applySystemBarsPadding 파라미터가 false일 때의 로직이 의도와 다르게 동작할 수 있습니다. 현재 구현에서는 false일 때도 navigationBarHeightDp 만큼의 하단 패딩이 적용됩니다.
OnboardingScreen에서 applySystemBarsPadding = false로 NearFrame을 호출하고, 내부 Column에 다시 padding(bottom = navigationBarHeightDp)을 적용하고 있어 하단 패딩이 중복으로 적용됩니다.
applySystemBarsPadding이 false일 때는 NearFrame에서 시스템 바 관련 패딩을 전혀 적용하지 않도록 수정하여, 각 화면에서 패딩을 완전히 제어할 수 있도록 하는 것이 더 명확하고 재사용성이 높을 것 같습니다.
| val columnModifier = | |
| if (applySystemBarsPadding) { | |
| baseModifier.padding(top = statusBarHeightDp, bottom = navigationBarHeightDp) | |
| } else { | |
| baseModifier.padding(bottom = navigationBarHeightDp) | |
| } | |
| val columnModifier = | |
| if (applySystemBarsPadding) { | |
| baseModifier.padding(top = statusBarHeightDp, bottom = navigationBarHeightDp) | |
| } else { | |
| baseModifier | |
| } |
| modifier = Modifier.fillMaxSize(), | ||
| painter = painterResource(R.drawable.onboarding_bg_img), | ||
| contentDescription = null, | ||
| contentScale = ContentScale.FillBounds, |
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.
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.
Gemini의 리뷰대로 Crop은 이미지가 잘릴 수도 있다는 점에서 수정하지 않고 FillBounds로 남겨두겠습니다.
- `run`과 `when`을 사용하여 `applySystemBarsPadding`에 따른 패딩 적용 로직을 더 간결하게 변경했습니다. - 기존에 항상 적용되던 하단 네비게이션 바 패딩이 `applySystemBarsPadding`이 `false`일 때는 적용되지 않도록 수정했습니다.
|
previewParameter를 활용해보았습니다..! 😀 |
- 온보딩 화면의 각 페이지 콘텐츠가 다른 기기에서도 깨지지 않도록 레이아웃을 수정했습니다. - `HorizontalPager`와 이미지의 `weight`를 조정하여 화면 크기에 따라 유연하게 대응하도록 변경했습니다.
rhkrwngud445
left a 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.
적용해주신 Preview 위치 좋아보입니다!
따로 리뷰 드릴 부분이 안보여서 바로 머지주셔도 좋을 것 같아요!
(돌려보지는.. 못했습니다😂)
작업 내용
확인 방법
참고 사항
활용법은 다음과 같습니다.
관련 이슈