-
Notifications
You must be signed in to change notification settings - Fork 82
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
Conversation
manipulate FileIcicleSummary data
manipulate FileIcicleSummary data
manipulate FileIcicleSummary data
Following main color githru#84
- Increased font size - Change font color to white
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
태림님 코드보면서 항상 많이 배우는 것 같습니다! 수고하셨어요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
드디어 마지막 퍼즐이 맞춰지는군요 : -)
고생하셨습니다~.
// 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이제 이 주석은 제외해도 괜찮겠습니다 😄
빠른 배포 준비를 위해 일단 제가 merge 하겠습니다. |
FileIclelSummary 데이터 가공 로직을 추가하고 해당 로직을 활용해 props로부터 데이터를 받아와서 사용할 수 있도록 수정했습니다!
데이터 가공
데이터 가공부분은 아래 세가지 함수를 사용해 구현했습니다.
코드는 githru의 FileStructureAnalyzer 를 참고했습니다.
커밋노드에서 확인할 수 있는 변경된 파일들에 한해서
{ 파일 경로 : 파일 변경 정보(FileChanges 타입) }
형태 맵을 리턴합니다.파일 경로는
github/workflows/gradle-wrapper-validation.yml
형태로 /를 구분자로 사용합니다.이 부분은 조금 애매하긴한데요 우선 기능 구현을 위해 올립니다.
githru코드랑 비슷하게 구현하려고 가져왔고 FileIcicleSummary에서 파일 이름 옆 숫자를 나타내기 위해서 사용하는 값입니다.
{ 파일 경로 : 1 }
형태 맵을 리턴합니다.변경된 모든 파일 경로를 순회하면서 트리 구조를 만듭니다.
props 적용
feat(view): manipulate data from props, remove fake assets in <FileIcicleSummary/>
기존 목데이터 연동 코드를 제거하고 props로 데이터 받아와서 사용하도록 구현했습니다.
기타
리뷰 반영 및 사용하지 않는 코드 제거했습니다.