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

[#92] 마이페이지 6-2 #109

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

[#92] 마이페이지 6-2 #109

wants to merge 2 commits into from

Conversation

chan0310
Copy link
Contributor

@chan0310 chan0310 commented Sep 26, 2023

Issue

Description

-마이페이지 6-2 페이지 전체 구현 완료

Check List

  • PR 제목을 커밋 규칙에 맞게 작성
  • PR에 해당되는 Issue를 연결 완료
  • 적절한 라벨 설정
  • 작업한 사람 모두를 Assign
  • 작업한 팀에게 Code Review 요청 (Reviewer 등록)
  • main 브랜치의 최신 상태를 반영하고 있는지 확인

Screenshot

스크린샷 2023-09-26 오후 12 02 42 스크린샷 2023-09-26 오후 12 01 47 스크린샷 2023-09-26 오후 12 06 02

<im
스크린샷 2023-09-26 오후 12 07 31
g width="389" alt="스크린샷 2023-09-26 오후 12 07 11" src="https://github.com/DaITssu/daitssu-client/assets/57311977/c3447069-80b3-41ad-ba0a-84d2d2546213">
<img
스크린샷 2023-09-26 오후 12 06 51
width="381" alt="스크린샷 2023-09-26 오후 12 06 26" src="https://github.com/DaITssu/daitssu-client/assets/57311977/154243d0-3bc0-471b-9dae-bd90a9a970b5">

Copy link
Contributor

@ChoiSangwon ChoiSangwon left a comment

Choose a reason for hiding this comment

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

우선 간단하게 봤는데, 커밋 하나에 코드 2283줄은 너무 가독성이 떨어지네요...
제가 본건

  1. 필요없는 주석이 너무 많은 것 같습니다.
  2. styled-component가 설치되고 사용되는 것 같습니다. 저희프로젝트는 emotion만 사용합니다
  3. html태그의 style속성이 너무 길어지는게 많습니다. 이럴경우에는 별도의 스타일로 분리해서 사용하는게 나을 것 같습니다.
  4. 커밋은 최대한 작게 작성해주셔야 할것 같습니다..
  5. 스토리북 어디갔어요...

양이 너무 많아서 추가적으로 보고 피드백할 부분 계속 작성하겠습니다

@@ -29,6 +29,7 @@
"react-router-dom": "6.15.0",
"recoil": "0.7.7",
"recoil-persist": "5.1.0",
"styled-components": "^6.0.8",
Copy link
Contributor

Choose a reason for hiding this comment

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

..? 저희 스타일드 컴포넌트 사용하지 않고 이모션쓰고있지 않나요?

import { COLORS } from '@/styles/constants/colors';
import styled from '@emotion/styled';

// 가독성을 위해 스타일 파일은 별도로 둡니다.
Copy link
Contributor

Choose a reason for hiding this comment

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

이런 주석은 필요 없을것 같네요

@@ -0,0 +1,21 @@
import React from 'react';
import { COLORS } from '@/styles/constants/colors';
// HorizontalLine.js
Copy link
Contributor

Choose a reason for hiding this comment

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

여기도 주석 필요 없을거 같아요

import styled from '@emotion/styled';
import { TEXT_STYLES } from '@/styles/constants/textStyles';

// 가독성을 위해 스타일 파일은 별도로 둡니다.
Copy link
Contributor

Choose a reason for hiding this comment

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

주석 X

formData.subject= new Subject("웹프로그래밍 (가)","2028년 19학기-34",1241523);
formData.subject.add_assign_data("과제1",new Date(2023,4,5),new Date(2023,12,3),new Date(2023,12,29),"information","cor",10,8)
formData.subject.add_assign_data("과제2",new Date(2023,4,5),new Date(2223,3),new Date(2023,12,29),"information","cor",10,8)
formData.subject.add_assign_data("기말고사 공지",new Date(2023,4,5),new Date(2223,3),new Date(2023,12,29),text_m,"cor",10,8)
Copy link
Contributor

Choose a reason for hiding this comment

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

이렇게 바로 사용하는것 보다는 init()함수 같은것을 만들어서 컴포넌트가 불러와질때 실행되는게 좋을 것 같네요

justifyContent: "space-between", alignItems: "center"}}>
<img src="/assets/icon/Nav/calendar_off.svg" style={{marginTop:"2px",
alignSelf: "flex-start",
width: "20px", marginRight:"4px"}}/>
Copy link
Contributor

Choose a reason for hiding this comment

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

html 태그에 속성이 많이 달릴때에는 다 쓰는것 보다는 이모션 사용해서 스타일정의하는게 좋을것 같습니다

import React from 'react';
import { COLORS } from '@/styles/constants/colors';
// HorizontalLine.js
import styled from 'styled-components';
Copy link
Contributor

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.

emotion을 사용해야할 것 같습니다

export const MyAssignTitleBox = styled.div<Props>`
display: flex;
flex-direction: column; /* 세로로 요소를 나열합니다. */
justify-content: center; /* 세로 중앙 정렬을 수행합니다. */
Copy link
Contributor

Choose a reason for hiding this comment

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

주석 X

style={{marginTop:"5px"}}> 차시
</style.MyAssignTitleBoxText>
</th>
<th style={{width:"80px",height:"37px",textAlign:"center",backgroundColor:COLORS.grayscale.Gray4,}}>
Copy link
Contributor

Choose a reason for hiding this comment

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

이쪽 부분도 너무 속성을 많이 사용하네요. 별도 스타일로 분리해서 만들어도 될것 같아요

Copy link
Member

@halfmoon-mind halfmoon-mind left a comment

Choose a reason for hiding this comment

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

현재 PR에 너무 큰 feature에 1개의 커밋에 올라가니 한 눈에 보기 어렵네요
각 페이지 별로 PR을 분리해서 올리는건 어떤가요?

Comment on lines 34 to 35
width: ${(props) => (props.width ? `${props.width}px` : '18px')};
height: ${(props) => (props.height ? `${props.height}px` : '18px')};
Copy link
Member

Choose a reason for hiding this comment

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

props로 width나 height 값들을 따로 받아오는 이유가 있나요?

@@ -0,0 +1,26 @@
import { SubmitBox,SubmitBoxButton,SubmitBoxTitle } from "./Header.styles";
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
import { SubmitBox,SubmitBoxButton,SubmitBoxTitle } from "./Header.styles";
import * as styles from "./Header.styles";

기존에는 이런 방식으로 불러오고 아래에서는 <styles.SubmitBox>로 호출해주는게 저희 기존 코드들에서 사용했던 방식이라 동일하게 적용해주면 좋을 것 같아요

import React from 'react';
import { COLORS } from '@/styles/constants/colors';
// HorizontalLine.js
import styled from 'styled-components';
Copy link
Member

Choose a reason for hiding this comment

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

emotion을 사용해야할 것 같습니다

import styled from '@emotion/styled';
import React from 'react'; // React import 추가

interface Props {
Copy link
Member

Choose a reason for hiding this comment

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

조금 더 의미 있는 변수명을 사용해주세요

box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
`;

interface Props2 {
Copy link
Member

Choose a reason for hiding this comment

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

props1 prop2를 보면 나중에 보기 어려울 것 같아요

Comment on lines +15 to +21
const [formData, setFormData] = useState<FormData>({
title: f.title,
semester: f.semester,
studentId: f.studentId,
color: f.color,
width:f.width
});
Copy link
Member

Choose a reason for hiding this comment

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

State범위 너무 큼

import { COLORS } from '@/styles/constants/colors';
import {TEXT_STYLES} from '@/styles/constants/textStyles';
import styled from '@emotion/styled';
import React from 'react'; // React import 추가
Copy link
Member

Choose a reason for hiding this comment

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

주석 제거해주세요

Comment on lines +7 to +8
width?: number;
height?: number;
Copy link
Member

Choose a reason for hiding this comment

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

width height 변수로 받지 말고 상수로 받아주세요
만약 변수로 받는게 필요하다면 옵셔널로 받는 이유가 있나요?




interface Props2 {
Copy link
Member

Choose a reason for hiding this comment

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

의미 있는 변수명 필요

interface Props2 {
fontSize?: number;
color?:string;
fontFamily?: string;
Copy link
Member

Choose a reason for hiding this comment

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

fontFamily를 받는 이유?

Copy link
Member

@halfmoon-mind halfmoon-mind left a comment

Choose a reason for hiding this comment

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

현재 PR에 너무 큰 feature에 1개의 커밋에 올라가니 한 눈에 보기 어렵네요
각 페이지 별로 PR을 분리해서 올리는건 어떤가요?

@halfmoon-mind halfmoon-mind added the feat 🔧 새로운 기능 관련된 Issue label Sep 27, 2023
@halfmoon-mind halfmoon-mind linked an issue Sep 27, 2023 that may be closed by this pull request
@chan0310 chan0310 marked this pull request as draft September 27, 2023 07:54
@halfmoon-mind halfmoon-mind changed the title [feat] 마이페이지 6-2 완료 [#92] 마이페이지 6-2 Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat 🔧 새로운 기능 관련된 Issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feat] 마이페이지 2부분 작성
3 participants