Skip to content
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

출석 뷰 컴포즈로 마이그레이션(진행중) #990

Draft
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

giovannijunseokim
Copy link
Contributor

What is this issue?

  • [x]

Reference

  • [x]

Copy link

height bot commented Dec 1, 2024

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

Copy link
Member

@l2hyunwoo l2hyunwoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

리뷰확인점

@@ -148,6 +148,7 @@ dependencies {
implementation(libs.kotlin.coroutines.google.play)
implementation(platform(libs.compose.bom))
implementation(libs.bundles.compose)
implementation(libs.compose.lifecycle)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

어라 이거 bundles.compose에 없었나..?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이거 머지 전에 AttendanceActivity로 변경 필요

Comment on lines +44 to +45
is AttendanceUiState.Failure -> {}
AttendanceUiState.NetworkError -> {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분에는 뭔가 Default 에러 화면...?

Comment on lines +54 to +59
@Composable
fun NewAttendanceViewModel.rememberAttendanceActions(): AttendanceAction = remember(this) {
AttendanceAction(
onFakeClick = {}
)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

멤버함수가 아닌 확장함수로 정의한 이유가 있을까유? 검색할 때 조금 어려울 것 같긴 한데

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그리고 remember 키에 viewmodel 건 이유가 있는지 궁금합니당!


@Preview
@Composable
private fun AttendanceScreenPreview(@PreviewParameter(AttendanceScreenPreviewParameterProvider::class) parameter: AttendanceScreenPreviewParameter) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private fun AttendanceScreenPreview(@PreviewParameter(AttendanceScreenPreviewParameterProvider::class) parameter: AttendanceScreenPreviewParameter) {
private fun AttendanceScreenPreview(
@PreviewParameter(AttendanceScreenPreviewParameterProvider::class)
parameter: AttendanceScreenPreviewParameter
) {

이렇게 적어도 괜찮을듯? 패러미터 클래스가 너무기네ㅋㅋ


@Composable
fun AttendanceCodeCardList(
codes: List<String?>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ImmtableList...?

Comment on lines +73 to +74
onTextChange = {},
onTextFieldFull = {},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이것도 아직 구현이 안된거죠?

fun AttendanceHistoryCard(
userTitle: String,
attendanceScore: Int,
totalAttendanceResult: Map<AttendanceResultType, Int>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Map도 ImmtableMap이나 PersistentMap 같은 것이 있을겁니당

Comment on lines +35 to +49
Text(
text = "현재 출석점수는 ",
color = SoptTheme.colors.onSurface10,
style = SoptTheme.typography.body18M
)
Text(
text = "${attendanceScore}점",
color = Orange400,
style = SoptTheme.typography.title20SB
)
Text(
text = " 입니다!",
color = SoptTheme.colors.onSurface10,
style = SoptTheme.typography.body18M
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이런건 buildAnnotatedString 같은걸로 구현 가능!

Comment on lines +60 to +70
fun calculateAttendanceProgress(
firstAttendance: MidtermAttendance,
secondAttendance: MidtermAttendance,
): Float {
if (!firstAttendance.isFinished) return 0f
if (!secondAttendance.isFinished) {
return 0.5f
} else {
return 1f
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이런거면 MidtermAttendance의 멤버함수 내부에서 정의가 가능하지 않을까요?

@giovannijunseokim giovannijunseokim self-assigned this Dec 4, 2024
@giovannijunseokim giovannijunseokim changed the title Feature/refactor attendance screen 출석 뷰 컴포즈로 마이그레이션(아직 진행중) Jan 2, 2025
@giovannijunseokim giovannijunseokim changed the title 출석 뷰 컴포즈로 마이그레이션(아직 진행중) 출석 뷰 컴포즈로 마이그레이션(진행중) Jan 3, 2025
* feat: implement NewAttendanceActivity

* feat: implement NewAttendanceViewModel

* chore: add compose-lifecycle dependency

* feat: define AttendanceAction

* feat: implement screens

* feat: use SoptTheme in designsystem

* chore: data class -> class로 변경

* chore: 람다 프로퍼티 이름 명시

* chore: SoptTheme darkTheme 기본값 사용

* chore: 필요없는 함수 제거

* chore: 구현 안 된 함수에 TODO 삽입

* chore: 동작하지 않는 Preview 제거

* chore: AttendanceAction 내 뷰모델 참조 제거

* chore: code format 변경
* chore: core 모듈의 designsystem에 NoRippleClickable 추가

* feat: AttendanceTopAppBar 생성

* chore: String 리소스 추출

* chore: TODO : fetchData 구현

* chore: AttendanceTopAppBar 적용

* chore: Modifier 인자 추가

* chore: extract string resource

* chore: change style and delete action class

* chore: change icon

* chore: delete NoRippleClickable

* chore: use clickable
* chore: icon 리소스 추가

* feat: MidtermAttendanceCard 구현

* feat: FinalAttendanceCard 구현

* feat: AttendanceProgressBar 구현

* feat: AttendanceHistoryCard 구현

* chore: string 리소스 추출

* chore: rename

* chore: change class name

* chore: add text style

* chore: add AttendanceHistoryCard radius

* feat: implement TodayNoAttendanceCard

* feat: implement TodayNoScheduleCard

* chore: extract string resource

* chore: separate model

* chore: use PreviewParameter

* chore: apply spotlessApply

* chore: change class, objects in sealed to data class, data objects
* feat: AttendanceHistoryCard 구현

* chore: string 리소스 추출

* rebase

* feat: AttendanceHistoryCard

* feat: AttendanceHistorySummaryCard

* feat: AttendanceHistoryUserInfoCard

* chore: add dependency for collectAsStateWithLifecycle

* chore: add text style to AttendanceHistoryUserInfoCard

* feat: implement AttendanceHistoryUserInfoCard

* feat: implement AttendanceHistorySummaryCard

* feat: implement AttendanceCountCard

* feat: implement AttendanceResultType

* chore: move AttendanceHistoryCardState to model package

* chore: move components to component package

* feat: implement AttendanceHistoryCard

* chore: change access modifier

* feat: replace List with ImmutableList

* chore: remove dependency
* Attendance screen compose setting (#676)

* feat: implement NewAttendanceActivity

* feat: implement NewAttendanceViewModel

* chore: add compose-lifecycle dependency

* feat: define AttendanceAction

* feat: implement screens

* feat: use SoptTheme in designsystem

* chore: data class -> class로 변경

* chore: 람다 프로퍼티 이름 명시

* chore: SoptTheme darkTheme 기본값 사용

* chore: 필요없는 함수 제거

* chore: 구현 안 된 함수에 TODO 삽입

* chore: 동작하지 않는 Preview 제거

* chore: AttendanceAction 내 뷰모델 참조 제거

* chore: code format 변경

* chore: make stamp design system internal

* chore: extract string resource

* feat: implement AttendanceCodeCard

* feat: implement AttendanceCodeCardList

* chore: change logic

* feat: implement AttendanceCodeDialog

* feat: implement attendance button

* chore: string resource 추출

* chore: change parameter List to ImmutableList

* chore: reformat codee

# Conflicts:
#	core/designsystem/src/main/java/org/sopt/official/designsystem/Color.kt
* chore: rename AttendanceType -> AttendanceSession

* chore: delete state for components

* chore: use immutable collection

* chore: remove mock

* feat: add AttendanceDayType.kt

* feat: implement AttendanceScreen

* feat: adjust layout

* chore: move background setting to component

* chore: merge state class into UiState class

* chore: move package

* chore: keep convention

* chore: separate AttendanceGradientBox

* chore: rename ProgressBarState to AttendanceProgressBarPreviewParameter

* chore: keep convention
@giovannijunseokim giovannijunseokim force-pushed the feature/refactor-attendance-screen branch from b43f21c to d2b9c0d Compare January 4, 2025 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants