Skip to content

[feat] 프로젝트 수정 기능 구현 및 FSD 레이어 정리 - #64

Merged
junjuny0227 merged 8 commits into
developfrom
feat/edit-project-info
Jun 3, 2026
Merged

junjuny0227 merged 8 commits into
developfrom
feat/edit-project-info

Conversation

@junjuny0227

Copy link
Copy Markdown
Member

개요 💡

프로젝트 수정 기능을 구현하고, 작업 과정에서 발견된 FSD 아키텍처 위반 사항을 함께 개선했습니다.

작업내용 ⌨️

✨ 프로젝트 수정 기능 구현

  • PATCH /api/v2/projects/my/{projectId} 엔드포인트 연동
  • /mypage/edit/[id] 라우트 및 EditProjectPage 뷰 추가 (서버 사이드 데이터 프리페치)
  • features/edit-project 피처 신설
    • usePatchMyProject: PATCH mutation 훅
    • EditConfirmModal: 수정 완료 전 관리자 승인 안내 확인 모달
  • ProjectForm에 edit mode props 추가 (mode, initialData, initialParticipants, onValidSubmit)
  • ProjectActionMenu 수정하기 버튼에 /mypage/edit/{id} 라우팅 연결
  • ProjectType에 ParticipantType 및 participants 필드 추가

♻️ FSD 아키텍처 개선

ProjectActionMenu 레이어 이동

  • delete와 edit 두 feature 관심사를 조합하는 컴포넌트가 features/delete-project 슬라이스에 귀속되어 있던 문제 수정
  • views/mypage/ui/ProjectActionMenu.tsx로 이동

register-project 슬라이스 리네임

  • 등록·수정 모드를 모두 처리하는 슬라이스의 책임을 명확히 하기 위해 features/register-project → features/project-form으로 변경
  • RegisterProjectForm → ProjectForm 컴포넌트명 변경

중복 타입 제거

  • edit-project의 EditProjectReqType과 project-form의 ProjectRegistrationReqType이 구조적으로 동일하여 중복 발생
  • ProjectFormReqType을 entities/project/model/types.ts에 정의하고 두 피처에서 공통 참조

🎨 UI 스타일 정비

  • DeleteConfirmModal, ProjectActionMenu, Header 드롭다운의 border 표현을 shadow-[inset_0_0_0_1px_#2F2F2F]로 통일
  • DeleteConfirmModal 타이포그래피 세부 조정

스크린샷/동영상 📸

프로젝트 수정 페이지 수정 확인 모달
기존 등록 폼과 동일한 UI, 기존 데이터 자동 채움 관리자 승인 필요 안내 후 PATCH 요청

리뷰 요청사항 👀

  • ProjectForm edit mode 설계: features/project-form 내부에 edit mode props를 추가하는 방식을 택했습니다. features 간 lateral import를 피하면서 폼 UI 중복을 없애기 위한 선택인데, 별도 EditProjectForm으로 분리하는 것이 더 나을지 의견 부탁드립니다.
  • ProjectFormReqType 위치: 두 feature가 공유하는 요청 바디 타입을 entities/project에 두었습니다. entities가 API 요청 타입까지 소유하는 게 적절한지 검토 부탁드립니다.

- PATCH /api/v2/projects/my/{projectId} 엔드포인트 연동
- /mypage/edit/[id] 라우트 및 EditProjectPage 뷰 추가
- edit-project 피처 신설 (usePatchMyProject, EditConfirmModal)
- RegisterProjectForm에 edit mode props 추가 (initialData, initialParticipants, onValidSubmit)
- ProjectActionMenu 수정하기 버튼에 Link 라우팅 연결
- ProjectType에 ParticipantType 및 participants 필드 추가
- EditProjectPage에 useGetMyProject 훅 적용으로 SSR 초기 데이터 활용
- initialProjectData prop을 undefined 허용으로 완화
- RegisterProjectFormProps.initialData 필드를 optional로 완화
- notFound 조건에서 data 체크 중복 제거
- DeleteConfirmModal, ProjectActionMenu, Header 드롭다운 border 제거
- shadow-[inset_0_0_0_1px_#2F2F2F]로 테두리 표현 통일
- DeleteConfirmModal 제목/본문 tracking, leading 세부 조정
- ProjectActionMenu를 features/delete-project에서 views/mypage로 이동
  - 두 feature(edit, delete)를 조합하는 컴포넌트는 상위 레이어에 귀속
  - features/delete-project/index.ts에 DeleteConfirmModal export 추가
- register-project 슬라이스를 project-form으로 리네임
  - 등록/수정 모드를 모두 담당하는 슬라이스 책임 명확화
  - RegisterProjectForm → ProjectForm으로 컴포넌트명 변경
- ProjectFormReqType을 entities/project/model/types.ts에 정의
- edit-project의 EditProjectReqType 제거, ProjectFormReqType 재사용
- features 간 타입 중복을 entities 공통 타입으로 해소
@vercel

vercel Bot commented May 31, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
every-gsm-client-v2 Ready Ready Preview, Comment Jun 2, 2026 2:06pm

Request Review

@junjuny0227 junjuny0227 self-assigned this May 31, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a project editing feature by refactoring the project registration form into a reusable ProjectForm that supports both registration and editing modes, adding an edit project page, and implementing the usePatchMyProject mutation hook and EditConfirmModal. Feedback focuses on ensuring the form only renders once project data is available to avoid initialization issues, refactoring the usePatchMyProject hook to accept projectId directly for improved type safety, and updating the edit confirmation modal's styling to maintain visual consistency with other modals.

- add project data guard in EditProjectPage to prevent ProjectForm from mounting with empty initialData
- move projectId to usePatchMyProject hook argument, removing dummy mutationKey value
- simplify patchProject call site in EditConfirmModal
- align EditConfirmModal styles with DeleteConfirmModal (shadow-inset border, backdrop-blur unit, typography tracking/leading/weight)

@s2yeons s2yeons left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

수고하셨습니다.

@yeondon125 yeondon125 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

수고하셨습니다.

@junjuny0227
junjuny0227 merged commit c38811d into develop Jun 3, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
Preview — f7afcba0 Deployed Jun 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants