Skip to content

[layout] Add Dayo Loading Component #614

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

Merged
merged 3 commits into from
Jan 16, 2025
Merged

[layout] Add Dayo Loading Component #614

merged 3 commits into from
Jan 16, 2025

Conversation

DongJun-H
Copy link
Member

작업 사항

  • 앱 전반에서 로딩시 사용할 공통 컴포넌트 제작

구현 내용

  • 새로운 DAYO 로딩 애니메이션 리소스 추가
  • message 변경 및 애니메이션을 보여주는 LottieModifier를 통해 크기등에 대한 조절 가능
  • Z Index를 Float.MAX_VALUE로 설정해 다른 화면들보다 항상 위에 뜰 수 있도록 설정
  • 기본적으로 화면을 꽉채우면서 회색 반투명으로 보일 수 있도록 설정하였으나, Modifier를 통해서 조정 가능
    • dimColor만 조정하고자 하는 경우, 해당 param만 설정하면 됨

구현 화면

Screen_Recording_20250114_215730_DAYO.Debug.mp4

@DongJun-H DongJun-H requested a review from yuni-ju January 14, 2025 12:58
@DongJun-H DongJun-H self-assigned this Jan 14, 2025
Copy link
Member

@yuni-ju yuni-ju left a comment

Choose a reason for hiding this comment

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

비어있는 clickable이 왜 있는지 궁금했는데 로딩 뒤의 화면이 클릭 되지 않기 위함이었군요!!

로딩 화면 잘 쓰겠습니다~~

modifier: Modifier = Modifier,
message: String = "잠시만 기다려 주세요",
dimColor: Color = Dark.copy(alpha = 0.4f),
lottieFile: Int,
Copy link
Member

Choose a reason for hiding this comment

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

  1. lottieFile이 필수 파라미터라면 파라미터 순서를 위쪽으로 올려주세요. 아니면 디폴트 값을 넣어둬도 될 것 같습니다!
  2. 아래 코드에서 rawResId로 사용되는 것 같은데 @RawRes lottieFile: Int 로 어노테이션을 붙이는 것이 좋아보입니다
Suggested change
lottieFile: Int,
@RawRes lottieFile: Int = R.raw.dayo_loading,
  1. 그러면서 디자인에 맞게 기본 lottieModifier 크기도 92x85로 설정 되어있으면 더 편하게 쓸 수 있을 것 같아요!

Copy link
Member Author

Choose a reason for hiding this comment

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

반영하였습니다 👍

@DongJun-H DongJun-H requested a review from yuni-ju January 15, 2025 11:48
Comment on lines 40 to 47
@RawRes lottieFile: Int = R.raw.dayo_loading,
lottieModifier: Modifier = Modifier,
lottieWidth: Dp = 92.dp,
lottieHeight: Dp = 85.dp,
isVisible: Boolean,
modifier: Modifier = Modifier,
message: String = "잠시만 기다려 주세요",
message: String = stringResource(id = R.string.loading_default_message),
dimColor: Color = Dark.copy(alpha = 0.4f),
Copy link
Member

Choose a reason for hiding this comment

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

compose 권장 파라미터 순서입니닷!
image

필수 파라미터인 isVisible을 가장 위로 올려주시면 감사하겠습니다!

출처 : https://android.googlesource.com/platform/frameworks/support/+/androidx-main/compose/docs/compose-component-api-guidelines.md#parameters-order

@DongJun-H DongJun-H requested a review from yuni-ju January 15, 2025 14:43
@DongJun-H DongJun-H merged commit e709403 into develop Jan 16, 2025
1 check passed
@DongJun-H DongJun-H deleted the layout/issue-613 branch February 2, 2025 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants