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

[FEAT/YAF-116] 알림이 울릴 때 해제 혹은 미루기가 가능한 UI를 표시한다 #102

Merged
merged 8 commits into from
Feb 9, 2025

Conversation

DongChyeon
Copy link
Member

Related issue 🛠

closed #89

어떤 변경사항이 있었나요?

  • 🐞 BugFix Something isn't working
  • 🎨 Design Markup & styling
  • 📃 Docs Documentation writing and editing (README.md, etc.)
  • ✨ Feature Feature
  • 🔨 Refactor Code refactoring
  • ⚙️ Setting Development environment setup
  • ✅ Test Test related (Junit, etc.)

CheckPoint ✅

PR이 다음 요구 사항을 충족하는지 확인하세요.

  • PR 컨벤션에 맞게 작성했습니다. (필수)
  • merge할 브랜치의 위치를 확인해 주세요(main❌/develop⭕) (필수)
  • Approve된 PR은 assigner가 머지하고, 수정 요청이 온 경우 수정 후 다시 push를 합니다. (필수)
  • BugFix의 경우, 버그의 원인을 파악하였습니다. (선택)

Work Description ✏️

2025-02-09.2.00.17.mov
  • 알람 해제 화면 구현
  • 알람 미루기 화면 구현

Uncompleted Tasks 😅

N/A

To Reviewers 📢

자기 전에 깃허브에서 여러 알람앱을 찾아봤는데 결국에는 알람 해제 액티비티를 따로 분리해야할 것 같아요
그래서 추후에 AlarmAction, AlarmSnoozeTimer는 따로 모듈화 예정입니다.

@DongChyeon DongChyeon added 📱 UI 사용자 인터페이스 관련 작업 💪 동현동현동현동현동현 labels Feb 9, 2025
@DongChyeon DongChyeon self-assigned this Feb 9, 2025
Copy link
Member

@MoonsuKang MoonsuKang left a comment

Choose a reason for hiding this comment

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

GOOD

Comment on lines 120 to 138
val backgroundStrokePx = backgroundWidth.toPx()
val progressStrokePx = progressWidth.toPx()

val offset = (backgroundStrokePx - progressStrokePx) / 2

val backgroundColor = Color.White.copy(alpha = 0.2f)

val progressBlurEffect = BlurMaskFilter(
progressBlurRadius.toPx(),
BlurMaskFilter.Blur.NORMAL,
)

val progressPaint = Paint().apply {
color = OrbitTheme.colors.main.toArgb()
maskFilter = progressBlurEffect
style = Paint.Style.STROKE
strokeWidth = progressStrokePx
strokeCap = Paint.Cap.ROUND
}
Copy link
Member

Choose a reason for hiding this comment

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

p3
이거 Canvas의 draw Scope범위 내로 옮기는게 좋지 않을까요?
toPx같은 경우는 Density에 의존하게 되는데 Canvas의 Scope 내부에서는 이미 Density 컨텍스트가 설정되어 있어서, toPx 변환이 더 최적화될 수 있을 것 같다고 생각해서요!

Copy link
Member Author

Choose a reason for hiding this comment

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

ㅇㅈ

totalSeconds = 300,
)

Spacer(modifier = Modifier.weight(1f))
Copy link
Member

Choose a reason for hiding this comment

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

p4
이거 빼고
Column(
verticalArrangement = Arrangement.SpaceBetween
)
로 해서 같은 결과라면, 이게 더 좋은 구조일 것 같습니다!

Copy link
Member Author

Choose a reason for hiding this comment

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

image

Arrangement.SpaceBetween은 해당 공간을 최대로 활용하되 안에 있는 요소들간 일정 간격을 유지하게 하는 것이라서...

image

사용하지 못할 것 같습니다.

private fun formatSecondsToTime(seconds: Int): String {
val minutes = seconds / 60
val remainingSeconds = seconds % 60
return String.format(Locale.getDefault(), "%02d:%02d", minutes, remainingSeconds)
Copy link
Member

Choose a reason for hiding this comment

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

p4
val locale = Locale.getDefault()

Copy link
Member Author

Choose a reason for hiding this comment

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

locale을 여러 곳이 아니라 한 곳에서만 사용한다면 inline variable이라도 상관없다는 생각

Copy link
Member Author

Choose a reason for hiding this comment

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

매번 Locale.getDefault()를 호출하는 대신
toString().padStart()를 활용하도록 변경했습니다.

Copy link
Member

@MoonsuKang MoonsuKang left a comment

Choose a reason for hiding this comment

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

👍👍

@DongChyeon DongChyeon merged commit e97a7a7 into develop Feb 9, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 동현동현동현동현동현 📱 UI 사용자 인터페이스 관련 작업
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] 알림이 울릴 때 해제 혹은 미루기가 가능한 UI를 표시한다
2 participants