-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/#164 edge to edge screen #165
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
Walkthroughμ΄ λ³κ²½μ¬νμ μλλ‘μ΄λ μ±μ Edge-to-Edge νλ©΄ λμμ μν΄ UI λ μ΄μμμ Window Insets(μμ€ν
λ° μμ λ±) μ²λ¦¬λ₯Ό μ λ©΄μ μΌλ‘ κ°μ ν©λλ€. Changes
Sequence Diagram(s)sequenceDiagram
participant SystemBars as μμ€ν
λ°(μν/λ΄λΉκ²μ΄μ
)
participant YappApp as YappApp
participant Screen as μ£Όμ μ€ν¬λ¦°(History, Home, Schedule)
participant YappBackground as YappBackground
YappApp->>Screen: νλ©΄ μ»΄ν¬μ λΈ νΈμΆ
Screen->>YappBackground: contentWindowInsets νλΌλ―Έν°μ ν¨κ» νΈμΆ
YappBackground->>SystemBars: μμ€ν
μΈμ
μ 보 μμ²
SystemBars-->>YappBackground: μΈμ
κ° λ°ν
YappBackground->>Screen: μΈμ
ν¨λ© μ μ© ν children λ λλ§
Assessment against linked issues
Possibly related PRs
Suggested labels
Poem
β¨ Finishing Touches
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. πͺ§ TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Introduces the `YappBackground` composable function to provide a consistent background for screens. This component wraps its content in a `Surface` with the specified background color. It also includes handling for window insets (`WindowInsets.systemBars` by default) using `onConsumedWindowInsetsChanged` and `exclude` to apply appropriate padding and avoid overlapping with system UI elements.
332e23e to
62b83fd
Compare
|
@coderabbitai review |
β Actions performedReview triggered.
|
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
π Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
π Files selected for processing (8)
app/src/main/java/com/yapp/app/official/ui/YappApp.kt(2 hunks)build-logic/src/main/java/com/yapp/KotlinAndroid.kt(1 hunks)core/designsystem/src/main/res/values-v35/themes.xml(1 hunks)core/ui/src/main/java/com/yapp/core/ui/component/YappBackground.kt(1 hunks)feature/history/src/main/java/com/yapp/feature/history/attend/AttendHistoryScreen.kt(2 hunks)feature/home/src/main/java/com/yapp/feature/home/HomeScreen.kt(2 hunks)feature/home/src/main/java/com/yapp/feature/home/component/HomeAttendaceContents.kt(1 hunks)feature/schedule/src/main/java/com/yapp/feature/schedule/ScheduleScreen.kt(2 hunks)
π§° Additional context used
π§ Learnings (1)
feature/history/src/main/java/com/yapp/feature/history/attend/AttendHistoryScreen.kt (1)
Learnt from: jinukeu
PR: YAPP-admin/yappu-world-android#38
File: core/designsystem/src/main/java/com/yapp/core/designsystem/component/header/HeaderActionbar.kt:59-90
Timestamp: 2025-01-24T16:33:01.628Z
Learning: In the YAPP Android project, header components (HeaderActionbar, HeaderActionbarExpanded) are intentionally kept separate to follow the Open-Closed Principle (OCP), allowing for easy extension without modifying existing components.
𧬠Code Graph Analysis (2)
feature/home/src/main/java/com/yapp/feature/home/HomeScreen.kt (1)
feature/home/src/main/java/com/yapp/feature/home/component/HomeHeader.kt (1)
HomeHeader(47-158)
feature/history/src/main/java/com/yapp/feature/history/attend/AttendHistoryScreen.kt (4)
core/ui/src/main/java/com/yapp/core/ui/component/YappBackground.kt (1)
YappBackground(19-45)feature/history/src/main/java/com/yapp/feature/history/attend/component/AttendanceStatusSession.kt (1)
AttendanceStatusSection(30-91)feature/history/src/main/java/com/yapp/feature/history/attend/component/StatusItem.kt (1)
StatusItem(15-29)feature/history/src/main/java/com/yapp/feature/history/attend/component/SessionAttendanceHistory.kt (1)
SessionAttendanceHistory(19-47)
π Additional comments (16)
build-logic/src/main/java/com/yapp/KotlinAndroid.kt (1)
27-27: compileSdk λ²μ 35λ‘ μ λ°μ΄νΈ
μ»΄νμΌ SDKλ₯Ό API λ 벨 35λ‘ μν₯νμ¬ Android 14 κΈ°λ₯ λ° μ ν λ§ λ¦¬μμ€λ₯Ό μ¬μ©ν μ μλλ‘ μ€μ λμμ΅λλ€.feature/home/src/main/java/com/yapp/feature/home/component/HomeAttendaceContents.kt (1)
58-63: ν μ€νΈ μ»΄ν¬μ λΈμfillMaxWidth()μ μ©
λͺ¨λ μΈμ μ’ λ£ λ©μμ§κ° 컨ν μ΄λ κ°λ‘ λλΉμ λ§μΆ° μ€μ μ λ ¬λλλ‘ μμ λμ΄ μ¬μ©μ κ²½νμ΄ κ°μ λμμ΅λλ€.app/src/main/java/com/yapp/app/official/ui/YappApp.kt (2)
6-7:WindowInsetsλ°dpμν¬νΈ μΆκ°
Scaffoldμμ μμ€ν μΈμ μ μ μ΄νκΈ° μν΄WindowInsetsμdpλ¨μκ° μ¬μ©λ©λλ€.
41-41: Scaffoldμμ κΈ°λ³Έ μΈμ ν¨λ© ν΄μ
contentWindowInsets = WindowInsets(0.dp)λ₯Ό ν΅ν΄ κΈ°λ³Έ μμ€ν λ° μΈμ μ μ κ±°νκ³ μ»€μ€ν YappBackgroundμμ μΆ©λμ λ°©μ§ν©λλ€.feature/history/src/main/java/com/yapp/feature/history/attend/AttendHistoryScreen.kt (1)
21-21:YappBackgroundμν¬νΈ μΆκ°
κΈ°μ‘΄ λ μ΄μμμ μ λ°°κ²½ μ»΄ν¬μ λΈλ‘ κ°μΈκΈ° μν΄ κ΄λ ¨ μ»΄ν¬λνΈλ₯Ό κ°μ Έμ΅λλ€.core/designsystem/src/main/res/values-v35/themes.xml (1)
4-6: API 35 ν λ§μ Edge-to-Edge λΉνμ±ν μμ± μΆκ°
android:windowOptOutEdgeToEdgeEnforcement="true"λ‘ ν λ§λ₯Ό μ€μ νμ¬ μμ€ν μ΄ κΈ°λ³Έμ μΌλ‘ μ μ©νλ Edge-to-Edge λͺ¨λμμ μ μΈν©λλ€.feature/home/src/main/java/com/yapp/feature/home/HomeScreen.kt (3)
6-10: μλμ° μΈμ μ²λ¦¬λ₯Ό μν μν¬νΈ μΆκ°κ° μ λμμ΅λλ€.Edge-to-Edge νλ©΄ ꡬνμ νμν μλμ° μΈμ κ΄λ ¨ ν΄λμ€λ€μ΄ μ¬λ°λ₯΄κ² μν¬νΈλμμ΅λλ€.
66-67: YappBackgroundμ μ μ ν WindowInsets μ€μ μ΄ μΆκ°λμμ΅λλ€.
contentWindowInsets = WindowInsets.navigationBarsλ₯Ό ν΅ν΄ λ€λΉκ²μ΄μ λ° μμμ κ³ λ €ν λ μ΄μμ μ²λ¦¬κ° κ°λ₯ν΄μ‘μ΅λλ€. μ΄λ Edge-to-Edge λμμΈμμ μ€μν κΈ°λ₯μ λλ€.
71-74: HomeHeaderμ μμ€ν λ° κ³ λ €ν ν¨λ© μ μ©μ΄ μ μ ν©λλ€.μν λ° μμ(WindowInsets.statusBars)μ κ³ λ €ν ν¨λ©κ³Ό μΆκ° μλ¨ μ¬λ°±(18.dp)μ΄ μ μ νκ² μ μ©λμμ΅λλ€. μ΄λ‘μ¨ ν€λ μ½ν μΈ κ° μν λ°μ κ²ΉμΉμ§ μκ³ μΌκ΄λ μ¬λ°±μ μ μ§ν μ μμ΅λλ€.
feature/schedule/src/main/java/com/yapp/feature/schedule/ScheduleScreen.kt (3)
39-39: YappBackground μ»΄ν¬λνΈ μν¬νΈ μΆκ°κ° μ μ ν©λλ€.Edge-to-Edge νλ©΄ ꡬνμ μν YappBackground μ»΄ν¬λνΈκ° μ¬λ°λ₯΄κ² μν¬νΈλμμ΅λλ€.
79-81: YappBackground μ μ©μ΄ μ λμμ΅λλ€.νλ©΄ λ°°κ²½μΌλ‘ YappBackgroundλ₯Ό μ¬μ©ν¨μΌλ‘μ¨ μμ€ν UIμ κ²ΉμΉμ§ μλ λ μ΄μμ μ²λ¦¬κ° κ°λ₯ν΄μ‘μ΅λλ€. λ°°κ²½μμ΄ ν°μ(staticWhite)μΌλ‘ μ¬λ°λ₯΄κ² μ€μ λμμ΅λλ€.
82-120: μ»΄ν¬λνΈ κ³μΈ΅ κ΅¬μ‘°κ° κ°μ λμμ΅λλ€.YappBackground μμ PullToRefreshBoxμ Columnμ΄ μ μ νκ² μ€μ²©λμ΄ κ΅¬μ‘°κ° κ°μ λμμ΅λλ€. νΉν, ν μ ν λ‘μ§κ³Ό ν΄λΉ νλ©΄ λ λλ§μ΄ λͺ ννκ² μ 리λμμ΅λλ€. Edge-to-Edge λμμΈμ μΌκ΄μ±μ΄ ν₯μλμμ΅λλ€.
core/ui/src/main/java/com/yapp/core/ui/component/YappBackground.kt (4)
3-11: μλμ° μΈμ μ²λ¦¬μ νμν μν¬νΈκ° μ μΆκ°λμμ΅λλ€.Edge-to-Edge νλ©΄ ꡬνμ μν λ€μν WindowInsets κ΄λ ¨ ν΄λμ€μ ν¨μκ° μ μ νκ² μν¬νΈλμμ΅λλ€.
19-24: YappBackground ν¨μμ contentWindowInsets νλΌλ―Έν° μΆκ°κ° μ μ ν©λλ€.ExperimentalLayoutApi μ΄λ Έν μ΄μ μ΄ μΆκ°λμκ³ , WindowInsets.systemBarsλ₯Ό κΈ°λ³Έκ°μΌλ‘ νλ contentWindowInsets νλΌλ―Έν°κ° μ μ νκ² μ μλμμ΅λλ€. μ΄λ₯Ό ν΅ν΄ μμ€ν UIμ κ²ΉμΉμ§ μλ λ μ΄μμ ꡬνμ΄ κ°λ₯ν΄μ‘μ΅λλ€.
27-31: λμ μΈμ μΆμ μ μν MutableWindowInsets ꡬνμ΄ μ λμμ΅λλ€.rememberλ₯Ό ν΅ν΄ contentWindowInsets κΈ°λ°μ MutableWindowInsets μΈμ€ν΄μ€λ₯Ό μμ±νμ¬ λμ μΈ μΈμ μ²λ¦¬κ° κ°λ₯ν΄μ‘μ΅λλ€.
35-41: μλμ° μΈμ λ³κ²½μ λ°λ₯Έ ν¨λ© μ‘°μ λ‘μ§μ΄ μ ꡬνλμμ΅λλ€.onConsumedWindowInsetsChangedλ₯Ό ν΅ν΄ μλΉλ μΈμ μ μΆμ νκ³ , exclude ν¨μλ‘ μ΄λ―Έ μλΉλ μΈμ μ μ μΈνλ λ‘μ§μ΄ μ μ ν ꡬνλμμ΅λλ€. κ³μ°λ μΈμ μ ν¨λ©μΌλ‘ μ μ©νμ¬ μ½ν μΈ κ° μμ€ν UIμ κ²ΉμΉμ§ μλλ‘ λ³΄μ₯ν©λλ€.
| YappBackground { | ||
| Column { | ||
| YappHeaderActionbar( | ||
| title = stringResource(R.string.attendance_title), | ||
| leftIcon = coreDesignR.drawable.icon_chevron_left, | ||
| onClickLeftIcon = onClickBackButton | ||
| ) |
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.
π§Ή Nitpick (assertive)
AttendHistoryScreenμ YappBackgroundλ‘ λν
νλ©΄ μ 체μ μμ€ν
λ° μΈμ
μ λμ μΌλ‘ μ²λ¦¬νλ YappBackgroundλ₯Ό μ μ©νμ¬ Edge-to-Edge λμμ μΌκ΄λκ² μ μ§ν©λλ€.
contentWindowInsets κ°μ λͺ
μμ μΌλ‘ μ λ¬ν΄ μΈμ
μ‘°μ μλλ₯Ό λΆλͺ
ν νλ©΄ κ°λ
μ±μ΄ λμ± ν₯μλ μ μμ΅λλ€.
DongChyeon
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.
κ³ μνμ ¨μ΅λλ€
π‘ Issue
π± Key changes
β To Reviewers
πΈ μ€ν¬λ¦°μ·
Summary by CodeRabbit
μ κ· κΈ°λ₯
λ²κ·Έ μμ
μ€νμΌ