Skip to content

[feature] 대동제 페이지를 홍보 게시판으로 마이그레이션한다#1619

Open
suhyun113 wants to merge 5 commits into
develop-fefrom
feature/migrate-festival-to-promotion-board
Open

[feature] 대동제 페이지를 홍보 게시판으로 마이그레이션한다#1619
suhyun113 wants to merge 5 commits into
develop-fefrom
feature/migrate-festival-to-promotion-board

Conversation

@suhyun113
Copy link
Copy Markdown
Collaborator

@suhyun113 suhyun113 commented May 31, 2026

#️⃣연관된 이슈

ex) #1607

📝작업 내용

요약

  • 축제 페이지(동아리 소개 한마당, 대동제)를 일반 홍보글과 동일한 /promotions/:id URL 패턴으로 통일
  • PromotionCard에서 isFestival 분기 로직 제거 - 모든 카드가 동일하게 /promotions/${article.id} 로 이동
  • 축제 이미지 파일명을 {축제종류}-{연도} 네이밍 컨벤션으로 변경

라우팅 구조 변경

Before After
/festival-introduction /promotions/club-fest-2026
/festival-busking /promotions/main-fest-2026
  • AppRoutes에서 정적 라우트를 동적 라우트(:promotionId) 앞에 배치하여 우선 매칭
  • PromotionArticle 타입에서 isFestival 필드 제거

네이밍 컨벤션

축제 id와 이미지 파일명을 {종류}-fest-{연도} 형식으로 통일

축제 id 이미지
동아리 소개 한마당 club-fest-2026 club-fest-2026.png
대동제 (청해제) main-fest-2026 main-fest-2026.png

향후 축제 추가 시 동일 패턴 적용:

  • 봄 축제 → spring-fest-2026
  • 가을 축제 → autumn-fest-2027

Summary by CodeRabbit

릴리스 노트

  • New Features

    • 프로모션 페이지에서 ID 기반 조건부 라우팅 추가로 다양한 콘텐츠 타입 지원
    • 새로운 페스티벌 데이터 항목 추가
  • Refactor

    • 프로모션 카드 클릭 처리 로직 단순화로 일관된 내비게이션 동작 구현
  • Tests

    • 내비게이션 테스트 케이스 업데이트
  • Chores

    • 불필요한 API 핸들러 비활성화
    • 유형 정의 정리

suhyun113 added 3 commits May 26, 2026 20:58
- isFestival, route 필드 제거하고 id 기반 라우팅으로 단순화
- 이미지 파일명을 club-fest-2026, main-fest-2026으로 변경
- PromotionCard에서 분기 로직 제거
@suhyun113 suhyun113 self-assigned this May 31, 2026
@suhyun113 suhyun113 added ✨ Feature 기능 개발 💻 FE Frontend labels May 31, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented May 31, 2026

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

Project Deployment Actions Updated (UTC)
moadong Ready Ready Preview, Comment Jun 1, 2026 2:44pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 31, 2026

Review Change Stack

Warning

Review limit reached

@suhyun113, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 54 minutes and 28 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b2653949-5d67-4437-b83f-32ada00e3336

📥 Commits

Reviewing files that changed from the base of the PR and between 3128c95 and e3f6984.

📒 Files selected for processing (3)
  • frontend/src/mocks/handlers/index.ts
  • frontend/src/mocks/handlers/promotion.ts
  • frontend/src/pages/PromotionPage/PromotionDetailPage.tsx

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. 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

워크스루

PR은 기존 /festival-introduction 경로와 isFestival 플래그 기반의 페스티벌 분기 처리를 제거하고, 페스티벌 항목을 프로모션 보드의 club-fest-2026, main-fest-2026 등 접두사 기반 ID로 통합합니다. 네비게이션, 목업 데이터, 타입 정의, 라우팅 로직을 일관되게 업데이트합니다.

변경 사항

페스티벌-프로모션 통합

Layer / File(s) 요약
PromotionArticle 타입 정리
frontend/src/types/promotion.ts
PromotionArticle 인터페이스에서 isFestival 선택 필드를 제거하여 페스티벌과 프로모션 구분 로직을 삭제합니다.
목업 데이터 및 페스티벌 ID 업데이트
frontend/src/mocks/data/festivalMock.ts
첫 번째 항목의 ID를 club-fest-2026으로 변경하고, 새로운 main-fest-2026 페스티벌 항목을 추가하며 MainFestImage 임포트를 연결합니다.
UI 네비게이션 로직 통합
frontend/src/pages/MainPage/components/Banner/Banner.tsx, frontend/src/pages/PromotionPage/components/list/PromotionCard/PromotionCard.tsx, frontend/src/hooks/useNavigator.test.ts, frontend/src/utils/webviewBridge.ts
Banner의 CLUB_FESTIVAL 처리를 /promotions/club-fest-2026으로 변경하고, PromotionCard의 isFestival 분기를 제거하여 항상 /promotions/{id}로 라우팅합니다. 관련 테스트와 주석을 새로운 경로에 맞춰 업데이트합니다.
프로모션 상세 페이지 조건부 라우팅
frontend/src/pages/PromotionPage/PromotionDetailPage.tsx
PromotionDetailPage를 래퍼 컴포넌트로 리팩터링하여 promotionId 접두사 기반 조건부 렌더링을 수행합니다. club-fest- 접두사는 IntroductionPage로, main-fest- 접두사는 BuskingPage로 라우팅하고, 그 외는 기존 PromotionDetail 흐름으로 폴백합니다.
목업 API 핸들러 비활성화
frontend/src/mocks/handlers/promotion.ts
GET /api/promotion 핸들러를 주석 처리하여 모의 응답을 비활성화합니다.

예상 코드 리뷰 난이도

🎯 3 (중간) | ⏱️ ~25분

관련 이슈

  • Moadong/moadong#1607: 페스티벌 페이지를 프로모션 흐름으로 통합하는 동일한 마이그레이션을 구현합니다.
  • Moadong/moadong#1608: 페스티벌-프로모션 마이그레이션 작업을 코드 수준에서 직접 구현합니다.
  • Moadong/moadong#1606: 페스티벌 항목을 프로모션 흐름으로 리팩터링하는 마이그레이션을 구현합니다.

관련 PR

  • Moadong/moadong#788: 두 PR 모두 MainPage Banner 클릭/네비게이션 동작을 수정하며, 본 PR이 CLUB_FESTIVAL 대상 경로를 변경합니다.
  • Moadong/moadong#1507: 두 PR 모두 webview 네비게이션 경로 변환(선행 / 제거)을 다루며, useNavigator.test.ts 및 관련 webview 네비게이션 처리를 포함합니다.
  • Moadong/moadong#1386: 본 PR이 프로모션 UI 라우팅 로직을 업데이트하면서(예: PromotionCardisFestival 기반 네비게이션 제거, PromotionDetailPage의 접두사 기반 처리 추가) 검색된 PR에서 도입한 초기 /promotions 경로 및 동작과 직접 겹칩니다.

제안 라벨

🔨 Refactor

제안 리뷰어

  • seongwon030
  • oesnuj
  • lepitaaar
🚥 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 제목은 '대동제 페이지를 홍보 게시판으로 마이그레이션한다'로, 변경사항의 핵심(축제 페이지를 /promotions 경로로 통합)을 명확하게 요약하고 있습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/migrate-festival-to-promotion-board

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
Copy Markdown

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

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 restructures the promotion and festival routes, replacing the generic /festival-introduction route and isFestival flag with specific promotion-based routes (/promotions/club-fest-2026 and /promotions/main-fest-2026) and updating mock data and components accordingly. Feedback suggests removing the commented-out mock handler code in promotion.ts and avoiding hardcoded, year-specific routes in AppRoutes.tsx by implementing dynamic routing based on the promotion ID pattern to improve maintainability.

Comment on lines +45 to +50
// GET /api/promotion - 홍보게시판 목록 조회
http.get(`${API_BASE_URL}/api/promotion`, () => {
return HttpResponse.json({
articles: mockPromotionArticles,
});
}),
// http.get(`${API_BASE_URL}/api/promotion`, () => {
// return HttpResponse.json({
// articles: mockPromotionArticles,
// });
// }),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

사용하지 않는 모크 핸들러 코드가 주석 처리되어 남아 있습니다. 더 이상 필요하지 않은 코드라면 주석으로 남겨두기보다 완전히 삭제하는 것이 코드 가독성과 유지보수 측면에서 좋습니다. 만약 임시로 비활성화한 것이라면, 주석 처리 대신 적절한 플래그를 사용하거나 필요한 시점에 다시 추가하는 것을 권장합니다.

Comment thread frontend/src/routes/AppRoutes.tsx Outdated
Comment on lines +103 to +117
path: '/promotions/club-fest-2026',
element: (
<ContentErrorBoundary>
<IntroductionPage />
</ContentErrorBoundary>
),
},
{
path: '/promotions/main-fest-2026',
element: (
<ContentErrorBoundary>
<BuskingPage />
</ContentErrorBoundary>
),
},
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

라우터에 club-fest-2026, main-fest-2026과 같이 특정 연도가 포함된 경로를 하드코딩하면, 매년 새로운 축제가 열릴 때마다 AppRoutes.tsx 파일을 수정해야 하는 유지보수 문제가 발생합니다.

개선 제안:
특정 연도를 하드코딩하는 대신, /promotions/:promotionId 경로 하나만 유지하고 PromotionDetailPage 내부(또는 별도의 라우팅 래퍼 컴포넌트)에서 promotionId 패턴을 분석하여 동적으로 적절한 컴포넌트를 렌더링하도록 개선하는 것을 권장합니다.

예를 들어, promotionIdclub-fest-로 시작하면 IntroductionPage를, main-fest-로 시작하면 BuskingPage를 렌더링하고, 그 외에는 일반 PromotionDetailPage를 렌더링하는 방식입니다. 이렇게 하면 매년 라우트 설정을 변경하지 않고도 새로운 축제 페이지를 추가할 수 있습니다.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

특정 연도가 하드코딩되어 있으면 매년 AppRoutes.tsx를 수정해야하는 문제가 있다는 것을 알게되었습니다.
/promotions/:promotionId 하나로 통일하고 PromotionDetailPage 내부에서 promotionId 패턴에 따라 분기하도록 수정했습니다. 이제 행사가 추가되더라도 라우트 파일은 수정할 필요가 없습니다ㅏ
3128c95

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 31, 2026

✅ UI 변경사항 없음

구분 링크
📖 Storybook https://67904e61c16daa99a63b44a7-vpcpfmzeuk.chromatic.com/

전체 57개 스토리 · 22개 컴포넌트

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@frontend/src/mocks/handlers/promotion.ts`:
- Around line 46-50: The GET handler for /api/promotion was commented out
leaving requests unhandled; restore the MSW handler in promotion.ts by
re-enabling the http.get(...) handler that returns HttpResponse.json({ articles:
mockPromotionArticles }) so tests/local dev use the mock data; specifically
update the handler block referencing http.get, HttpResponse, and
mockPromotionArticles to return the mocked articles again.
🪄 Autofix (Beta)

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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a835e1dd-917b-4586-b357-696e23ee1489

📥 Commits

Reviewing files that changed from the base of the PR and between b7439f5 and 020754a.

⛔ Files ignored due to path filters (2)
  • frontend/src/assets/images/popup/club-fest-2026.png is excluded by !**/*.png
  • frontend/src/assets/images/popup/main-fest-2026.png is excluded by !**/*.png
📒 Files selected for processing (8)
  • frontend/src/hooks/useNavigator.test.ts
  • frontend/src/mocks/data/festivalMock.ts
  • frontend/src/mocks/handlers/promotion.ts
  • frontend/src/pages/MainPage/components/Banner/Banner.tsx
  • frontend/src/pages/PromotionPage/components/list/PromotionCard/PromotionCard.tsx
  • frontend/src/routes/AppRoutes.tsx
  • frontend/src/types/promotion.ts
  • frontend/src/utils/webviewBridge.ts
💤 Files with no reviewable changes (1)
  • frontend/src/types/promotion.ts

Comment thread frontend/src/mocks/handlers/promotion.ts Outdated
Copy link
Copy Markdown
Member

@seongwon030 seongwon030 left a comment

Choose a reason for hiding this comment

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

라우팅명에 숫자가 들어간 게 그렇게 흔하진 않은 것 같은데, 유지보수상 편할까요?

Comment on lines +46 to +47
// http.get(`${API_BASE_URL}/api/promotion`, () => {
// return HttpResponse.json({
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.

ai 말처럼 msw에서 사용하지 않는 코드는 바로 제거해도 됩니다 !

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

이 부분은 테스트한다고 잠깐 주석 처리해둔건데 그대로 올려버렸네요. 현재 목업 파일을 사용하지 않고 있어서 제거했습니다. e3f6984

행사가 추가될 때마다 AppRoutes.tsx를 수정하지 않도록
PromotionDetailPage에서 promotionId 패턴으로 컴포넌트 분기

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
frontend/src/pages/PromotionPage/PromotionDetailPage.tsx (1)

1-1: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Prettier 포맷팅 오류를 수정하세요.

CI 파이프라인이 코드 스타일 이슈로 인해 실패하고 있습니다. 다음 명령어를 실행하여 포맷팅 문제를 해결하세요:

npx prettier --write "frontend/src/pages/PromotionPage/PromotionDetailPage.tsx"
🤖 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 `@frontend/src/pages/PromotionPage/PromotionDetailPage.tsx` at line 1, Prettier
formatting issues in PromotionDetailPage.tsx are failing CI; run the formatter
on the file and commit the result: execute npx prettier --write
"frontend/src/pages/PromotionPage/PromotionDetailPage.tsx" to fix
whitespace/formatting (e.g., the import/useLayoutEffect line and surrounding
code), review changes in PromotionDetailPage (components, imports, and exported
component) and stage/commit the formatted file so CI passes.
🤖 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.

Outside diff comments:
In `@frontend/src/pages/PromotionPage/PromotionDetailPage.tsx`:
- Line 1: Prettier formatting issues in PromotionDetailPage.tsx are failing CI;
run the formatter on the file and commit the result: execute npx prettier
--write "frontend/src/pages/PromotionPage/PromotionDetailPage.tsx" to fix
whitespace/formatting (e.g., the import/useLayoutEffect line and surrounding
code), review changes in PromotionDetailPage (components, imports, and exported
component) and stage/commit the formatted file so CI passes.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1565ac11-78d4-4a03-8ed7-a442401cbd34

📥 Commits

Reviewing files that changed from the base of the PR and between 020754a and 3128c95.

📒 Files selected for processing (1)
  • frontend/src/pages/PromotionPage/PromotionDetailPage.tsx

백엔드 연동 완료로 불필요해진 mock 데이터 및 핸들러 제거
@suhyun113
Copy link
Copy Markdown
Collaborator Author

라우팅명에 숫자가 들어간 게 그렇게 흔하진 않은 것 같은데, 유지보수상 편할까요?

홍보 게시물 중 축제는 매년 열리는 행사인데, 내용이 다른 같은 이름의 행사들이 연도에 따라 쌓이는 구조라 라우트에 연도를 넣었습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💻 FE Frontend ✨ Feature 기능 개발

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants