Skip to content

[Refactor/#67] 만다라트 분기 추가 v.2#72

Merged
Leeyoonji23 merged 10 commits intodevelopfrom
refactor/#67/mandalart
Jul 11, 2025
Merged

[Refactor/#67] 만다라트 분기 추가 v.2#72
Leeyoonji23 merged 10 commits intodevelopfrom
refactor/#67/mandalart

Conversation

@Leeyoonji23
Copy link
Copy Markdown
Contributor

💡 Summary

close #67

✅ Tasks

  • 만다라트 크기 별 분기 추가했습니다.

  • 96px -> TODO_SUB

  • 196px -> TODO_MAIN

  • 160px -> TODO_EDIT

  • 298px -> MY_MANDAL

뷰에 쓰이는 쓰임대로 네이밍 했는데, 혹시 더 좋은 의견 있으시면 주시면 감사하겠습니다!

border(테두리)는 지구가 말한 대로 토큰 사용하려고 했는데, 토큰 자체가 gradient라 background-image로만 넣을 수 있다고 해서 일단 헥스값으로 넣었습니다.
좋은 방법 알려주세요!

👀 To Reviewer

<Mandalart type="TODO_SUB" />
<Mandalart type="TODO_MAIN" />
<Mandalart type="TODO_EDIT" />
<Mandalart type="MY_MANDAL" />

이렇게 사용합니다.

📸 Screenshot

스토리북으로 확인 가능합니다.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jul 9, 2025

빌드 결과

빌드 실패 😵

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jul 9, 2025

🎨 스토리북 배포 완료!

👉 스토리북 미리보기

변경된 컴포넌트의 디자인을 확인해주세요.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jul 9, 2025

빌드 결과

빌드 성공 🎉

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jul 9, 2025

🎨 스토리북 배포 완료!

👉 스토리북 미리보기

변경된 컴포넌트의 디자인을 확인해주세요.

@Leeyoonji23 Leeyoonji23 added 🎨 Design 디자인 수정 🕶️ 윤지 ✨ Feature 기능 개발 🛠️ Refactor 코드 리팩토링 labels Jul 9, 2025
Copy link
Copy Markdown
Collaborator

@jisooooooooooo jisooooooooooo left a comment

Choose a reason for hiding this comment

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

네모의 지옥..🟧🟩🟨
넘넘 ! 고생하셨숨당! !!

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

p3) width: 'fit-content' 가 모든 variant에 중복되고 있어 baseGrid에 포함시켜도 좋을 거 같은데 따로 빼두신 이유가 있을까요?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

아녀! 수정했습니다 ㅎㅅㅎ

@github-actions
Copy link
Copy Markdown

빌드 결과

빌드 성공 🎉

@github-actions
Copy link
Copy Markdown

🎨 스토리북 배포 완료!

👉 스토리북 미리보기

변경된 컴포넌트의 디자인을 확인해주세요.

Copy link
Copy Markdown
Contributor

@kwonsaebom kwonsaebom left a comment

Choose a reason for hiding this comment

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

너무 너무 수고 많으셨습니다 !!
코드가 너무 깔끔해서 많이 배워 갑니다 .. 배움에는 끝이 없네요 ..

import * as styles from './Mandalart.css';
import { MOCK_MANDALART_DATA } from './mock';

export type Cycle = 'DAILY' | 'WEEKLY' | 'ONCE';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

p3) 여기 부분은 다른 컴포넌트에서도 사용돼서 타입으로 따로 분리해주셔도 좋을 것 같아요 ..!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

이건 따로 이슈 파서 진행하는 게 좋을 것 같아요!
새봄 님이 만드신 CycleDropDown에서 사용돼서 한꺼번에 수정하도록 하겠습니다람쥐

},
selectors: {
'&[data-completed="true"]': {
border: '0.3rem solid #305088',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

p2) 여기 부분 색상 토큰 처리 하면 어떨까요 ?!!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

이 부분 디쌤들이 의논하고 알려주신다고 하셔서 추후에 수정하겠습니다.... (to be continued..)

Copy link
Copy Markdown
Contributor

@shinjigu shinjigu left a comment

Choose a reason for hiding this comment

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

대대적인 리팩토링이네요 ㅡㅡ 특히 SQUARE_TYPES 객체와 팩토리 함수 패턴 너무 좋아요 !!
색상 토큰화와 타입 분리 작업 마무리까지 파이팅입니다 ~~ 너무 너무 너무 수고하셨서요 😎

Comment on lines +16 to +21
argTypes: {
type: {
control: 'select',
options: ['TODO_SUB', 'TODO_MAIN', 'TODO_EDIT', 'MY_MANDAL'],
},
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

p5) 스토리북에서 직접 타입을 선택할 수 있게 한 게 너무 좋네요 !! 컴포넌트 테스트가 훨씬 편해질 것 같아요 ㅡㅡ

Comment on lines 33 to 36
const handleGoalClick = (position: number) => {
setSelectedGoal(selectedGoal === position ? null : position);
onGoalClick?.(position);
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

p3) onGoalClick 호출을 상태 업데이트 전에 하는 게 좋지 않을까요 ?? 부모 컴포넌트에서 최신 상태를 받을 수 있도록 하면 좋을 것 같다는 생각이 들었습니다 !!

Comment on lines +10 to +15
const SQUARE_TYPES = {
TODO_SUB: {
width: '9.6rem',
height: '9.6rem',
mainFont: fonts.body04,
subFont: fonts.caption01,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

p5) 좋은 패턴 ㅡㅡ

@jisooooooooooo
Copy link
Copy Markdown
Collaborator

default, hover 상태일 때 만다르트 박스 색상이 둘이 바뀐 건지 피그마랑 다른 거 같은데 확인 부탁드려욤

@github-actions
Copy link
Copy Markdown

빌드 결과

빌드 성공 🎉

@github-actions
Copy link
Copy Markdown

🎨 스토리북 배포 완료!

👉 스토리북 미리보기

변경된 컴포넌트의 디자인을 확인해주세요.

@Leeyoonji23 Leeyoonji23 merged commit fa7af09 into develop Jul 11, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🎨 Design 디자인 수정 ✨ Feature 기능 개발 🕶️ 윤지 🛠️ Refactor 코드 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Refactor]: 만다라트 컴포넌트

4 participants