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

팀원소개서 이슈 카드 리스트 #51

Merged
merged 30 commits into from
Jan 13, 2022
Merged

팀원소개서 이슈 카드 리스트 #51

merged 30 commits into from
Jan 13, 2022

Conversation

100Gyeon
Copy link
Member

@100Gyeon 100Gyeon commented Jan 12, 2022

⛓ Related Issues

📋 작업 내용

  • 피드백 남긴 인원의 프로필 이미지를 최대 3개 포함하고 있는 IssueMemberList 컴포넌트 구조화 및 스타일링
  • 팀 프로필과 사용자 이름을 포함하고 있는 IssueTeamInfo 컴포넌트 구조화 및 스타일링
  • IssueCard, IssueCardList 컴포넌트 구조화 및 스타일링
  • 이슈 카드 누르면 상세(피드백) 페이지로 이동하도록 구현

📌 PR Point

[궁금한 점]

  • 리액트 최적화를 위해서 index를 사용하지 않는 것이 좋다고 배웠는데,
    unique key를 만들기 위해서 아래와 같이 작성하게 되었습니다. 더 좋은 방법이 없을까요😥

    <div>
      {issueMembers.slice(0, MAX_IMAGE_NUM).map((member, index) => (
        <img key={`Team ${id}-Issue ${issueNumber}-Index ${index}`} src={member} />
      ))}
    </div>

[기타]

  • 로고 클릭했을 때 "/home/neoga"로 이동할 수 있도록 you -> neoga 수정

  • font-size: ${size};에 px이 없어서 font-size: ${size}px;로 변경

    export const FONT = ({ size, weight, position }: Font) => css`
      font-size: ${size}px;
      font-weight: ${getFontWeight(weight)};
      letter-spacing: ${getLetterSpacing(position)};
    `;

👀 스크린샷 / GIF / 링크

https://naegasogaeseo-dev.kro.kr/home/team

@100Gyeon 100Gyeon added feature 🎄 기능 개발 layout 🍃 레이아웃 개발 labels Jan 12, 2022
@100Gyeon 100Gyeon added this to In progress in 팀원소개서 via automation Jan 12, 2022
@100Gyeon 100Gyeon self-assigned this Jan 12, 2022
@SeojinSeojin
Copy link
Member

울 웹쁜이 고생많았어 ! 여기서 미리보기로 보면서 쉬어~

Copy link
Member

@SeojinSeojin SeojinSeojin left a comment

Choose a reason for hiding this comment

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

새벽 6시라니.. 넘 수고했어ㅜㅜㅜㅜ
컴포넌트 안에 데이터 있는 부분들만 분리하면 될듯!!👍✨


function TeamMain() {
const { teamID } = useParams();
return <div>팀원소개서 메인, 팀 번호는 {teamID}</div>;
const issueListData = [
Copy link
Member

Choose a reason for hiding this comment

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

여기서 데이터를 받기보다는 목데이터로 받아오는 방식을 써봐야 할 것 같아!!
이렇게 하면 여기서 쓴거랑 서버에서 준거랑 변수명 등이 다를 때 다시 처리하는 것도 번거롭고 바꿀 내용들이 많아질 것 같아!

#43
#23

이 두 개 참고해서 함 해볼래?

  1. infrastructure 폴더의 api의 team.ts에 getTeamIssue(teamID: string) : Promise 이런 식으로 멤버 함수를 만들어주고
  2. types의 team.ts에 요청 응답 값으로 받을 값들을 정의해주고 (밑에 있는 프롭들을 그대로 인터페이스로 따면 될듯!)
  3. 여기 있는 목데이터를 싹다 mock의 team.data.ts에 TEAM_ISSUE_INFO를 만들어서 옮겨주고
  4. mock의 team.ts에 getTeamIssueInfo 함수를 만들어서 리턴한 다음에
  5. 이 컴포넌트 안에서는 async 요청으로 받아오기만 하면 될듯해!!

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 10 to 11
id: 1,
issueNumber: 1,
Copy link
Member

Choose a reason for hiding this comment

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

id랑 issueNumber이 둘 다 있어야 할 이유가 있을까?
하나만 있어도 괜찮을 것 같아!!

Copy link
Member Author

Choose a reason for hiding this comment

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

나는 id를 teamID로 생각하고 줬는데 수정해 볼게 !!


const navigate = useNavigate();
const handleIssueClick = (id: number, issueNumber: number) => {
navigate(`/team/${id}/${issueNumber}`);
Copy link
Member

Choose a reason for hiding this comment

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

id 말고 teamID를 넘겨줘야 할 것 같아!! 여기서 id는 이슈의 아이디니까...

팀아이디/이슈아이디 이렇게 되어야 하는데 이슈아이디/이슈아이디로 넘어가는 것 같아!

@@ -30,7 +30,7 @@ const getLetterSpacing = (position: Font['position']) => {
};

export const FONT = ({ size, weight, position }: Font) => css`
font-size: ${size};
font-size: ${size}px;
Copy link
Member

Choose a reason for hiding this comment

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

와아앙 고쳐주어서 고마우이~!!!!

@@ -32,6 +33,41 @@ function HomeTeam() {
},
];

const issueListData = [
Copy link
Member

Choose a reason for hiding this comment

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

이거도 마찬가지로 여기서 선언하지 말고 api에서 받아와서 비동기로 처리하는 방식을 써봐야 할 것 같아!!

@SeojinSeojin
Copy link
Member

울 웹쁜이 고생많았어 ! 여기서 미리보기로 보면서 쉬어~

Copy link
Member

@Hyoin-Kim Hyoin-Kim 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 +13 to +15
& > * + * {
margin-left: 6px;
}
Copy link
Member

Choose a reason for hiding this comment

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

요거는 어디에 사용되는 스타일이야,? * + * 요게 몬지 궁금해

Copy link
Member Author

Choose a reason for hiding this comment

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

나는 이 컴포넌트 안에 들어있는 모든 태그들의 간격을 6px로 설정하려고 썼어!
인접 형제 결합자(+) 쓰면 한꺼번에 간격 조정할 때 유용해 👍🏻

Copy link
Member

Choose a reason for hiding this comment

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

와 신기하다 고마워 알려줘서!!!

@SeojinSeojin
Copy link
Member

울 웹쁜이 고생많았어 ! 여기서 미리보기로 보면서 쉬어~

<IssueCard
key={issue.teamId}
onIssueClick={() => onIssueClick(issue.teamId, issue.issueNumber)}
{...issue}
Copy link
Member

Choose a reason for hiding this comment

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

omg 이렇게 할 수 있구나

@SeojinSeojin
Copy link
Member

울 웹쁜이 고생많았어 ! 여기서 미리보기로 보면서 쉬어~ 다른 웹쁜이들한테도 자랑해줘~

@SeojinSeojin
Copy link
Member

울 웹쁜이 고생많았어 ! 여기서 미리보기로 보면서 쉬어~ 다른 웹쁜이들한테도 자랑해줘~

@SeojinSeojin
Copy link
Member

울 웹쁜이 고생많았어 ! 여기서 미리보기로 보면서 쉬어~ 다른 웹쁜이들한테도 자랑해줘~

@SeojinSeojin
Copy link
Member

울 웹쁜이 고생많았어 ! 여기서 미리보기로 보면서 쉬어~ 다른 웹쁜이들한테도 자랑해줘~

@SeojinSeojin
Copy link
Member

울 웹쁜이 고생많았어 ! 여기서 미리보기로 보면서 쉬어~ 다른 웹쁜이들한테도 자랑해줘~

Copy link
Member

@SeojinSeojin SeojinSeojin left a comment

Choose a reason for hiding this comment

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

데이터 넘 잘 달았다..!! 수고 많았우!!!!1
대신 실제로 서버 통신을 할 때는 teamID가 필요할 것 같아서 그걸 미리 넘겨주어야 할 것 같아!!

Comment on lines +11 to +12
getTeamProfile(): Promise<TeamProfileData>;
getTeamIssue(): Promise<TeamIssueData>;
Copy link
Member

Choose a reason for hiding this comment

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

팀 프로필이랑 이슈를 받으려면 팀 번호가 있어야 할 것 같아!!
파라미터로 teamID:string을 줘야 할듯해!

Copy link
Member Author

Choose a reason for hiding this comment

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

팀 상세 페이지 만들 때 참고할게 고마워 ㅎㅎ

Copy link
Member

Choose a reason for hiding this comment

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

미안혀... 고마워....

teamImage?: string;
teamName: string;
memberName: string;
onIssueClick: (id: number, issueNumber: number) => void;
Copy link
Member

Choose a reason for hiding this comment

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

teamID면 나중에 알아보기 편할 것 가타유~

Copy link
Member Author

Choose a reason for hiding this comment

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

헉 다 바꾼 줄 알았는데 여기도 남아있었구나 고마워 !!!! 꼼꼼해 😘

function IssueMemberList(props: IssueMemberListProps) {
const { teamID, issueNumber, issueMembers } = props;
const length = issueMembers.length;
const MAX_IMAGE_NUM = 3;
Copy link
Member

Choose a reason for hiding this comment

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

상수로 뺀거 진짜 잘했닷!!!

@SeojinSeojin
Copy link
Member

울 웹쁜이 고생많았어 ! 여기서 미리보기로 보면서 쉬어~ 다른 웹쁜이들한테도 자랑해줘~

@SeojinSeojin
Copy link
Member

울 웹쁜이 고생많았어 ! 여기서 미리보기로 보면서 쉬어~ 다른 웹쁜이들한테도 자랑해줘~

@SeojinSeojin
Copy link
Member

울 웹쁜이 고생많았어 ! 여기서 미리보기로 보면서 쉬어~ 다른 웹쁜이들한테도 자랑해줘~

@SeojinSeojin
Copy link
Member

울 웹쁜이 고생많았어 ! 여기서 미리보기로 보면서 쉬어~ 다른 웹쁜이들한테도 자랑해줘~

Comment on lines +11 to +12
getTeamProfile(): Promise<TeamProfileData>;
getTeamIssue(): Promise<TeamIssueData>;
Copy link
Member

Choose a reason for hiding this comment

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

미안혀... 고마워....

@SeojinSeojin
Copy link
Member

image
image

@SeojinSeojin
Copy link
Member

image
image

@100Gyeon 100Gyeon merged commit dd81002 into dev Jan 13, 2022
팀원소개서 automation moved this from In progress to Done Jan 13, 2022
@100Gyeon 100Gyeon deleted the feat/#29 branch January 13, 2022 09:28
@100Gyeon 100Gyeon added this to Done in 웹 칸반 보드 Jan 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 🎄 기능 개발 layout 🍃 레이아웃 개발
Development

Successfully merging this pull request may close these issues.

팀원소개서 이슈 카드 리스트
4 participants