Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Feat [#12] 이용시간 통계뷰 구현 #20

Merged
merged 19 commits into from
May 6, 2024
Merged

Conversation

Zoe0929
Copy link
Member

@Zoe0929 Zoe0929 commented May 1, 2024

👾 작업 내용

이용 시간 통계뷰 구현햤습니다.

🚀 PR Point

  • 하루 이용 시간은 불러왔으나, 앱별 이용 시간은 앱 선택 화면 이후 구현이 필요하여 챌린지뷰 우선 제작 예정입니다.
  • 이용 시간 관련된 뷰를 모두 DeviceActivityReport 타겟으로 이동할 에정입니다.

📸 스크린샷

구현 내용 스크린샷
앱 이용시간 통계뷰

✅ CheckList

  • 오류 없이 빌드되는지 확인
  • 로그용 print문 제거
  • 불필요한 주석 제거
  • 코드 컨벤션 확인

🔗 Issue

Resolved #12

@Zoe0929 Zoe0929 linked an issue May 1, 2024 that may be closed by this pull request
@Zoe0929 Zoe0929 requested a review from kim-seonwoo May 1, 2024 03:45
@Zoe0929 Zoe0929 self-assigned this May 1, 2024
@Zoe0929 Zoe0929 added 🐰지희 지희의 issue ✨FEAT 기능 구현 labels May 1, 2024
@Zoe0929 Zoe0929 added this to the 🔭2차 스프린트🪐 milestone May 1, 2024
Copy link
Member

@kim-seonwoo kim-seonwoo left a comment

Choose a reason for hiding this comment

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

우리의 염원.. 우리의 희망.. 빛이 보입니다...
수고하셨습니다 👍🍀

Comment on lines +34 to +35
let hoursText = String(format: "%02d", hours)
let minutesText = String(format: "%02d", minutes)
Copy link
Member

Choose a reason for hiding this comment

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

💊 코드 포멧팅을 변경하여, 3시간 3분 이런 타입으로 가는 것 제안드립니다!

Copy link
Member Author

Choose a reason for hiding this comment

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

넵 이 부분 놓쳤네요 꼼꼼한 피드백 감사합니다~

Comment on lines 92 to 101
func requestAuthorization() {
AuthorizationCenter.shared.revokeAuthorization { result in
switch result {
case .success():
break
case .failure(let error):
print("Error for Family Controls: \(error)")
}
}
}
Copy link
Member

Choose a reason for hiding this comment

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

❓ViewModel이 아닌 HomeView에 넣으신 이유가 있을까요?

Copy link
Member Author

Choose a reason for hiding this comment

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

현재 임시로 넣은 코드입니다! 추후에 온보딩에 있는 권한 설정 뷰로 이동 예정입니다 ~

Comment on lines 49 to 55
struct AppUsage: Identifiable {
var id = UUID()
var appId: String // 앱 고유 식별자
var appName: String // 앱 이름
var goalTime: TimeInterval // 목표 사용 시간
var usedTime: TimeInterval // 현재 사용 시간
}
Copy link
Member

Choose a reason for hiding this comment

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

💊 저같은 경우에 Models폴더에 폴더링 하였는데, 논의가 필요할 것 같아요!

Copy link
Member Author

Choose a reason for hiding this comment

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

폴더링은 그렇게 가져갑시다! 완성은 아니라 폴더링을 완벽하게 하지는 않았어요

ZStack {
RoundedRectangle(cornerRadius: 10)
.foregroundStyle(.gray7)
.frame(minWidth: 335, maxHeight: 72)
Copy link
Member

Choose a reason for hiding this comment

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

❓ width 정보를 UIScrenn에 대한 extension 파일로 따로 빼서, 스크린 전체 너비를 가져와야 할지 고민입니다.. 어떻게 생각하세요?

Copy link
Member Author

@Zoe0929 Zoe0929 May 2, 2024

Choose a reason for hiding this comment

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

사실 이 부분 뷰 너비를 지정해주는 것이 걸렸는데, 다른 기기에서 확인했을 때 오토레이아웃이 적용되어 그냥 넘겼습니다. 확실히 하려면 extension으로 빼는 것이 좋을 것 같네요 관련 레퍼런스 좀 찾아보겠습니다~ 논의해봐요!

@Zoe0929 Zoe0929 force-pushed the feat/#12/usageTimeView branch from 23ad874 to 9afc735 Compare May 5, 2024 18:01
@Zoe0929 Zoe0929 merged commit f21ef5f into develop May 6, 2024
@Zoe0929 Zoe0929 deleted the feat/#12/usageTimeView branch May 8, 2024 01:49
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
✨FEAT 기능 구현 🐰지희 지희의 issue
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Feat] 이동시간 통계뷰 구현
2 participants