Skip to content

[#150] ProfileView에 UI 요소를 추가한다#161

Merged
opficdev merged 28 commits intodevelopfrom
feat/#150-ProfileView
Mar 2, 2026
Merged

[#150] ProfileView에 UI 요소를 추가한다#161
opficdev merged 28 commits intodevelopfrom
feat/#150-ProfileView

Conversation

@opficdev
Copy link
Owner

@opficdev opficdev commented Mar 2, 2026

@opficdev opficdev self-assigned this Mar 2, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 Pull Request는 ProfileView에 분기별 활동 히트맵을 통합하여 사용자 인터페이스를 크게 개선합니다. 이 기능은 사용자의 Todo 생성 및 완료 활동을 시각적으로 보여주어 생산성 패턴에 대한 통찰력을 제공합니다. 변경 사항에는 날짜 기반 필터링을 위한 TodoQuery 모델 확장, 날짜 범위별 Todo 조회 및 히트맵 활동 유형 기본 설정 관리를 위한 새로운 유스케이스 도입, 기존 Todo 상세 UI를 재사용 가능한 컴포넌트로 리팩토링하는 작업이 포함됩니다. 또한, 여러 UI 컴포넌트 파일이 올바른 이름의 폴더로 이동되었습니다.

Highlights

  • ProfileView UI 개선: 사용자의 활동을 시각화하는 분기별 활동 히트맵을 ProfileView에 추가했습니다.
  • 활동 필터링 기능: 히트맵 활동을 '생성' 및 '완료' 유형으로 필터링할 수 있는 기능을 구현했습니다.
  • 날짜 범위 Todo 조회: 특정 날짜 범위 내의 Todo를 조회하기 위한 새로운 유스케이스와 저장소 메서드를 도입하여 히트맵 기능을 지원합니다.
  • TodoQuery 확장: 더 유연한 쿼리를 위해 TodoQuery 구조체에 createdAtFrom, createdAtTo, createdAtDescending 속성을 추가했습니다.
  • Todo 상세 뷰 리팩토링: Todo 상세 정보를 위한 공통 UI를 재사용 가능한 컴포넌트(TodoDetailContentView, TodoInfoSheetView)로 추출했습니다.
  • 컴포넌트 폴더명 수정: Componeent 폴더의 오타를 Component로 수정했습니다.
Changelog
  • DevLog/App/Assembler/DomainAssembler.swift
    • 날짜 범위별 Todo 조회 및 프로필 히트맵 활동 유형 관리를 위한 새로운 유스케이스를 등록했습니다.
  • DevLog/Data/Repository/UserPreferencesRepositoryImpl.swift
    • 프로필 히트맵 활동 유형 저장을 위한 새 키를 추가하고, 이러한 기본 설정을 가져오고 설정하는 메서드를 구현했습니다.
  • DevLog/Domain/Entity/TodoQuery.swift
    • 날짜 기반 필터링을 지원하기 위해 TodoQuerycreatedAtFrom, createdAtTo, createdAtDescending 속성을 확장했습니다.
  • DevLog/Domain/Protocol/UserPreferencesRepository.swift
    • 프로필 히트맵 활동 유형을 가져오고 업데이트하기 위한 프로토콜 메서드를 추가했습니다.
  • DevLog/Domain/UseCase/UserData/Fetch/Todo/FetchTodosByDateRangeUseCase.swift
    • 날짜 범위 내 Todo를 가져오기 위한 새로운 프로토콜을 추가했습니다.
  • DevLog/Domain/UseCase/UserData/Fetch/Todo/FetchTodosByDateRangeUseCaseImpl.swift
    • 업데이트된 TodoQuery를 사용하여 날짜 범위별 Todo를 가져오는 유스케이스를 구현했습니다.
  • DevLog/Domain/UseCase/UserPreferences/Profile/FetchProfileHeatmapActivityTypesUseCase.swift
    • 프로필 히트맵 활동 유형을 가져오기 위한 새로운 프로토콜을 추가했습니다.
  • DevLog/Domain/UseCase/UserPreferences/Profile/FetchProfileHeatmapActivityTypesUseCaseImpl.swift
    • 프로필 히트맵 활동 유형을 가져오는 유스케이스를 구현했습니다.
  • DevLog/Domain/UseCase/UserPreferences/Profile/UpdateProfileHeatmapActivityTypesUseCase.swift
    • 프로필 히트맵 활동 유형을 업데이트하기 위한 새로운 프로토콜을 추가했습니다.
  • DevLog/Domain/UseCase/UserPreferences/Profile/UpdateProfileHeatmapActivityTypesUseCaseImpl.swift
    • 프로필 히트맵 활동 유형을 업데이트하는 유스케이스를 구현했습니다.
  • DevLog/Infra/Service/TodoService.swift
    • fetchTodos를 업데이트하여 날짜 범위 필터링 및 TodoQuery 매개변수에 따른 동적 정렬을 통합하고, 선택적 pageSize를 처리했습니다.
  • DevLog/Presentation/Structure/Profile/ProfileActivityType.swift
    • 프로필 히트맵 활동 유형(생성됨, 완료됨)을 정의하는 열거형을 추가했습니다.
  • DevLog/Presentation/Structure/Profile/ProfileCompletionDay.swift
    • 히트맵의 단일 날짜 완료 데이터를 나타내는 구조체를 추가했습니다.
  • DevLog/Presentation/Structure/Profile/ProfileCompletionMonth.swift
    • 주별 ProfileCompletionDay를 포함하는 월별 완료 데이터를 나타내는 구조체를 추가했습니다.
  • DevLog/Presentation/Structure/Profile/ProfileCompletionQuarter.swift
    • 월별 ProfileCompletionMonth를 포함하는 분기별 완료 데이터를 나타내는 구조체를 추가했습니다.
  • DevLog/Presentation/Structure/Profile/ProfileSelectedDayActivity.swift
    • 히트맵에서 선택된 날짜의 Todo 활동을 나타내는 구조체를 추가했습니다.
  • DevLog/Presentation/ViewModel/ProfileViewModel.swift
    • 선택된 분기, 활동 유형 및 일일 활동을 포함한 히트맵 상태를 관리하도록 ProfileViewModel을 확장하고 새로운 유스케이스를 통합했습니다.
  • DevLog/Resource/Localizable.xcstrings
    • "분기별 활동 히트맵" 및 "활동 없음"에 대한 새로운 지역화 문자열을 추가했습니다.
  • DevLog/UI/Common/Componeent/CacheableImage.swift
    • 폴더 이름의 오타를 수정하기 위해 파일 이름을 변경했습니다.
  • DevLog/UI/Common/Componeent/CheckBox.swift
    • 폴더 이름의 오타를 수정하기 위해 파일 이름을 변경했습니다.
  • DevLog/UI/Common/Componeent/LoadingView.swift
    • 폴더 이름의 오타를 수정하기 위해 파일 이름을 변경했습니다.
  • DevLog/UI/Common/Componeent/LoginButton.swift
    • 폴더 이름의 오타를 수정하기 위해 파일 이름을 변경했습니다.
  • DevLog/UI/Common/Componeent/Tag+.swift
    • 폴더 이름의 오타를 수정하기 위해 파일 이름을 변경했습니다.
  • DevLog/UI/Common/Componeent/Toast.swift
    • 폴더 이름의 오타를 수정하기 위해 파일 이름을 변경했습니다.
  • DevLog/UI/Common/Componeent/TodoItemRow.swift
    • 폴더 이름의 오타를 수정하기 위해 파일 이름을 변경했습니다.
  • DevLog/UI/Common/Componeent/ToolbarButton+.swift
    • 폴더 이름의 오타를 수정하기 위해 파일 이름을 변경했습니다.
  • DevLog/UI/Common/Componeent/WebItemRow.swift
    • 폴더 이름의 오타를 수정하기 위해 파일 이름을 변경했습니다.
  • DevLog/UI/Common/MainView.swift
    • 새로운 유스케이스를 주입하도록 ProfileView 초기화를 업데이트했습니다.
  • DevLog/UI/Common/TodoDetailContentView.swift
    • Todo 상세 정보를 표시하기 위한 새로운 재사용 가능한 SwiftUI 뷰를 추가했습니다.
  • DevLog/UI/Common/TodoInfoSheetView.swift
    • 시트에서 Todo 정보를 표시하기 위한 새로운 재사용 가능한 SwiftUI 뷰를 추가했습니다.
  • DevLog/UI/Home/TodoDetailView.swift
    • 새로운 TodoDetailContentViewTodoInfoSheetView 컴포넌트를 사용하도록 리팩토링했습니다.
  • DevLog/UI/Profile/ProfileHeatmapView.swift
    • 분기별 활동 히트맵을 표시하기 위한 새로운 SwiftUI 뷰를 추가했습니다.
  • DevLog/UI/Profile/ProfileView.swift
    • ProfileView에 새로운 활동 히트맵 섹션, 분기 탐색, 활동 유형 선택 및 일일 활동 세부 정보를 통합했습니다. 또한 툴바에서 '플러스' 버튼을 제거했습니다.
Activity
  • 이 Pull Request는 ProfileView에 UI 요소를 추가하기 위해 생성되었습니다.
  • 작성자 opficdev는 사용자 활동 데이터를 표시하고 상호 작용하는 새로운 기능을 구현했습니다.
  • 변경 사항에는 도메인 계층(새로운 유스케이스, 확장된 TodoQuery), 데이터 계층(저장소 업데이트) 및 프레젠테이션 계층(새로운 SwiftUI 뷰 및 ViewModel 로직)에 대한 상당한 추가가 포함됩니다.
  • 포함된 폴더의 오타로 인해 여러 UI 컴포넌트 파일의 이름이 변경되었습니다.
  • 이 Pull Request는 이슈 #150을 해결합니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This PR introduces several UI improvements, including a quarterly activity heatmap on the profile screen, and adds new UseCase and data models, extending existing services and ViewModels. The TodoDetailView has been refactored for improved maintainability. A medium-severity security vulnerability was identified where the TodoService logs user-supplied search keywords at the info level, potentially exposing sensitive information or PII in application logs. Recommendations have been provided to sanitize or remove sensitive data from logging statements. Additionally, feedback has been given on removing duplicate code and improving performance.

@opficdev
Copy link
Owner Author

opficdev commented Mar 2, 2026

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

이번 PR은 ProfileView에 분기별 활동을 보여주는 히트맵 UI를 추가하는 변경사항을 담고 있습니다. 새로운 기능 추가와 함께 관련된 UseCase, Repository, 데이터 모델들이 잘 정의되었습니다. 또한, 기존 TodoDetailView를 재사용 가능한 컴포넌트로 리팩토링한 점도 좋습니다. 코드 리뷰에서는 ViewModel의 일관성과 View의 역할 분리에 대한 두 가지 개선점을 제안했습니다. 전반적으로 좋은 변경이라고 생각합니다.

@opficdev
Copy link
Owner Author

opficdev commented Mar 2, 2026

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

이 PR은 프로필 뷰에 분기별 활동 히트맵을 추가하는 등 많은 UI 개선 사항을 포함하고 있습니다. 새로운 기능 구현을 위해 데이터, 도메인, 프레젠테이션 레이어에 걸쳐 필요한 UseCase, Repository, Service 로직이 잘 추가되었습니다. 특히 ProfileViewModel의 로직이 복잡하지만 상태 관리가 잘 이루어지고 있으며, 재사용 가능한 TodoDetailContentViewTodoInfoSheetView를 만들어 코드 중복을 줄인 점이 좋습니다. 코드의 가독성과 정확성을 높이기 위한 몇 가지 개선점을 제안했습니다. 전반적으로 훌륭한 작업입니다.

@opficdev
Copy link
Owner Author

opficdev commented Mar 2, 2026

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

이번 PR은 프로필 화면에 분기별 활동 히트맵을 추가하고 관련 UI 요소들을 개선하는 내용을 담고 있습니다. 전반적으로 새로운 기능이 ViewModel과 View에 잘 통합되었고, 재사용 가능한 컴포넌트로 분리하여 코드 구조를 개선한 점이 좋습니다. 코드 가독성 및 유지보수성 향상을 위한 몇 가지 제안 사항을 리뷰 코멘트로 남겼습니다.

@opficdev
Copy link
Owner Author

opficdev commented Mar 2, 2026

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

이 PR은 프로필 화면에 분기별 활동 히트맵을 추가하는 등 여러 UI 개선 사항을 포함하고 있습니다. 새로운 UseCase, 데이터 모델, View 들이 추가되었고, 기존 코드도 재사용 가능한 컴포넌트로 리팩토링되었습니다. 전반적으로 코드 구조가 개선되었지만, 몇 가지 성능 및 유지보수 관련 개선점을 제안합니다. 특히, 히트맵 데이터를 가져오는 과정에서 발생할 수 있는 성능 문제와 ViewModel의 복잡한 로직을 개선할 필요가 있습니다.

@opficdev
Copy link
Owner Author

opficdev commented Mar 2, 2026

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

이번 PR은 프로필 화면에 분기별 활동 히트맵 UI를 추가하는 변경사항을 담고 있습니다. 이를 위해 날짜 범위로 Todo를 조회하는 기능과 관련된 UseCase, Repository, Service 로직이 추가 및 수정되었습니다. 또한, 히트맵을 표시하고 상호작용하기 위한 다수의 SwiftUI 뷰와 ViewModel 로직이 구현되었습니다. 전반적으로 기능 구현이 잘 이루어졌으며, 코드 재사용을 위한 뷰 리팩토링도 훌륭합니다. 다만, ProfileViewModel의 날짜 계산 로직에서 발견된 잠재적인 버그에 대한 리뷰 의견을 남겼으니 확인 부탁드립니다.

@opficdev
Copy link
Owner Author

opficdev commented Mar 2, 2026

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

이 PR은 프로필 뷰에 분기별 활동 히트맵을 추가하는 등 여러 UI 요소를 추가하고 관련 로직을 구현합니다. 새로운 UseCase, Repository, Entity들이 추가되었고, ProfileViewModel이 크게 확장되었습니다. 전반적으로 기능 구현은 잘 이루어졌으나, 코드 유지보수성 향상을 위해 몇 가지 개선점을 제안합니다.

Comment on lines +360 to +366
var weeks: [[ProfileCompletionDay]] = []
var index = 0
while index < days.count {
let endIndex = min(index + 7, days.count)
weeks.append(Array(days[index..<endIndex]))
index += 7
}

Choose a reason for hiding this comment

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

medium

일별 데이터를 주별로 묶는 이 로직은 stride를 사용하여 더 간결하게 표현할 수 있습니다. 가독성과 Swift의 함수형 프로그래밍 스타일 활용을 위해 아래와 같이 리팩토링하는 것을 제안합니다.

        let weeks: [[ProfileCompletionDay]] = stride(from: 0, to: days.count, by: 7).map {
            Array(days[$0..<min($0 + 7, days.count)])
        }

Comment on lines 371 to 376
func startOfMonth(for date: Date, calendar: Calendar) -> Date {
guard let monthInterval = calendar.dateInterval(of: .month, for: date) else {
return calendar.startOfDay(for: date)
}
return monthInterval.start
}

Choose a reason for hiding this comment

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

medium

startOfMonth 함수가 현재 ProfileViewModel 내에서 사용되지 않는 것으로 보입니다. 코드의 간결성과 유지보수성 향상을 위해 이 함수를 제거하는 것을 고려해 보세요.

@opficdev
Copy link
Owner Author

opficdev commented Mar 2, 2026

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

프로필 화면에 GitHub의 활동 그래프와 유사한 분기별 활동 히트맵 UI를 추가하는 PR입니다. 이를 위해 날짜 범위로 Todo를 가져오는 로직, 히트맵 표시에 필요한 데이터 모델 및 ViewModel 로직, 그리고 히트맵을 그리는 SwiftUI 뷰 등 많은 부분이 추가 및 변경되었습니다. 전반적으로 기능 구현이 잘 이루어졌으나, 일부 하드코딩된 값과 지역 설정에 민감한 부분에 대해 몇 가지 개선 의견을 남깁니다.

@opficdev opficdev merged commit c16aec7 into develop Mar 2, 2026
1 check passed
@opficdev opficdev deleted the feat/#150-ProfileView branch March 2, 2026 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ProfileView에 UI 요소를 추가한다

1 participant