Skip to content

박세은 리팩토링 과제 제출 #2

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

Open
wants to merge 32 commits into
base: main
Choose a base branch
from

Conversation

se-eun-park
Copy link

@se-eun-park se-eun-park commented Feb 14, 2024

변경 사항

보드(Board)

  • UI
    • Board 위치 상단 고정
    • Board 범위를 초과한 Card요소는 스크롤

Copy link
Collaborator

@moong23 moong23 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 +6 to +10
<BrowserRouter>
<Routes>
<Route path="/" element={<MainPage />}></Route>
</Routes>
</BrowserRouter>
Copy link
Collaborator

Choose a reason for hiding this comment

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

라우팅 👍 👍

Copy link

Choose a reason for hiding this comment

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

단일 path인 경우에도 라우팅을 사용해서 얻을 수 있는 이점이 있나요?(질문임!!!)

// import AddForm from "../components/AddForm";

const MainPage = () => {
const { forms } = useFormStore();
Copy link
Collaborator

Choose a reason for hiding this comment

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

커스텀훅이 상당히 깔끔하게 잘 짜여진것 같아요 👍

Comment on lines +82 to +83
width: 3.2rem;
height: 3.2rem;
Copy link
Collaborator

Choose a reason for hiding this comment

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

비율이 정해져있는 이미지의 경우 이미지 크기를 바꾸고자 할 때 유지보수를 위해

Suggested change
width: 3.2rem;
height: 3.2rem;
width: 3.2rem;
aspect-ratio: 1/1;

처럼 사용해도 좋을것같습니다~!

<FormBox>
{forms.map((form, index) => (
<Form
key={index}
Copy link
Collaborator

Choose a reason for hiding this comment

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

#1 (comment)
요기에도 적어놓은것처럼
key값에는 index처럼 변할 수 있는 값이 아닌, 변하지 않는 값을 넣어주시면 좋습니다

</AddFormButton>

<ColorChart>
<Color1 type="button" onClick={handleColorClick("#c674ca")} />
Copy link
Collaborator

Choose a reason for hiding this comment

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

color를 props로 받아서 styled-component에서 재사용성을 높일 수 있을 것 같습니다!

Comment on lines 110 to 125
const Color1 = styled.button`
display: block;
width: 2.8rem;
height: 2.8rem;
margin-right: 1rem;
border-radius: 50%;
background-color: #c674ca;

&:hover {
cursor: pointer;
}

&:focus {
border: 0.2rem dashed #ffffff;
}
`;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
const Color1 = styled.button`
display: block;
width: 2.8rem;
height: 2.8rem;
margin-right: 1rem;
border-radius: 50%;
background-color: #c674ca;
&:hover {
cursor: pointer;
}
&:focus {
border: 0.2rem dashed #ffffff;
}
`;
const Color1 = styled.button`
display: block;
width: 2.8rem;
height: 2.8rem;
margin-right: 1rem;
border-radius: 50%;
background-color: ${(props) => props.color};
&:hover {
cursor: pointer;
}
&:focus {
border: 0.2rem dashed #ffffff;
}
`;

* form 추가 후에도 AddForm이없어지지 않는 문제 해결

* 아무 값도 없는데 create 눌리는 문제 해결
Copy link

@s0ojin s0ojin 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 +6 to +10
<BrowserRouter>
<Routes>
<Route path="/" element={<MainPage />}></Route>
</Routes>
</BrowserRouter>
Copy link

Choose a reason for hiding this comment

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

단일 path인 경우에도 라우팅을 사용해서 얻을 수 있는 이점이 있나요?(질문임!!!)

</BoardTitle>
<FormBox>
{forms.map((form, index) => (
<Form
Copy link

Choose a reason for hiding this comment

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

Form은 일정 카드라는 것을 유추하기 어려운 네이밍같습니다.

<MoreViewsButton
src={MoreViews}
onClick={handleMoreViewsButton}
></MoreViewsButton>
Copy link

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.

여기서 이미 혼냈구만 !

return (
<StyleForm color={color}>
<FormButton>
<ReWriteButton type="button" src={ReWrite} />
Copy link

Choose a reason for hiding this comment

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

svg 아이콘을 모두 img src로 사용하시고 계신데 혹시 svg를 컴포넌트로 사용하는 방식에 대해서 알고 계신가요? 아이콘이나 로고 같은 svg 파일의 경우에는 컴포넌트로 관리하는 것이 더 좋을 수 있을 것 같습니다.

doreming16 added a commit to doreming16/ssafe_todo that referenced this pull request Feb 23, 2024
@se-eun-park se-eun-park changed the title 박세은 pr 해주세요 박세은 리팩토링 과제 제출 Feb 26, 2024
Comment on lines +20 to +24
<BoardTitle>
{category === "ToDo" ? "To Do 🎠" : null}
{category === "InProgress" ? "In Progress 🎡" : null}
{category === "Done" ? "Done 🎆" : null}
</BoardTitle>
Copy link
Member

Choose a reason for hiding this comment

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

컴포넌트화 시켜서 category를 전달하면 좋을거같아 !

setReTitle={setReTitle}
setReText={setReText}
category={category}
></Form>
Copy link
Member

Choose a reason for hiding this comment

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

셀프 클로징 태그,,
약속 지키셔야죠,,

<MoreViewsButton
src={MoreViews}
onClick={handleMoreViewsButton}
></MoreViewsButton>
Copy link
Member

Choose a reason for hiding this comment

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

여기서 이미 혼냈구만 !

<CreateButton type="submit" disabled={!title || !text}>
Create
</CreateButton>
<ExitButton type="button" onClick={handleExitButton} src={Exit} />
Copy link
Member

Choose a reason for hiding this comment

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

onClick에 익명함수로 전달하는게 지금 상황에서는 더 깔끔해보일거같다는
개인적 생각이 있습니당 ~!

Comment on lines +30 to +35
// const handleCategoryButton = (button) => {
// if (button === "ToDo") {
// } else if (button === "InProgress") {
// } else {
// }
// };
Copy link
Member

Choose a reason for hiding this comment

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

주석 지워 주세오...

<ExitButton type="button" onClick={handleExitButton} src={Exit} />
</FormButton>
<FormTitle>{formTitle}</FormTitle>
<FormText formText={formText}>{formText}</FormText>
Copy link
Member

Choose a reason for hiding this comment

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

얘는 먼데 formText를 props로 전달해 ??

import useFormStore from "../../store/store";
import Exit from "../../assets/button/Exit.svg";

const ReWrite = ({ category, rewrite, retitle, retext, setRewrite }) => {
Copy link
Member

Choose a reason for hiding this comment

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

ReWriteFrom.jsx 면 함수명도 ReWriteForm이 더 자연스러워보여

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants