Skip to content

[feature] 메인페이지 동아리/홍보 필터 컴포넌트를 제작한다#1129

Merged
seongwon030 merged 8 commits intodevelop-fefrom
feature/#1123-main-filter-btn-MOA-587
Feb 8, 2026
Merged

[feature] 메인페이지 동아리/홍보 필터 컴포넌트를 제작한다#1129
seongwon030 merged 8 commits intodevelop-fefrom
feature/#1123-main-filter-btn-MOA-587

Conversation

@seongwon030
Copy link
Member

@seongwon030 seongwon030 commented Jan 31, 2026

#️⃣연관된 이슈

ex) #1123

스크린샷 2026-01-31 오후 6 20 35

📝작업 내용

  • 모바일 메인페이지에 동아리/홍보 탭 전환 필터 버튼 추가
  • 공통 Button 컴포넌트에 className prop 추가하여 styled() 확장 지원
  • 필터 버튼 알림 dot 컴포넌트 구현 (홍보 알림용, 추후 연결)
  • 모바일 배너 margin-top 제거

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

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

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

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

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

🫡 참고사항

Summary by CodeRabbit

릴리스 노트

  • New Features

    • 메인 페이지에 모바일 전용 필터 컴포넌트 추가 (탭으로 동아리/홍보 전환)
    • 버튼에 추가 스타일 적용 지원으로 UI 커스터마이즈 가능
  • Style

    • 모바일 배너 상단 여백 조정으로 레이아웃 개선
  • Documentation

    • 필터 컴포넌트용 Storybook 예제 추가 (모바일 뷰포트 및 알림 점 시나리오 포함)

seongwon030 and others added 6 commits January 31, 2026 18:12
- styled(Button)으로 스타일 확장 시 className 전달이 필요하여 추가
동아리/홍보 탭 전환 UI 및 알림 dot 컴포넌트 추가

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Jan 31, 2026

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

Project Deployment Actions Updated (UTC)
moadong Ready Ready Preview, Comment Feb 8, 2026 3:08am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 31, 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

메인페이지에 모바일 전용 "동아리/홍보" 필터 컴포넌트를 추가하고 Button에 className prop을 전달하도록 확장했으며, BannerContainer의 모바일 margin-top을 56px에서 0px로 조정했습니다.

Changes

Cohort / File(s) Summary
Button 컴포넌트 확장
frontend/src/components/common/Button/Button.tsx
ButtonPropsclassName?: string 추가. ButtonclassName을 받아 StyledButton으로 전달하도록 변경.
Filter 컴포넌트 (로직 · 스타일 · 스토리북)
frontend/src/pages/MainPage/components/Filter/Filter.tsx, frontend/src/pages/MainPage/components/Filter/Filter.styles.ts, frontend/src/pages/MainPage/components/Filter/Filter.stories.tsx
모바일 전용 필터 컴포넌트 신규 추가. useDevice, useLocation, useNavigate로 경로 기반 활성화 및 내비게이션 처리. 스타일(FilterListContainer, FilterButton, NotificationDot, FilterButtonWrapper) 및 Storybook 스토리 3개 추가.
MainPage 및 Banner 스타일 조정
frontend/src/pages/MainPage/MainPage.tsx, frontend/src/pages/MainPage/components/Banner/Banner.styles.ts
MainPageFilter 컴포넌트를 Header와 Banner 사이에 렌더링하도록 추가. BannerContainer의 모바일 margin-top56px에서 0px로 변경.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • lepitaaar
  • oesnuj
  • suhyun113
🚥 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 제목이 변경사항의 주요 목표를 명확하게 설명합니다. 메인페이지에 동아리/홍보 필터 컴포넌트를 제작한다는 내용이 실제 변경사항과 일치합니다.
Linked Issues check ✅ Passed PR의 코드 변경사항이 MOA-587 이슈의 요구사항을 충족합니다. 동아리/홍보 칩 필터 버튼이 추가되었으며, 필터 컴포넌트 구현, 스타일링, 스토리북 문서화가 모두 완료되었습니다.
Out of Scope Changes check ✅ Passed 모든 변경사항이 필터 컴포넌트 구현 범위 내입니다. Button 컴포넌트의 className prop 추가, 배너 마진 조정, Filter 컴포넌트 전체 구현이 모두 필터 기능 추가와 직접 관련됩니다.
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
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/#1123-main-filter-btn-MOA-587

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.

@seongwon030 seongwon030 added ✨ Feature 기능 개발 💻 FE Frontend labels Jan 31, 2026
@seongwon030 seongwon030 changed the title [Feature] 메인페이지 동아리/홍보 필터 컴포넌트를 제작한다 [feature] 메인페이지 동아리/홍보 필터 컴포넌트를 제작한다 Feb 3, 2026
Copy link
Collaborator

@suhyun113 suhyun113 left a comment

Choose a reason for hiding this comment

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

수고하셨습니당! 지금처럼 프리뷰로 확인이 어려울 때 스토리북으로 보니 좋네요~

],
};

export const WithNotificationDot: Story = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

알림 스토리북까지 추가해주니 확인하기 편하네요!!

추가로 알림이 있는 홍보 버튼을 클릭하면 탭 전환과 동시에 알림 표시가 제거되는 인터랙션을 보여주는 스토리도 있으면 컴포넌트 흐름을 이해하는데 더 좋을 것 같아요!

Copy link
Member Author

Choose a reason for hiding this comment

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

76e370e 반영했습니다

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

🤖 Fix all issues with AI agents
In `@frontend/src/pages/MainPage/components/Filter/Filter.stories.tsx`:
- Around line 7-10: Replace the manual viewport manipulation by removing the
setViewportWidth helper and instead configure Storybook's built‑in viewport
addon via each story's parameters.viewport; specifically delete the
setViewportWidth function and any calls to it in this file and update the
PromotionTab and WithNotificationDot stories to set their responsive width using
their stories' parameters.viewport configuration so Storybook's viewport addon
(not window.innerWidth) drives CSS media queries and responsive behaviour.
🧹 Nitpick comments (1)
frontend/src/pages/MainPage/components/Filter/Filter.stories.tsx (1)

55-83: InteractiveNotificationFilter가 실제 Filter 컴포넌트를 사용하지 않고 내부 구조를 재구현하고 있습니다.

Filter 컴포넌트의 내부 구조가 변경되면 이 스토리는 실제 동작과 괴리가 생깁니다. 가능하다면 실제 Filter 컴포넌트를 합성하거나, FiltershowNotification 같은 prop을 추가하여 스토리에서 활용하는 방식을 고려해 주세요.

Comment on lines +7 to +10
const setViewportWidth = (width: number) => {
window.innerWidth = width;
window.dispatchEvent(new Event('resize'));
};
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

find . -name "Filter.stories.tsx" -type f | head -5

Repository: Moadong/moadong

Length of output: 125


🌐 Web query:

Storybook 10 viewport addon parameters configuration CSS media queries

💡 Result:

In Storybook 10.x, the Viewport feature is configured via:

  • parameters.viewport.options (the list of available viewports)
  • initialGlobals.viewport (the initially-selected viewport) (storybook.js.org)

Global config (.storybook/preview.ts)

import type { Preview } from '@storybook/your-framework';
import { MINIMAL_VIEWPORTS, INITIAL_VIEWPORTS } from 'storybook/viewport';

const preview: Preview = {
  parameters: {
    viewport: {
      options: {
        ...MINIMAL_VIEWPORTS,
        ...INITIAL_VIEWPORTS,
        // Custom “CSS breakpoint” viewports (use px values that match your `@media` rules)
        sm: { name: 'sm (≥640)', styles: { width: '640px', height: '800px' }, type: 'mobile' },
        md: { name: 'md (≥768)', styles: { width: '768px', height: '900px' }, type: 'tablet' },
        lg: { name: 'lg (≥1024)', styles: { width: '1024px', height: '900px' }, type: 'desktop' },
      },
    },
  },
  initialGlobals: {
    viewport: { value: 'md', isRotated: false },
  },
};

export default preview;

options entries are keyed objects like { name, styles: { width, height }, type }, and width/height must include units (e.g. "320px"). (storybook.js.org)

How this relates to CSS media queries

The viewport tool does not configure CSS @media queries directly—it simply changes the iframe size, and your existing CSS @media (min-width: ...) rules will apply automatically at those widths. (storybook.js.org)

Citations:


🏁 Script executed:

cat -n "./frontend/src/pages/MainPage/components/Filter/Filter.stories.tsx"

Repository: Moadong/moadong

Length of output: 3020


Storybook viewport 파라미터를 사용하여 반응형 동작을 올바르게 테스트하세요.

window.innerWidth 직접 변경은 CSS 미디어 쿼리를 트리거하지 않으며, Storybook의 viewport 애드온을 우회합니다. 현재 방식으로는 반응형 스타일이 제대로 적용되지 않습니다.

권장 수정 방법

setViewportWidth 함수를 제거하고, parameters.viewport를 사용하세요:

-const setViewportWidth = (width: number) => {
-  window.innerWidth = width;
-  window.dispatchEvent(new Event('resize'));
-};

 export const ClubTab: Story = {
+  parameters: {
+    viewport: {
+      defaultViewport: 'iphone12',
+    },
+  },
   decorators: [
     (Story) => {
       return (
         <MemoryRouter initialEntries={['/']}>
           <Story />
         </MemoryRouter>
       );
     },
   ],
 };

PromotionTabWithNotificationDot 스토리에도 동일하게 적용하세요.

📝 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
const setViewportWidth = (width: number) => {
window.innerWidth = width;
window.dispatchEvent(new Event('resize'));
};
export const ClubTab: Story = {
parameters: {
viewport: {
defaultViewport: 'iphone12',
},
},
decorators: [
(Story) => {
return (
<MemoryRouter initialEntries={['/']}>
<Story />
</MemoryRouter>
);
},
],
};
🤖 Prompt for AI Agents
In `@frontend/src/pages/MainPage/components/Filter/Filter.stories.tsx` around
lines 7 - 10, Replace the manual viewport manipulation by removing the
setViewportWidth helper and instead configure Storybook's built‑in viewport
addon via each story's parameters.viewport; specifically delete the
setViewportWidth function and any calls to it in this file and update the
PromotionTab and WithNotificationDot stories to set their responsive width using
their stories' parameters.viewport configuration so Storybook's viewport addon
(not window.innerWidth) drives CSS media queries and responsive behaviour.

@seongwon030 seongwon030 merged commit 3e8fe51 into develop-fe Feb 8, 2026
3 checks passed
@seongwon030 seongwon030 deleted the feature/#1123-main-filter-btn-MOA-587 branch February 8, 2026 03:16
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.

[feature] MOA-587 메인페이지 동아리/홍보 칩 필터 버튼을 추가한다

2 participants