-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/#225 : 홈화면 UI 변경건 작업 #226
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
Open
TaeseongYun
wants to merge
16
commits into
develop
Choose a base branch
from
feature/#225-home-ui
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 11 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
9dcf0bc
chore/#225 : 홈 UI 관련 추가된 디자인 리소스 임포트
TaeseongYun 14dc74b
feature/#225 : 홈 관련 다음 세션 공지사항 처리 추가
TaeseongYun ae530f2
feature/#225 : 세션 Chip 색상 추가
TaeseongYun fa01d28
refactor/#225 : 사용하지 않는 홈 화면 공지사항 리스트 API 제거
TaeseongYun f35612d
feature/#225 : 홈 화면 UI 변경으로 인한 API 연결 및 Contract 수정
TaeseongYun 27b348e
feature/#225 : 홈화면 변경된 UI 적용
TaeseongYun a9ac886
feature/#225 : 홈화면 변경된 UI 로 인한 이후 내비게이션 처리 수정
TaeseongYun b32e26e
refactor/#225 : 디자인 시스템 디폴트 헤더 관련 rightIcon 외부로 받을 수 있도록 slot 형태 수정
TaeseongYun 8547298
chore/#225 : 세션 리스폰스 Enum 값 매핑 잘못되어있던 현상 수정
TaeseongYun 5ad938e
feature/#225 : 최하단 FAQ 영역 horizontal 스페이싱 적용되어있지 않은 현상 추가
TaeseongYun e6793ce
chore/#225 : agp 버전 증가
TaeseongYun 344aabb
feature/#225 : 누락된 타이포그래피 추가
TaeseongYun d997c60
refactor/#225 : horizontal 마진 값 16으로 지정되어있던 값 20으로 변경
TaeseongYun d138b32
feature/#225 : 홈 최상단 섹션 프리뷰 추가
TaeseongYun 48eaa5d
refactor/#255 : 리컴포지션으로 인한 재 로직 호출 방지를 위한 remember 함수 처리
TaeseongYun 1e47f0f
feature/#225 : 다음세션 및 당일세션 관련해서 조건에 따른 컴포저블 처리
TaeseongYun File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.11 KB
core/designsystem/src/main/res/drawable-xhdpi/home_attance_point.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+10.2 KB
core/designsystem/src/main/res/drawable-xxhdpi/home_all_sessions.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.42 KB
core/designsystem/src/main/res/drawable-xxhdpi/home_attance_point.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15.8 KB
core/designsystem/src/main/res/drawable-xxxhdpi/home_all_sessions.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.8 KB
core/designsystem/src/main/res/drawable-xxxhdpi/home_attance_point.webp
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,13 @@ | ||
| package com.yapp.feature.home | ||
|
|
||
| import android.widget.Toast | ||
| import androidx.compose.foundation.background | ||
| import androidx.compose.foundation.layout.Column | ||
| import androidx.compose.foundation.layout.Row | ||
| import androidx.compose.foundation.layout.Spacer | ||
| import androidx.compose.foundation.layout.WindowInsets | ||
| import androidx.compose.foundation.layout.asPaddingValues | ||
| import androidx.compose.foundation.layout.fillMaxSize | ||
| import androidx.compose.foundation.layout.height | ||
| import androidx.compose.foundation.layout.navigationBars | ||
| import androidx.compose.foundation.layout.padding | ||
| import androidx.compose.foundation.layout.statusBars | ||
|
|
@@ -20,28 +22,30 @@ import androidx.compose.runtime.LaunchedEffect | |
| import androidx.compose.runtime.getValue | ||
| import androidx.compose.ui.Alignment | ||
| import androidx.compose.ui.Modifier | ||
| import androidx.compose.ui.graphics.Brush | ||
| import androidx.compose.ui.platform.LocalContext | ||
| import androidx.compose.ui.tooling.preview.Preview | ||
| import androidx.compose.ui.unit.dp | ||
| import androidx.hilt.navigation.compose.hiltViewModel | ||
| import androidx.lifecycle.compose.collectAsStateWithLifecycle | ||
| import com.yapp.core.designsystem.component.header.YappDefaultHeader | ||
| import com.yapp.core.designsystem.theme.YappTheme | ||
| import com.yapp.core.ui.component.YappBackground | ||
| import com.yapp.core.ui.extension.collectWithLifecycle | ||
| import com.yapp.feature.home.component.HomeAttendanceContent | ||
| import com.yapp.feature.home.component.HomeAttendanceNotice | ||
| import com.yapp.feature.home.component.CurrentSessionSection | ||
| import com.yapp.feature.home.component.FAQSection | ||
| import com.yapp.feature.home.component.HomeHeader | ||
| import com.yapp.feature.home.component.OtherSection | ||
| import com.yapp.feature.home.component.HomeNotices | ||
| import com.yapp.feature.home.dialog.AttendanceDialog | ||
|
|
||
| @Composable | ||
| internal fun HomeRoute( | ||
| navigateToLogin: () -> Unit, | ||
| navigateToSchedule: () -> Unit, | ||
| navigateToNotice: () -> Unit, | ||
| navigateToSessionDetail: (String) -> Unit, | ||
| navigateToAttendanceHistory: () -> Unit, | ||
| handleException: (Throwable) -> Unit, | ||
| navigateToNotice: (String) -> Unit, | ||
| navigateToSessionDetail: (String) -> Unit, | ||
| viewModel: HomeViewModel = hiltViewModel(), | ||
| ) { | ||
| LaunchedEffect(Unit) { | ||
|
|
@@ -54,11 +58,12 @@ internal fun HomeRoute( | |
| when (effect) { | ||
| HomeSideEffect.NavigateToLogin -> navigateToLogin() | ||
| HomeSideEffect.NavigateToSchedule -> navigateToSchedule() | ||
| HomeSideEffect.NavigateToNotice -> navigateToNotice() | ||
| HomeSideEffect.NavigateToAttendanceHistory -> navigateToAttendanceHistory() | ||
| is HomeSideEffect.NavigateToSessionDetail -> navigateToSessionDetail(effect.sessionId) | ||
|
|
||
| is HomeSideEffect.ShowToast -> Toast.makeText(context, effect.message, Toast.LENGTH_SHORT).show() | ||
| is HomeSideEffect.HandleException -> handleException(effect.exception) | ||
| is HomeSideEffect.NavigateToNotice -> navigateToNotice(effect.id) | ||
| } | ||
| } | ||
|
|
||
|
|
@@ -74,15 +79,10 @@ fun HomeScreen( | |
| homeState: HomeState, | ||
| onIntent: (HomeIntent) -> Unit = {}, | ||
| ) { | ||
| val colorSteps = arrayOf( | ||
| 0.2f to YappTheme.colorScheme.primaryNormal, | ||
| 1f to YappTheme.colorScheme.secondaryNormal | ||
| ) | ||
|
|
||
| val pullToRefreshState = rememberPullToRefreshState() | ||
|
|
||
| YappBackground( | ||
| color = YappTheme.colorScheme.staticWhite, | ||
| color = YappTheme.colorScheme.backgroundNormalAlternative, | ||
| contentWindowInsets = WindowInsets.navigationBars, | ||
| ) { | ||
| PullToRefreshBox( | ||
|
|
@@ -101,36 +101,40 @@ fun HomeScreen( | |
| } | ||
| ) { | ||
| Column( | ||
| modifier = Modifier | ||
| .fillMaxSize() | ||
| .verticalScroll(rememberScrollState()) | ||
| modifier = Modifier.padding(WindowInsets.statusBars.asPaddingValues()) | ||
| ) { | ||
| HomeHeader( | ||
| YappDefaultHeader(rightIcon = { /** no-op **/}) | ||
| Column( | ||
| modifier = Modifier | ||
| .background(brush = Brush.horizontalGradient(colorStops = colorSteps)) | ||
| .padding(WindowInsets.statusBars.asPaddingValues()) | ||
| .padding(top = 18.dp), | ||
| sessions = homeState.sessionList.sessions, | ||
| upcomingSessionId = homeState.sessionList.upcomingSessionId, | ||
| onClickSessionItem = { sessionId -> | ||
| onIntent(HomeIntent.ClickSessionItem(sessionId)) | ||
| }, | ||
| onClickShowAll = { onIntent(HomeIntent.ClickShowAllSession) }, | ||
| ) | ||
|
|
||
| HomeAttendanceNotice( | ||
| upcomingSession = homeState.upcomingSession | ||
| ) | ||
|
|
||
| HomeAttendanceContent( | ||
| upcomingSession = homeState.upcomingSession, | ||
| onClickAttend = { onIntent(HomeIntent.ClickRequestAttendCode) } | ||
| ) | ||
|
|
||
| HomeNotices( | ||
| notices = homeState.notices.notices, | ||
| onClickMore = { onIntent(HomeIntent.ClickShowAllNotice) } | ||
| ) | ||
| .weight(1f) | ||
| .verticalScroll(rememberScrollState()) | ||
| ) { | ||
| HomeHeader( | ||
| body = { | ||
| CurrentSessionSection( | ||
| upcomingSession = homeState.upcomingSession, | ||
| onClickAttend = { onIntent(HomeIntent.ClickRequestAttendCode) }, | ||
| onClickDetail = { onIntent(HomeIntent.ClickDetail(it)) }, | ||
| todaySession = homeState.sessionList.lastSessions, | ||
| notices = homeState.sessionList.upcomingNotice, | ||
| onClickNotice = { onIntent(HomeIntent.ClickNotice(it)) } | ||
| ) | ||
| }, | ||
| ) | ||
| Spacer(Modifier.height(16.dp)) | ||
| OtherSection( | ||
| modifier = Modifier.padding(horizontal = 16.dp), | ||
| clickAttendance = { onIntent(HomeIntent.ClickShowAllAttendanceHistory) }, | ||
| clickTotalSession = { onIntent(HomeIntent.ClickShowAllSession) }, | ||
| ) | ||
| Spacer(Modifier.height(16.dp)) | ||
| FAQSection( | ||
| modifier = Modifier.padding(horizontal = 16.dp), | ||
| clickCurriculum = {}, | ||
| clickBasicRule = {} | ||
| ) | ||
|
Comment on lines
126
to
136
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. 내부 컴포넌트랑 마진이 헷갈렸네요 |
||
| Spacer(Modifier.height(30.dp)) | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

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.
훨씬 좋네요