기업 프로젝트 페이지 UI 구현 - #34
Conversation
|
Important Review available on request
Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthrough변경 요약기업 프로젝트 페이지를 추가했습니다. 프로젝트 생성·삭제, 기수 필터, 폼 검증, Blob URL 정리, 접근성 라벨과 Changes기업 프로젝트 페이지
Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
⚔️ Resolve merge conflicts 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/pages/projects/CompanyProjectsPage.tsx`:
- Around line 107-123: Update CompanyProjectModal’s onOpenChange handling in
CompanyProjectsPage so every close path first calls form.reset() when open is
false, then closes the modal. Route onCancel through the same state-change
cleanup path, ensuring cancel, Escape, and outside-click closures all release
the banner Blob URL before the next open or unmount.
- Around line 47-58: Update handleSave so the newly created project preserves
the required introduction text by assigning values.content to the project
object. Extend CompanyProjectCard with a content field and ensure downstream
rendering or API integration uses the stored value.
- Around line 63-68: Update handleDelete so it finds the project to delete
before calling setProjects, then invokes revokeIfBlobUrl on that project’s
imageUrl outside the state updater. Keep the setProjects updater pure and
limited to filtering out the matching project by id.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: f281de92-ef18-4dcb-9f85-4f50a43b658a
📒 Files selected for processing (10)
src/components/projects/CompanyProjectModal/CompanyProjectModal.tsxsrc/components/projects/ProjectThumbnailCard/ProjectThumbnailCard.tsxsrc/hooks/index.tssrc/hooks/projects/index.tssrc/hooks/projects/useCompanyProjectForm.tssrc/pages/projects/CompanyProjectsPage.mock.tssrc/pages/projects/CompanyProjectsPage.test.tsxsrc/pages/projects/CompanyProjectsPage.tsxsrc/routes.tssrc/routes/(main)/company.tsx
| function handleSave() { | ||
| void form.handleSubmit((values) => { | ||
| setProjects((prev) => [ | ||
| ...prev, | ||
| { | ||
| id: crypto.randomUUID(), | ||
| cardinal: CURRENT_GENERATION, | ||
| serviceName: values.name, | ||
| imageUrl: values.bannerUrl, | ||
| }, | ||
| ]) | ||
| form.resetAfterSave() |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
프로젝트 소개 값을 보존하십시오.
values.content는 필수 입력이지만 새 CompanyProjectCard에 복사하지 않습니다. 현재 생성 직후 프로젝트 소개 값이 유실됩니다.
CompanyProjectCard에 content를 추가하고, Line 51-56에서 values.content를 저장하십시오. 이후 표시 또는 API 연동에서 이 값을 사용하십시오.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/pages/projects/CompanyProjectsPage.tsx` around lines 47 - 58, Update
handleSave so the newly created project preserves the required introduction text
by assigning values.content to the project object. Extend CompanyProjectCard
with a content field and ensure downstream rendering or API integration uses the
stored value.
| <CompanyProjectModal | ||
| open={modalOpen} | ||
| onOpenChange={setModalOpen} | ||
| cardinal={CURRENT_GENERATION} | ||
| name={form.name} | ||
| onNameChange={form.setName} | ||
| content={form.content} | ||
| onContentChange={form.setContent} | ||
| bannerUrl={form.bannerUrl} | ||
| onBannerChange={form.onBannerChange} | ||
| onBannerDelete={form.onBannerDelete} | ||
| onCancel={() => { | ||
| setModalOpen(false) | ||
| }} | ||
| onSave={handleSave} | ||
| saveDisabled={!form.isValid} | ||
| /> |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
모든 모달 닫기 경로에서 배너 Blob URL을 해제하십시오.
onCancel과 onOpenChange는 모달만 닫습니다. 업로드한 배너 Blob URL은 다음 openModal() 호출 또는 페이지 unmount 전까지 남습니다.
open=false인 경우 form.reset()을 호출한 뒤 모달을 닫으십시오. 취소, Escape, 외부 클릭이 같은 정리 경로를 사용해야 합니다.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/pages/projects/CompanyProjectsPage.tsx` around lines 107 - 123, Update
CompanyProjectModal’s onOpenChange handling in CompanyProjectsPage so every
close path first calls form.reset() when open is false, then closes the modal.
Route onCancel through the same state-change cleanup path, ensuring cancel,
Escape, and outside-click closures all release the banner Blob URL before the
next open or unmount.
…page-33 # Conflicts: # src/hooks/projects/index.ts # src/routes.ts
CI 결과
|
#️⃣ 연관된 이슈
Close #33
🚧 Work in Progress
📌 주요 변경사항
/company라우팅과 기업 프로젝트 페이지(등록/기수 필터/삭제) 추가ProjectThumbnailCard공용 컴포넌트에 접근성 있는 group role·라벨 추가📝 작업 내용
/company라우트 등록 및 얇은 route 진입 파일 추가useCompanyProjectForm으로 zod 기반 등록 폼 상태·검증·배너 blob URL 소유권 관리CompanyProjectsPage에 기수별 필터, empty state, 카드 삭제 시 blob URL 해제 처리 구현ProjectThumbnailCard에 접근성 있는 group role·aria-label 추가(카드 단위 삭제 테스트에서 활용)CompanyProjectModal위치를 사이드바 시각보정에 맞춰 오른쪽으로 30px 이동pnpm lint,pnpm gen:index:check,pnpm vitest run(관련 테스트 27개),pnpm build모두 통과📸 스크린샷 (선택)
💬 리뷰 요구사항(선택)
/company페이지는 등록 API 연동 전이라 로컬 mock 데이터로 동작합니다(이미 병합된/meetup페이지와 동일한 전제)./meetup페이지가 main에 병합되기 전에 분기되어 워킹트리에/meetup라우트가 없습니다. 두 페이지의 페이지 셸(레이아웃·상태 관리)이 거의 동일해서 공용 컴포넌트로 추출할 여지가 있는데, 지금은 소비처가 하나뿐이라 과도한 추상화를 피하고 두 페이지가 모두 merge된 뒤 별도 refactor 브랜치에서 진행하기로 했습니다.Summary by CodeRabbit
새로운 기능
접근성 개선
버그 수정