-
Notifications
You must be signed in to change notification settings - Fork 83
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): return Summary value and modify content data #97
feat(view): return Summary value and modify content data #97
Conversation
&:nth-child(2n){ | ||
&:hover { | ||
@include animation(); | ||
margin-right: 10px; | ||
} | ||
|
||
&:first-child { | ||
margin-right: 10px; | ||
} | ||
|
||
&:last-child { | ||
margin-right: 0px; | ||
} | ||
} |
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.
author의 마지막 부분이 움직이지 않게 조정했습니다 !
justify-content: center; | ||
align-items: center; | ||
text-align: center; | ||
font-size: 15pt; | ||
margin-left: -5px; |
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.
author 간 간격이 넓다는 의견을 주셔서 지정하였습니다 !
// set names | ||
const authorSet: Set<string> = new Set(); | ||
commitNode.commit.author.names.map((name) => { | ||
authorSet.add(name.trim()); | ||
return name.trim(); | ||
}); |
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.
여기서는 한 커밋 안에 있는 author를 중복 제거해줍니다.
const authorsSet = cluster.summary.authorNames.reduce( | ||
(set, authorArray) => { | ||
authorArray.forEach((author) => { | ||
set.add(author); | ||
}); | ||
return set; | ||
}, | ||
new Set() | ||
); | ||
|
||
cluster.summary.authorNames = []; | ||
|
||
cluster.summary.authorNames.push(Array.from(authorsSet) as Array<string>); |
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.
여기서 한 클러스터 안에 있는 author를 중복 제거 해줍니다.
@@ -1,15 +1,15 @@ | |||
export type Author = { |
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.
기존의 Author를 제거한 이유는 현재 중복제거가 된 name이 들어가기 때문에 name 자체가 고유한 값입니다. 그래서 id를 따로 지정해주지 않아도 된다고 생각하여 id 속성을 제거하다보니 Author type도 굳이 사용할 필요가 없어서 그렇게 진행하였습니다.
|
||
export function getInitData({ data }: GlobalProps) { | ||
const clusters: Cluster[] = []; | ||
|
||
data.map((clusterNode) => { | ||
const cluster: Cluster = { | ||
id: nanoid(), | ||
commits: [], | ||
clusterId: clusterNode.commitNodeList[0].taskId, |
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.
@jin-Pro 님과 협의하여 clusterId로 작업하기로 했는데 아직 merge된 부분이 아니라 우선 제 코드에서는 taskId로 돌아가기 때문에 남겨두었습니다.
className="name" | ||
data-tooltip-text={authorName.name} | ||
key={authorName} | ||
className={["name"].join(" ")} |
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.
처음에는 className으로 어떻게 해보려고 하다가 어떻게 해야할지 감이 잘 안와서 style 인라인 태그로 계산된 color값을 넣고 있습니다!
86fb41c
to
34eaac4
Compare
<span className="nameBox"> | ||
{commit.authorNames.map((authorName: Author) => { | ||
<div className="cluster" key={cluster.clusterId}> | ||
<p className="summary" key={cluster.summary.summaryId}> |
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.
(궁금) 여기의 key도 필요한지요? loop의 제일 가장자리만 key가 있으면 될 것 같아서 여쭤봅니다.
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.
생각해보니 저 부분 id는 필요 없겠군요 ! 피드백 감사합니다 !! 해당 부분 수정해서 다시 올렸습니다 !!
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.
오. 그렇다면
아래의 nameBox도 필요없을 것 같고,
keywords들에 걸린 것도 keyword 값으로 해도 충분할 것 같은데, 한번 검토 부탁드립니다~.
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.
이전에 중복된 값이 계속 들어가서 id가 필요했는데 keyword도 author와 마찬가지로 중복없이 들어가서 id 없이도 괜찮네요 !! 해당 부분 수정해서 올리겠습니다 !!
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.
WOW!!!!
컴포넌트들이 합체!! 될때의 모습이 정말 기대됩니다!! 🛩️
7310409
to
822f337
Compare
822f337
to
e7a3b9f
Compare
e7a3b9f |
export const authorBgColorArray = [ | ||
"00ADF7", | ||
"0077AA", | ||
"4AC3F7", | ||
"0BD9E0", | ||
"33C2FF", | ||
"4BC4F9", | ||
"0089C4", | ||
]; |
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.
최대한 비슷한 계열로 넣어보았는데 너무 색이 튀면 다시 조정해보는 게 필요해보입니다.
return cluster; | ||
}); | ||
|
||
return clusters; | ||
} | ||
|
||
export function getColorValue(name: string) { |
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.
author의 앞 2자를 가져와서 컬러값을 지정해줍니다.
Recent Issue
#40
Work List
86fb41c
37e1946
npm install
실행으로 인한 package-lock.json 내용 변경76e447e
Result
(변경전)
(변경후)
고민해봐야할 점
To do