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(view): manipulate data from props, remove fake assets in <FileIcicleSummary/> #156

Merged
merged 9 commits into from
Sep 13, 2022

Conversation

taejs
Copy link
Contributor

@taejs taejs commented Sep 12, 2022

FileIclelSummary 데이터 가공 로직을 추가하고 해당 로직을 활용해 props로부터 데이터를 받아와서 사용할 수 있도록 수정했습니다!

데이터 가공

데이터 가공부분은 아래 세가지 함수를 사용해 구현했습니다.
코드는 githru의 FileStructureAnalyzer 를 참고했습니다.

  • feature(view): add getFileChangesMap function
    커밋노드에서 확인할 수 있는 변경된 파일들에 한해서 { 파일 경로 : 파일 변경 정보(FileChanges 타입) } 형태 맵을 리턴합니다.
    파일 경로는 github/workflows/gradle-wrapper-validation.yml 형태로 /를 구분자로 사용합니다.
  • feature(view): add getFileScoresMap function
    이 부분은 조금 애매하긴한데요 우선 기능 구현을 위해 올립니다.
    githru코드랑 비슷하게 구현하려고 가져왔고 FileIcicleSummary에서 파일 이름 옆 숫자를 나타내기 위해서 사용하는 값입니다.
    { 파일 경로 : 1 } 형태 맵을 리턴합니다.
  • feature(view): add getFileChangesTree function
    변경된 모든 파일 경로를 순회하면서 트리 구조를 만듭니다.

props 적용

feat(view): manipulate data from props, remove fake assets in <FileIcicleSummary/>
기존 목데이터 연동 코드를 제거하고 props로 데이터 받아와서 사용하도록 구현했습니다.

기타

리뷰 반영 및 사용하지 않는 코드 제거했습니다.

  • chore(view): move constants to FileIcicleSummary.const.ts
  • chore(view): change compare function to sort by value desc
  • style(view): change color code of FileIcicleSummary
  • chore(view): remove unused title of FileIcicleSummary
  • style(view): improve readability of FileIcicleSummary

@taejs taejs self-assigned this Sep 12, 2022
@taejs taejs requested a review from a team as a code owner September 12, 2022 19:26
@taejs taejs mentioned this pull request Sep 12, 2022
7 tasks
@hanseul-lee hanseul-lee added this to the v0.1.0 milestone Sep 12, 2022
Copy link
Member

@jin-Pro jin-Pro left a comment

Choose a reason for hiding this comment

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

태림님 코드보면서 항상 많이 배우는 것 같습니다! 수고하셨어요

Copy link
Contributor

@ytaek ytaek 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 24 to 26
// Initialize data - mutating before draw file icicle tree
// https://github.com/d3/d3-hierarchy/blob/v3.1.2/README.md#hierarchy
// https://observablehq.com/@d3/visiting-a-d3-hierarchy#count
Copy link
Contributor

Choose a reason for hiding this comment

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

이제 이 주석은 제외해도 괜찮겠습니다 😄

@ytaek
Copy link
Contributor

ytaek commented Sep 13, 2022

빠른 배포 준비를 위해 일단 제가 merge 하겠습니다.
리뷰 더 달아주실 분들은 달아주셔도 되고, 수정은 다른 PR에서 진행하시지요 : -)

@ytaek ytaek merged commit 6031156 into githru:main Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants