Skip to content

Conversation

@seongwon030
Copy link
Member

@seongwon030 seongwon030 commented Jan 17, 2026

#️⃣연관된 이슈

ex) #1050

📝작업 내용

1. Award 타입 구조화

기존

interface Award {  semester: string;  // "2024 1학기"  achievements: string[];}

변경 후

const SemesterTerm = {  FIRST: 'FIRST',  SECOND: 'SECOND',} as const;

interface Award {  
  year: number;      // 2024  
  semester: SemesterTermType;  // 'FIRST' | 'SECOND'  
  achievements: string[];
}

장점:

  • 구조화된 데이터로 정렬/필터링 로직 단순화
  • 타입 안정성 향상
  • 학기 값 오타 방지

2. 중복 타입 정의 제거

ClubIntroContent.tsx에서 로컬로 정의된 타입들을 제거하고 @/types/club에서 통일:

  • Award → @/types/club
  • IdealCandidate → @/types/club
  • Faq → FAQ (중앙 타입 사용)

3. UI 표시 로직 개선

  • formatSemesterLabel() 함수로 "2024 1학기" 형식 표시
  • 사용자에게는 기존과 동일하게 표시됨

4. 네이밍 개선

openFaqIndices → openFaqIndexes

중점적으로 리뷰받고 싶은 부분(선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

ex) 메서드 XXX의 이름을 더 잘 짓고 싶은데 혹시 좋은 명칭이 있을까요?

논의하고 싶은 부분(선택)

논의하고 싶은 부분이 있다면 작성해주세요.

🫡 참고사항

Summary by CodeRabbit

  • 리팩토링
    • 학기 표현을 연도 + 상/하반기 형태로 표준화해 정렬과 표시가 더 일관되게 개선되었습니다.
    • 수상 항목 식별 방식이 안정화되어 렌더링과 레이블 표시가 더 예측 가능해졌습니다.
  • 버그 수정 / UX 개선
    • 신규 수상 추가 시 포커싱 동작과 중복 처리 안정성이 향상되어 입력 흐름이 부드러워졌습니다.
    • FAQ 토글 인덱스 관리가 개선되어 열기/닫기 동작이 더 정확해졌습니다.

✏️ Tip: You can customize this high-level summary in your review settings.

- Award 타입에 year(number), semester(SemesterTermType) 분리
- SemesterTerm 상수 추가 ('FIRST' | 'SECOND')
- AwardEditor 새 타입에 맞게 로직 수정
- ClubIntroContent 로컬 타입 제거, @/types/club에서 import로 통일
- Award 타입에 year(number), semester(SemesterTermType) 분리
- SemesterTerm 상수 추가 ('FIRST' | 'SECOND')
- AwardEditor 새 타입에 맞게 로직 수정
- ClubIntroContent 로컬 타입 제거, @/types/club 통일
- openFaqIndices → openFaqIndexes 리네임
@seongwon030 seongwon030 self-assigned this Jan 17, 2026
@seongwon030 seongwon030 added 🔨 Refactor 코드 리팩토링 💻 FE Frontend labels Jan 17, 2026
@vercel
Copy link

vercel bot commented Jan 17, 2026

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

Project Deployment Review Updated (UTC)
moadong Ready Ready Preview, Comment Jan 18, 2026 7:18am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 17, 2026

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Validation error: Invalid regex pattern for base branch. Received: "**" at "reviews.auto_review.base_branches[0]"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Walkthrough

수상 데이터의 학기 표현을 문자열에서 강타입 SemesterTermType(연도는 number)로 전환하고, 안정적 키(getAwardKey) 및 레이블 포매터를 도입해 정렬·추가·갱신·렌더링과 포커스 로직을 타입 안전하게 수정했습니다.

Changes

코호트 / 파일(s) 변경 요약
타입 정의
frontend/src/types/club.ts
SemesterTerm 상수 및 SemesterTermType 추가; Award.semesterSemesterTermType으로 변경하고 Award.year: number 추가
AwardEditor 리팩토링
frontend/src/pages/AdminPage/tabs/ClubIntroEditTab/components/AwardEditor/AwardEditor.tsx
문자열 기반 학기 파싱 제거 → getSemesterSortValue, formatSemesterLabel, getAwardKey 도입; selectedSemester 및 신규 항목 추적을 SemesterTermType/awardKey로 변경; 정렬·추가·갱신·렌더링·포커스 로직을 새 타입·키 기반으로 업데이트
ClubIntroContent 마이그레이션
frontend/src/pages/ClubDetailPage/components/ClubIntroContent/ClubIntroContent.tsx
로컬 타입 제거 후 중앙 타입(Award, FAQ, IdealCandidate, SemesterTerm) 사용; formatSemesterLabel/getAwardKey 추가; 수상 리스트 키와 레이블, FAQ 인덱스 명칭(openFaqIndexes) 등 렌더링 조정

Sequence Diagram(s)

(생성 조건에 부합하지 않아 생략)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

Possibly related PRs

Suggested reviewers

  • lepitaaar
  • oesnuj
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목은 변경 사항의 핵심(year, semester 타입 분리 리팩토링)을 명확하고 간결하게 요약하고 있습니다.
Linked Issues check ✅ Passed 코드 변경이 MOA-523의 목표(year/semester 타입 분리, 중앙 타입 통일, 타입 안정성 개선)를 충족합니다.
Out of Scope Changes check ✅ Passed 모든 변경 사항이 year/semester 타입 분리 리팩토링과 관련되어 있으며, 범위를 벗어난 변경은 없습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@lepitaaar lepitaaar left a comment

Choose a reason for hiding this comment

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

수고하셨습니다 리뷰 한번 답변부탁드리겠습니다

- getAwardKey 함수에 index 파라미터 추가
- 같은 년도-학기에 여러 수상이 있어도 고유한 key 생성
- AwardEditor와 ClubIntroContent 모두 수정
- 백엔드 중복 방지 로직 부재에 대응
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💻 FE Frontend 🔨 Refactor 코드 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants