Conversation
There was a problem hiding this comment.
우선 간단하게 봤는데, 커밋 하나에 코드 2283줄은 너무 가독성이 떨어지네요...
제가 본건
- 필요없는 주석이 너무 많은 것 같습니다.
- styled-component가 설치되고 사용되는 것 같습니다. 저희프로젝트는 emotion만 사용합니다
- html태그의 style속성이 너무 길어지는게 많습니다. 이럴경우에는 별도의 스타일로 분리해서 사용하는게 나을 것 같습니다.
- 커밋은 최대한 작게 작성해주셔야 할것 같습니다..
- 스토리북 어디갔어요...
양이 너무 많아서 추가적으로 보고 피드백할 부분 계속 작성하겠습니다
| "react-router-dom": "6.15.0", | ||
| "recoil": "0.7.7", | ||
| "recoil-persist": "5.1.0", | ||
| "styled-components": "^6.0.8", |
There was a problem hiding this comment.
..? 저희 스타일드 컴포넌트 사용하지 않고 이모션쓰고있지 않나요?
| import { COLORS } from '@/styles/constants/colors'; | ||
| import styled from '@emotion/styled'; | ||
|
|
||
| // 가독성을 위해 스타일 파일은 별도로 둡니다. |
| @@ -0,0 +1,21 @@ | |||
| import React from 'react'; | |||
| import { COLORS } from '@/styles/constants/colors'; | |||
| // HorizontalLine.js | |||
| import styled from '@emotion/styled'; | ||
| import { TEXT_STYLES } from '@/styles/constants/textStyles'; | ||
|
|
||
| // 가독성을 위해 스타일 파일은 별도로 둡니다. |
| 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) |
There was a problem hiding this comment.
이렇게 바로 사용하는것 보다는 init()함수 같은것을 만들어서 컴포넌트가 불러와질때 실행되는게 좋을 것 같네요
| justifyContent: "space-between", alignItems: "center"}}> | ||
| <img src="/assets/icon/Nav/calendar_off.svg" style={{marginTop:"2px", | ||
| alignSelf: "flex-start", | ||
| width: "20px", marginRight:"4px"}}/> |
There was a problem hiding this comment.
html 태그에 속성이 많이 달릴때에는 다 쓰는것 보다는 이모션 사용해서 스타일정의하는게 좋을것 같습니다
| import React from 'react'; | ||
| import { COLORS } from '@/styles/constants/colors'; | ||
| // HorizontalLine.js | ||
| import styled from 'styled-components'; |
| export const MyAssignTitleBox = styled.div<Props>` | ||
| display: flex; | ||
| flex-direction: column; /* 세로로 요소를 나열합니다. */ | ||
| justify-content: center; /* 세로 중앙 정렬을 수행합니다. */ |
| style={{marginTop:"5px"}}> 차시 | ||
| </style.MyAssignTitleBoxText> | ||
| </th> | ||
| <th style={{width:"80px",height:"37px",textAlign:"center",backgroundColor:COLORS.grayscale.Gray4,}}> |
There was a problem hiding this comment.
이쪽 부분도 너무 속성을 많이 사용하네요. 별도 스타일로 분리해서 만들어도 될것 같아요
halfmoon-mind
left a comment
There was a problem hiding this comment.
현재 PR에 너무 큰 feature에 1개의 커밋에 올라가니 한 눈에 보기 어렵네요
각 페이지 별로 PR을 분리해서 올리는건 어떤가요?
| width: ${(props) => (props.width ? `${props.width}px` : '18px')}; | ||
| height: ${(props) => (props.height ? `${props.height}px` : '18px')}; |
There was a problem hiding this comment.
props로 width나 height 값들을 따로 받아오는 이유가 있나요?
| @@ -0,0 +1,26 @@ | |||
| import { SubmitBox,SubmitBoxButton,SubmitBoxTitle } from "./Header.styles"; | |||
There was a problem hiding this comment.
| 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'; |
| import styled from '@emotion/styled'; | ||
| import React from 'react'; // React import 추가 | ||
|
|
||
| interface Props { |
| box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); | ||
| `; | ||
|
|
||
| interface Props2 { |
There was a problem hiding this comment.
props1 prop2를 보면 나중에 보기 어려울 것 같아요
| const [formData, setFormData] = useState<FormData>({ | ||
| title: f.title, | ||
| semester: f.semester, | ||
| studentId: f.studentId, | ||
| color: f.color, | ||
| width:f.width | ||
| }); |
| import { COLORS } from '@/styles/constants/colors'; | ||
| import {TEXT_STYLES} from '@/styles/constants/textStyles'; | ||
| import styled from '@emotion/styled'; | ||
| import React from 'react'; // React import 추가 |
| width?: number; | ||
| height?: number; |
There was a problem hiding this comment.
width height 변수로 받지 말고 상수로 받아주세요
만약 변수로 받는게 필요하다면 옵셔널로 받는 이유가 있나요?
|
|
||
|
|
||
|
|
||
| interface Props2 { |
| interface Props2 { | ||
| fontSize?: number; | ||
| color?:string; | ||
| fontFamily?: string; |
halfmoon-mind
left a comment
There was a problem hiding this comment.
현재 PR에 너무 큰 feature에 1개의 커밋에 올라가니 한 눈에 보기 어렵네요
각 페이지 별로 PR을 분리해서 올리는건 어떤가요?
Issue
Description
-마이페이지 6-2 페이지 전체 구현 완료
Check List
main브랜치의 최신 상태를 반영하고 있는지 확인Screenshot
<im


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
width="381" alt="스크린샷 2023-09-26 오후 12 06 26" src="https://github.com/DaITssu/daitssu-client/assets/57311977/154243d0-3bc0-471b-9dae-bd90a9a970b5">