Skip to content

[feature] 동아리 상시모집 상태 추가#707

Merged
suhyun113 merged 2 commits intodevelop-fefrom
feature/#706-add-recruitment-ui-MOA-202
Aug 28, 2025
Merged

[feature] 동아리 상시모집 상태 추가#707
suhyun113 merged 2 commits intodevelop-fefrom
feature/#706-add-recruitment-ui-MOA-202

Conversation

@suhyun113
Copy link
Collaborator

@suhyun113 suhyun113 commented Aug 26, 2025

#️⃣연관된 이슈

ex) #706

📝작업 내용

동아리 상시 모집 상태를 추가했습니다.

image

상시 모집 상태 색상 수정(눈 덜 아프도록 변경)

스크린샷 2025-08-28 134559

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

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

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

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

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

🫡 참고사항

Summary by CodeRabbit

  • 신기능
    • 동아리 상태에 ‘상시모집’ 표시가 추가되었습니다. 목록과 상세 화면에서 녹색 계열 배지로 표시되어 한눈에 식별할 수 있으며, 상태가 해당 값일 때 자동으로 스타일이 적용됩니다. 기존 상태 표시와 동작, 필터링에는 영향이 없습니다.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 26, 2025

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

ClubStateBox 컴포넌트의 내부 스타일 매핑에 ALWAYS 항목을 추가해 배경색(rgba(235, 250, 241, 1)), 글자색(#3ACD73), 표시 텍스트(상시모집)를 정의했습니다. 렌더링 로직과 공개 인터페이스에는 변경이 없습니다.

Changes

Cohort / File(s) Summary
Frontend — ClubStateBox 스타일 매핑 확장
frontend/src/components/ClubStateBox/ClubStateBox.tsx
stateStylesALWAYS 키 추가(배경 rgba(235, 250, 241, 1), 색상 #3ACD73, 텍스트 상시모집). 렌더 로직/인터페이스 미변경.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User as 사용자
  participant ClubStateBox as ClubStateBox
  participant stateStyles as stateStyles 매핑

  User->>ClubStateBox: state="ALWAYS"로 렌더 요청
  ClubStateBox->>stateStyles: stateStyles["ALWAYS"] 조회
  stateStyles-->>ClubStateBox: { bg: rgba(235,250,241,1), color: #3ACD73, text: "상시모집" }
  ClubStateBox-->>User: 배지(스타일+텍스트) 렌더
  note over ClubStateBox, stateStyles: 기존 제어 흐름 유지 — 매핑만 확장
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Assessment against linked issues

Objective Addressed Explanation
상시모집 UI 추가 (MOA-202)

Possibly related issues

Possibly related PRs

Suggested reviewers

  • oesnuj
  • lepitaaar
  • Zepelown

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 535432d and 68c5c0c.

📒 Files selected for processing (1)
  • frontend/src/components/ClubStateBox/ClubStateBox.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/src/components/ClubStateBox/ClubStateBox.tsx
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/#706-add-recruitment-ui-MOA-202

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbit in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbit in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbit gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbit read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbit help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbit ignore or @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbit summary or @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbit or @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@vercel
Copy link

vercel bot commented Aug 26, 2025

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

Project Deployment Preview Comments Updated (UTC)
moadong Ready Ready Preview Comment Aug 28, 2025 4:52am

@suhyun113 suhyun113 added ✨ Feature 기능 개발 💻 FE Frontend labels Aug 26, 2025
Copy link
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

🧹 Nitpick comments (3)
frontend/src/components/ClubStateBox/ClubStateBox.tsx (3)

29-42: 스타일의 매직 넘버 상수화 및(가능하면) 테마 토큰 사용

가이드라인(매직 넘버 지양)에 따라 크기값을 상수로 분리하거나, 디자인 시스템 토큰이 있다면 테마를 통해 가져오도록 정리하는 것을 권장합니다. 유지보수성과 일관성이 개선됩니다.

예시(테마가 없다면 파일 상단에 상수 정의):

// constants
const BOX_WIDTH_PX = 83;
const BOX_HEIGHT_PX = 30;
const BOX_PADDING_Y_PX = 8;
const BOX_PADDING_X_PX = 21;
const BOX_RADIUS_PX = 8;
const StyledBox = styled.div<{ $bgColor: string; $textColor: string }>`
  display: flex;
  justify-content: center;
  align-items: center;
  white-space: nowrap;
  width: ${BOX_WIDTH_PX}px;
  height: ${BOX_HEIGHT_PX}px;
  padding: ${BOX_PADDING_Y_PX}px ${BOX_PADDING_X_PX}px;
  border-radius: ${BOX_RADIUS_PX}px;
  background-color: ${({ $bgColor }) => $bgColor};
  color: ${({ $textColor }) => $textColor};
  font-size: 0.75rem;
  font-weight: 500;
`;

49-53: 알 수 없음(fallback) UX 의도 확인 및 개발 모드 경고 로그 권장

현재 미정의 상태에 대해 '알 수 없음'을 노출합니다. 의도된 UX라면 OK입니다. 다만 상태 값이 서버/도메인 변경으로 누락되는 경우를 조기에 파악하기 위해 개발 모드에서 경고 로그를 남기는 방식을 권장합니다.

if (process.env.NODE_ENV !== 'production' && !(state in stateStyles)) {
  // eslint-disable-next-line no-console
  console.warn(`[ClubStateBox] Unknown state: ${state}`);
}

3-6: 타입 안전성 강화: ClubRecruitmentState 유니언 타입 도입 권장

검토 결과, 코드베이스 전체를 검색해보았을 때(.ts/.tsx 파일 대상), OPEN, UPCOMING, CLOSED, ALWAYS 리터럴이나 RecruitmentState, ClubState 등의 중복 정의는 발견되지 않았습니다. 따라서 현 시점에서는 로컬 타입 정의만으로도 무리가 없으며, 제안드린 유니언 타입 도입은 타입 안전성을 크게 높여줍니다.

변경 제안 (파일: frontend/src/components/ClubStateBox/ClubStateBox.tsx):

+// 공용 타입으로 분리할 경우: frontend/src/types/club.ts 등에 추가
+type ClubRecruitmentState = 'OPEN' | 'UPCOMING' | 'CLOSED' | 'ALWAYS';

-const stateStyles: Record<
-  string,
-  { backgroundColor: string; color: string; text: string }
-> = {
+const stateStyles: Record<
+  ClubRecruitmentState,
+  { backgroundColor: string; color: string; text: string }
+> = {
   OPEN:     { backgroundColor: '#E3FCEF', color: '#00A14B', text: '모집 중' },
   UPCOMING: { backgroundColor: '#FEF7DF', color: '#D68E00', text: '모집 예정' },
   CLOSED:   { backgroundColor: '#FEE3E5', color: '#BA1A1A', text: '모집 마감' },
   ALWAYS:   { backgroundColor: '#EBF2FE', color: '#263C7B', text: '상시 모집' },
 };

-interface ClubStateBoxProps {
-  state: string;
-}
+interface ClubStateBoxProps {
+  state: ClubRecruitmentState;
+}
  • 현재 프로젝트 내 중복 정의는 없으므로, 당장은 위처럼 컴포넌트 내부에 타입을 선언해도 무방합니다.
  • 향후 API 스펙이나 도메인 모델과 함께 통합할 때는 frontend/src/types/club.ts 같은 공용 타입 모듈로 이동해 중복/불일치를 방지하세요.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a58ca36 and 535432d.

📒 Files selected for processing (1)
  • frontend/src/components/ClubStateBox/ClubStateBox.tsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
frontend/**/*.{ts,tsx}

📄 CodeRabbit inference engine (frontend/.cursorrules)

frontend/**/*.{ts,tsx}: Replace magic numbers with named constants for clarity.
Replace complex or nested ternary operators with if/else statements or IIFEs for readability.
Assign complex boolean conditions to named variables.
Use consistent return types for similar functions and hooks.
Avoid hidden side effects; functions should only perform actions implied by their signature (Single Responsibility Principle).
Use unique, descriptive names for custom wrappers and functions to avoid ambiguity.
Define constants near related logic or ensure names link them clearly.

Files:

  • frontend/src/components/ClubStateBox/ClubStateBox.tsx
frontend/**/*.tsx

📄 CodeRabbit inference engine (frontend/.cursorrules)

frontend/**/*.tsx: Abstract complex logic/interactions into dedicated components or higher-order components (HOCs).
Separate significantly different conditional UI/logic into distinct components.
Colocate simple, localized logic or use inline definitions to reduce context switching.
Choose field-level or form-level cohesion based on form requirements.
Break down broad state management into smaller, focused hooks or contexts.
Use component composition instead of props drilling.

Files:

  • frontend/src/components/ClubStateBox/ClubStateBox.tsx

Comment on lines 22 to 26
ALWAYS: {
backgroundColor: 'rgba(0, 231, 89, 0.1)',
color: '#00E759',
text: '상시모집'
}
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

WCAG 명도 대비 미달 가능성(≈1.55:1 추정) — ALWAYS 색상 조합 조정 필요

현재 텍스트 색상 #00E759과 배경 rgba(0, 231, 89, 0.1) 조합은 소문자(0.75rem) 기준 WCAG AA(4.5:1) 대비를 충족하지 못할 가능성이 높습니다. 실제 사용자 가독성과 접근성 이슈를 야기할 수 있어 텍스트 컬러를 더 어둡게 변경하는 것을 권장합니다.

아래와 같이 텍스트 색상을 진한 그린으로 조정하면(예: #0E7A33) AA 기준을 만족합니다.

   ALWAYS: {
     backgroundColor: 'rgba(0, 231, 89, 0.1)',
-    color: '#00E759',
+    color: '#0E7A33', // 진한 그린: 명도 대비 개선(AA 충족)
     text: '상시모집'
   }

아래 스크립트로 현 색상 대비와 제안 색상 대비를 계산해 확인해보세요.


🏁 Script executed:

#!/bin/bash
python - << 'PY'
def hex_to_rgb(s):
    s = s.lstrip('#'); return tuple(int(s[i:i+2], 16) for i in (0,2,4))

def srgb_to_linear(c):  # c: 0..255 -> 0..1 linear
    c = c/255.0
    return c/12.92 if c <= 0.03928 else ((c+0.055)/1.055)**2.4

def luminance(rgb):
    r,g,b = [srgb_to_linear(x) for x in rgb]
    return 0.2126*r + 0.7152*g + 0.0722*b

def blend(over_rgb, alpha, under_rgb=(255,255,255)):
    return tuple(int(round(alpha*o + (1-alpha)*u)) for o,u in zip(over_rgb, under_rgb))

def contrast_ratio(fg_rgb, bg_rgb):
    L1, L2 = luminance(bg_rgb), luminance(fg_rgb)
    Lmax, Lmin = max(L1,L2), min(L1,L2)
    return (Lmax+0.05)/(Lmin+0.05)

bg_overlay = hex_to_rgb('00E759')
bg = blend(bg_overlay, 0.1, (255,255,255))  # rgba(..., 0.1) over white
def to_hex(rgb): return '#%02X%02X%02X' % rgb

print('Blended bg:', to_hex(bg))
print('Contrast current (#00E759 text):', round(contrast_ratio(hex_to_rgb('00E759'), bg), 2))
print('Contrast proposed (#0E7A33 text):', round(contrast_ratio(hex_to_rgb('0E7A33'), bg), 2))
print('AA normal threshold: 4.5')
PY

Length of output: 131


WCAG AA 명도 대비 미달 — ALWAYS 상태 색상 조정 필요

현재 frontend/src/components/ClubStateBox/ClubStateBox.tsx 파일의 ALWAYS 상태(22–26행)에서
배경 rgba(0, 231, 89, 0.1) (혼합 후 #E6FDEE)과 텍스트 #00E759 조합의 대비는 1.56:1로
WCAG AA 소문자(4.5:1) 기준을 충족하지 못합니다.
제안된 #0E7A33 사용 시 대비가 5.1:1로 기준을 만족하므로, 텍스트 색상을 아래와 같이 수정해 주세요.

  • 대상 위치

    • 파일: frontend/src/components/ClubStateBox/ClubStateBox.tsx
    • 줄: 22–26
  • 수정 제안

   ALWAYS: {
     backgroundColor: 'rgba(0, 231, 89, 0.1)',  // 혼합 후 #E6FDEE
-    color: '#00E759',  // 현재 대비 1.56:1 (WCAG AA 미달)
+    color: '#0E7A33',  // 제안 대비 5.1:1 (WCAG AA 충족)
     text: '상시모집'
   }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
ALWAYS: {
backgroundColor: 'rgba(0, 231, 89, 0.1)',
color: '#00E759',
text: '상시모집'
}
ALWAYS: {
backgroundColor: 'rgba(0, 231, 89, 0.1)', // 혼합 후 #E6FDEE
color: '#0E7A33', // 제안 대비 5.1:1 (WCAG AA 충족)
text: '상시모집'
}
🤖 Prompt for AI Agents
In frontend/src/components/ClubStateBox/ClubStateBox.tsx around lines 22–26, the
ALWAYS state uses backgroundColor 'rgba(0, 231, 89, 0.1)' and text color
'#00E759' which fails WCAG AA contrast; change the text color to '#0E7A33'
(leave the background as-is) so the combination meets the 4.5:1 contrast
requirement.

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.

상시모집까지 추가하신거 수고하셨습니다!!

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

상시모집 적용 좋습니다 ㅎㅎ

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.

3 participants