-
Notifications
You must be signed in to change notification settings - Fork 2
Feat : 투표 게시판 리스트 페이지 구현 #102
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
Conversation
…t/SOS-52-voteslist-page
…t/SOS-52-voteslist-page
📦 번들 분석 결과📊 번들 크기 요약
🔍 주요 청크 파일 (크기순)🤖 자동 생성된 번들 분석 리포트 |
⚡ Lighthouse 성능 분석 결과📊 전체 평균 점수
📈 측정 현황
📄 페이지별 상세 분석🏠 커뮤니티 페이지:
|
| 지표 | 점수 |
|---|---|
| 🚀 Performance | 67점 |
| ♿ Accessibility | 80점 |
| ✅ Best Practices | 100점 |
| 🔍 SEO | 100점 |
📊 상세 분석 보기
👥 창업자 페이지: /main/founder
| 지표 | 점수 |
|---|---|
| 🚀 Performance | 75점 |
| ♿ Accessibility | 87점 |
| ✅ Best Practices | 100점 |
| 🔍 SEO | 100점 |
📊 상세 분석 보기
🏡 홈 페이지: /main/home
| 지표 | 점수 |
|---|---|
| 🚀 Performance | 75점 |
| ♿ Accessibility | 91점 |
| ✅ Best Practices | 100점 |
| 🔍 SEO | 100점 |
📊 상세 분석 보기
🗺️ 지도 페이지: /main/maps
| 지표 | 점수 |
|---|---|
| 🚀 Performance | 75점 |
| ♿ Accessibility | 87점 |
| ✅ Best Practices | 100점 |
| 🔍 SEO | 100점 |
📊 상세 분석 보기
👤 프로필 페이지: /main/profile
| 지표 | 점수 |
|---|---|
| 🚀 Performance | 75점 |
| ♿ Accessibility | 88점 |
| ✅ Best Practices | 100점 |
| 🔍 SEO | 100점 |
📊 상세 분석 보기
🔗 전체 상세 분석 결과
📄 측정된 페이지
- /main/community
- /main/founder
- /main/home
- /main/maps
- /main/profile
모든 페이지에서 성능 측정이 완료되었습니다.
🤖 자동 생성된 Lighthouse 성능 리포트
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
이 PR은 투표 게시판 리스트 페이지를 구현하고 관련 컴포넌트들을 추가하며, 기존 FloatingButton 컴포넌트의 재사용성을 개선하는 작업입니다.
주요 변경사항:
- SSR과 CSR을 결합한 투표 게시판 리스트 페이지 구현 (무한 스크롤, 필터링, 정렬 기능 포함)
- 투표 카드 컴포넌트와 투표 상태 칩 컴포넌트 신규 구현
- 투표 마감 시간을 사용자 친화적으로 표시하는 유틸 함수 추가
- FloatingButton 및 FloatingCategoryMenu 리팩토링을 통한 관심사 분리 및 재사용성 향상
- date-fns 라이브러리 추가 및 개발 환경 HTTPS 기본 설정
Reviewed changes
Copilot reviewed 14 out of 19 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | date-fns v4.1.0 의존성 추가 |
| package.json | dev 스크립트를 HTTPS 기반으로 변경 |
| apps/web/package.json | date-fns 의존성 추가 및 dev 스크립트 HTTPS 기본 설정 |
| apps/web/src/utils/vote-deadline.ts | 투표 마감 시간을 사용자 친화적인 형식으로 변환하는 유틸 함수 구현 |
| apps/web/src/types/options.types.ts | 조회순(VIEW) 정렬 옵션 추가 |
| apps/web/src/generated/api/models/* | API 응답 모델에 contentPreview, hasVoted, isAuthorized 필드 추가 |
| apps/web/src/components/chips/VoteStatusChip.tsx | 투표 상태를 시각적으로 표시하는 칩 컴포넌트 구현 (진행중/마감임박/마감/완료) |
| apps/web/src/components/buttons/FloatingCategoryMenu.tsx | useParams 대신 route prop을 사용하도록 리팩토링하여 재사용성 향상 |
| apps/web/src/components/buttons/FloatingButton.tsx | 오버레이 제어 로직을 부모 컴포넌트로 이동하여 단일 책임 원칙 준수 |
| apps/web/src/app/main/community/votesboard/page.tsx | SSR 서버 컴포넌트로 초기 데이터 prefetch 구현 |
| apps/web/src/app/main/community/votesboard/components/VoteBoardCard.tsx | 투표 게시글 카드 컴포넌트 구현 (썸네일, 상태, 마감시간, 투표수, 댓글수 표시) |
| apps/web/src/app/main/community/votesboard/ClientPage.tsx | 무한 스크롤, 필터링, 정렬 기능이 있는 투표 게시판 클라이언트 페이지 구현 |
| apps/web/src/app/main/community/freeboard/ClientPage.tsx | FloatingButton 리팩토링 적용 |
| apps/web/src/app/main/community/constants/votesOptions.tsx | 투표 상태 필터 상수 정의 (진행중/완료) |
| apps/web/src/app/main/community/constants/sortOptions.ts | 조회순 정렬 옵션 추가 |
| apps/web/next.config.js | S3 이미지 경로 설정을 모든 게시판 타입 지원하도록 확장 |
| .gitignore | monorepo-docs 디렉토리 무시 설정 추가 |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
| @@ -0,0 +1,104 @@ | |||
| // src/components/CommunityCard.tsx | |||
Copilot
AI
Dec 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
파일 경로 주석이 잘못되었습니다. 이 파일은 src/components/CommunityCard.tsx가 아니라 src/app/main/community/votesboard/components/VoteBoardCard.tsx입니다. 파일 위치를 정확히 반영하도록 주석을 수정해야 합니다.
| // src/components/CommunityCard.tsx | |
| // src/app/main/community/votesboard/components/VoteBoardCard.tsx |
| import { CategoryChip } from '@/components/chips/CategoryChip'; | ||
| import { Category } from '../../constants/categories'; | ||
| import { LaptopMinimalCheck, MessageSquareMore } from 'lucide-react'; | ||
| //import { useRouter } from 'next/navigation'; |
Copilot
AI
Dec 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
주석 처리된 import와 코드를 제거해야 합니다. 추후 구현 예정인 기능이라면, 구현 시점에 추가하는 것이 코드 가독성과 유지보수 측면에서 더 좋습니다.
| console.warn( | ||
| '추후 투표 상세 페이지로 이동할 예정입니다. => postId:', | ||
| postId, | ||
| ); | ||
| //router.push(`/main/community/votesboard/${postId}`); |
Copilot
AI
Dec 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
주석 처리된 코드를 제거해야 합니다. 추후 구현 예정인 기능이라면, 구현 시점에 추가하는 것이 더 좋습니다. 또한 console.warn 대신 실제 동작을 구현하거나, 임시 구현이라면 주석으로만 남기는 것을 권장합니다.
| console.warn( | |
| '추후 투표 상세 페이지로 이동할 예정입니다. => postId:', | |
| postId, | |
| ); | |
| //router.push(`/main/community/votesboard/${postId}`); | |
| // TODO: 투표 상세 페이지로 이동 기능은 추후 구현 예정입니다. |
| > | ||
| <LaptopMinimalCheck | ||
| className={cn( | ||
| 'w-4 h-4 ', |
Copilot
AI
Dec 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
클래스명에 불필요한 공백이 있습니다. 'w-4 h-4 ' 대신 'w-4 h-4'로 수정해야 합니다.
| 'w-4 h-4 ', | |
| 'w-4 h-4', |
| renderItem={(post) => <VoteBoardCard post={post} />} | ||
| /> | ||
|
|
||
| {/* TODO: FloatingButton 추가 */} |
Copilot
AI
Dec 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO 주석이 이미 완료된 작업을 가리키고 있습니다. FloatingButton이 이미 115번 라인에 구현되어 있으므로 이 TODO 주석을 제거해야 합니다.
| {/* TODO: FloatingButton 추가 */} | |
| return `${minutesLeft}분 후 마감`; | ||
| } |
Copilot
AI
Dec 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
마감까지 1분 미만일 경우 처리 로직이 누락되었습니다. minutesLeft가 0이면 "0분 후 마감"이 표시되는데, 이 경우 "곧 마감" 또는 "1분 미만" 같은 더 명확한 메시지를 표시하는 것이 좋습니다.
| return `${minutesLeft}분 후 마감`; | |
| } | |
| if (minutesLeft < 1) { | |
| return '곧 마감'; | |
| } | |
| return `${minutesLeft}분 후 마감`; |
| return 'closed'; | ||
| } | ||
|
|
||
| // 24시간 이내 마감 임박 (마감 임박) |
Copilot
AI
Dec 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
주석이 중복되어 있습니다. "마감 임박" 텍스트가 불필요하게 반복되고 있으므로 "24시간 이내 마감 임박"만 남기는 것이 좋습니다.
| // 24시간 이내 마감 임박 (마감 임박) | |
| // 24시간 이내 마감 임박 |
youdaeng2
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
투표게시판 잘 구현해주셨네요 플로팅 버튼도 수정해주신 방향이 깔끔한 것 같습니다. 다음에 저도 참고하겠습니다! 코파일럿이 남겨준 주석부분, 마감기한 유틸 부분만 살짝 수정해주시면 완성도가 올라갈 것 같습니다. 고생하셨습니다!
📌 개요
투표 게시판 리스트 페이지 구현 및 관련 컴포넌트 제작
🗒 상세 설명
1. 투표 리스트 페이지 구현
투표 게시판의 메인 리스트 페이지를 SSR과 CSR로 구현했습니다.
핵심 기술 및 구현사항
사용 예시
2. 투표 카드 컴포넌트 구현
투표 게시글을 표시하는 카드 컴포넌트를 구현했습니다.
핵심 기술 및 구현사항
사용 예시
3. 투표 상태 칩 구현
투표 상태를 시각적으로 표시하는 칩 컴포넌트를 구현했습니다.
핵심 기술 및 구현사항
voteStatus와endTime을 기반으로 자동 상태 계산사용 예시
4. 투표 마감 기한 표시 유틸 함수
사용자 친화적인 마감 시간 표시를 위한 유틸 함수를 구현했습니다.
핵심 기술 및 구현사항
사용 예시
5. FloatingButton 및 FloatingCategoryMenu 리팩토링
플로팅 버튼과 카테고리 메뉴의 관심사를 분리하고 재사용성을 개선했습니다.
핵심 기술 및 구현사항
FloatingButton 리팩토링 (FloatingButton.tsx)
FloatingCategoryMenu 리팩토링 (FloatingCategoryMenu.tsx)
routeprop으로 변경사용 예시
6. Next.js 이미지 설정 개선
S3 버킷의 모든 경로에서 이미지를 로드할 수 있도록 설정을 개선했습니다.
핵심 기술 및 구현사항
pathname을/freeboard/**에서/**로 변경📸 스크린샷
투표 리스트 페이지
투표 카드
투표 상태 칩
🔗 이슈
closes #97
✅ 체크리스트