Skip to content

[Refactor]: 하위 목표 뷰 리팩토링#202

Merged
shinjigu merged 17 commits intodevelopfrom
refactor/#188/lowerTodo
Sep 22, 2025
Merged

[Refactor]: 하위 목표 뷰 리팩토링#202
shinjigu merged 17 commits intodevelopfrom
refactor/#188/lowerTodo

Conversation

@shinjigu
Copy link
Copy Markdown
Contributor

💡 Summary

close #188

하위 목표 뷰는 상위 목표 뷰와 달리 주기 개념이 추가되어 있다는 차이점이 있지만, 상위 목표 뷰와 최대한 동일한 핵심 구조와 기능을 가지도록 전면 리팩토링을 진행했습니다 .. !

기존 lowerTodo의 코드 구조가 upperTodo와 일관성이 없어 개발 효율성이 떨어지는 문제가 있었습니다. 특히 코드 구조 불일치, 중복 코드, 불필요한 주석과 콘솔로그 등으로 인해 유지보수가 어려웠습니다. 그래서 상위와 하위 목표 뷰의 핵심 구조를 통일하여 개발 효율성을 향상시키고, 기존 기능을 유지하면서 코드를 개선하는 것을 목표로 리팩토링을 진행했습니다 !!

✅ Tasks

  • API 도메인 리팩토링
    • src/api/domain/lowerTodo/ 전체 구조를 상위와 일관되게 정리하였고, 불필요한 파일들은 제거했습니다.
  • 상수 및 유틸리티 파일 생성
    • 상위와 동일한 구조로 상수 및 유틸리티 함수를 정의했습니다.
  • 훅 파일 리팩토링
    • useLowerTodoState.ts에서 상위와 동일한 패턴으로 CRUD 로직들을 정리했고, useLowerTodoAI.tsx에서 AI 추천 로직을 상위와 일관되게 개선했습니다.
  • 컴포넌트 파일 리팩토링
    • LowerTodoHeader.tsx, MandalCompleteButton.tsx를 추가하여 상위와 동일한 구조로 변경했습니다.
    • TodoFields.tsx에서는 할 일 입력 필드들과 작은 Sub 만다라트를 렌더링하는 컴포넌트로, Square 컴포넌트 렌더링 로직을 개선했습니다.
  • 메인 페이지 및 스타일 정리
    • LowerTodo.tsx에서 컴포넌트 구조 및 로직을 상위와 일관되게 정리했고, LowerTodo.css.ts에서는 하위 목표 뷰에 대한 모든 스타일들을 정리하고, 지수님이 추가해 주신 레이아웃 토큰 적용 완료했습니다.

👀 To Reviewer

하위 목표 뷰 기능이 모두 정상 작동하는지 확인해 주시면 좋을 것 같습니다 ~

📸 Screenshot

아래는 리팩토링된 하위 목표 뷰의 파일 구조입니다.
스크린샷 2025-09-22 오전 3 06 29

@shinjigu shinjigu self-assigned this Sep 21, 2025
@shinjigu shinjigu added 🌎 지수 🛠️ Refactor 코드 리팩토링 labels Sep 21, 2025
@SOPT-36-NINEDOT SOPT-36-NINEDOT deleted a comment from vercel bot Sep 21, 2025
@SOPT-36-NINEDOT SOPT-36-NINEDOT deleted a comment from github-actions bot Sep 21, 2025
@SOPT-36-NINEDOT SOPT-36-NINEDOT deleted a comment from github-actions bot Sep 21, 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.

늦게까지 고생하셨습니다 ~~~🤩
정리하느라 힘드셨을 텐데 많이 깔꼼해진 거 같네요
코멘트 확인해 주시면 감사하겠습니당 !👍🏻🐻‍❄️

openModal(aiModalContent);
} catch (error) {
const message = getServerMessage(error, ALERT.aiFetchFail);
const failModalContent = <AiFailModal onClose={closeModal} message={message} />;
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) 실패 모달 띄울 때 저도 이 부분 고민하다가 피그마에 '다시 한 번 시도해주세요' 멘트밖에 없길래 그냥 하나로 통일해서 띄우긴 했는데..
개인적으로는 이미 추천 기능을 사용했다는 멘트는 띄워줘도 좋지 않나 생각하긴 합니다 ㅎㅎ
이 부분은 기획 측과 논의 후에 상위, 하위 통일시키면 좋을 거 같네욤

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.

@jisooooooooooo 내일 전체 회의 때 같이 이야기 나눠보고 정해요 !!

Copy link
Copy Markdown
Contributor

@Leeyoonji23 Leeyoonji23 left a comment

Choose a reason for hiding this comment

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

확실히 리팩토링 하니 깔꼼해지긴 했네요 ㅎㅎ 굳굳
코멘트 몇 개 확인해주시면 감사하겠습니다. 고생하셨습니다~!

@SOPT-36-NINEDOT SOPT-36-NINEDOT deleted a comment from vercel bot Sep 22, 2025
@SOPT-36-NINEDOT SOPT-36-NINEDOT deleted a comment from github-actions bot Sep 22, 2025
@SOPT-36-NINEDOT SOPT-36-NINEDOT deleted a comment from github-actions bot Sep 22, 2025
Copy link
Copy Markdown
Contributor

@Leeyoonji23 Leeyoonji23 left a comment

Choose a reason for hiding this comment

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

깔꼼스딱스하게 반영 잘 해주셨네요 머지고~

@shinjigu shinjigu merged commit cf41fac into develop Sep 22, 2025
6 checks passed
@shinjigu shinjigu deleted the refactor/#188/lowerTodo branch September 22, 2025 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Refactor]: 하위 목표 뷰 리팩토링

3 participants