Skip to content

Conversation

@chaeyoungwon
Copy link
Contributor

@chaeyoungwon chaeyoungwon commented Jan 28, 2026

💡 PR 타입

  • 기능 추가
  • 버그 수정
  • 코드 개선
  • 문서 수정
  • 기타

📝 PR 내용

  • [locale] 하위 페이지에서 기기 너비 기준 모바일 접근 모달이 노출되도록 구현했습니다. 이에 따라 app/layout.tsx가 아닌 app/[locale]/layout.tsx에 관련 코드를 추가했습니다.

  • 피그마 답변에 따라 1244px 미만에서 모달이 노출되도록 했으며, 기기 종류와 무관하게 데스크탑에서도 화면 크기를 줄이면 동일하게 노출되도록 처리했습니다. 따라서 별도의 기기 감지 라이브러리는 사용하지 않고, 화면 너비를 기준으로 판단하는 방식으로 구현했습니다! 해당 로직은 커스텀 훅으로 분리해두었습니다.

  • ModalOverlay를 공통 컴포넌트로 사용하기 위해, 배경 투명도는 props로 제어할 수 있도록 수정했습니다.

🔍 관련 이슈

📸 작업 화면

스크린샷 2026-01-28 오후 3 53 51

Summary by CodeRabbit

릴리스 노트

  • 새로운 기능

    • 소형 화면용 모달 오버레이가 추가되어 데스크톱 사용 권장 메시지와 미리보기 이미지를 표시하며 사용자가 닫을 수 있습니다.
    • 뷰포트 기반 반응형 감지 기능이 추가되어 모달 표시 여부를 제어합니다.
  • 스타일

    • 가입 페이지 로고의 시각적 스택 순서(z-index)가 조정되었습니다.
  • 수정

    • 모달 오버레이의 배경 스타일을 외부에서 조정할 수 있도록 유연성이 향상되었으며, 다국어(영/한) 텍스트가 추가되었습니다.

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

@coderabbitai
Copy link

coderabbitai bot commented Jan 28, 2026

Walkthrough

모바일 감지 훅과 MobileModal 컴포넌트를 추가하고 레이아웃에 마운트했으며, ModalOverlay에 클래스명 옵션을 도입하고 가입 페이지 로고의 z-index를 조정했습니다.

Changes

Cohort / File(s) 변경 요약
모바일 감지 훅
src/hooks/useMediaQuery.ts
뷰포트 최대 너비 기반 미디어 쿼리 훅 추가: (max-width: maxWidth-1px) 구독/청소 및 boolean
모바일 모달 컴포넌트
src/components/common/MobileModal.tsx
신규 클라이언트 컴포넌트 추가: 모바일 전용 모달, isClosed 상태, useMediaQuery 사용, 닫기 버튼 및 번역 텍스트/이미지 표시, 기본 export.
모달 오버레이 확장
src/components/common/ModalOverlay.tsx
ModalOverlayPropsclassName?: string 추가 및 기본값 className = "bg-Black/50" 적용; 오버레이 클래스가 동적으로 설정되도록 변경.
레이아웃 통합
src/app/[locale]/layout.tsx
MobileModal을 import 후 NextIntlClientProvider 내부에 렌더링하여 앱 레이아웃에 마운트함.
스타일/표시 순서 조정
src/app/[locale]/signup/page.tsx
LogoRed 컴포넌트의 z-index를 50에서 20으로 변경(스태킹 순서 조정).
로케일 메시지 추가
messages/en.json, messages/ko.json
mobileModal 키 추가: closeLabel, title, imageAlt 현지화 문자열 추가.

Sequence Diagram(s)

sequenceDiagram
    participant User as 사용자
    participant Layout as 레이아웃
    participant MobileModal as MobileModal
    participant useMediaQuery as useMediaQuery
    participant ModalOverlay as ModalOverlay

    User->>Layout: 페이지 요청/로드
    Layout->>MobileModal: MobileModal 마운트
    MobileModal->>useMediaQuery: maxWidth=1244px 호출
    useMediaQuery->>useMediaQuery: MediaQueryList 생성\n(max-width: 1243px)
    useMediaQuery-->>MobileModal: 초기 매칭 상태 반환

    rect rgba(100,150,200,0.5)
    Note over MobileModal,ModalOverlay: 화면이 모바일(매칭)인 경우
    MobileModal->>ModalOverlay: 모달 렌더링 (className 전달)
    ModalOverlay-->>User: 반투명 배경과 모달 표시
    User->>MobileModal: 닫기 버튼 클릭
    MobileModal->>MobileModal: isClosed = true
    MobileModal-->>User: 모달 숨김
    end

    rect rgba(150,200,150,0.5)
    Note over useMediaQuery,MobileModal: 화면 크기 변경 이벤트
    useMediaQuery->>useMediaQuery: 'change' 이벤트 감지
    useMediaQuery-->>MobileModal: 상태 업데이트
    MobileModal->>MobileModal: isClosed = false (데스크톱 전환 시 리셋)
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목은 변경 사항의 핵심인 모바일 접근 모달 UI 및 로직 구현을 명확하게 요약하고 있으며, 풀 리퀘스트의 주요 목표와 일치합니다.
Description check ✅ Passed PR 설명은 템플릿의 주요 섹션(타입, 내용, 관련 이슈, 작업 화면)을 포함하고 있으나, 체크리스트 항목들이 확인되지 않았습니다.
Linked Issues check ✅ Passed 모든 변경 사항이 issue #31의 목표(모바일 접근 모달 UI 추가 및 모바일 감지 로직 추가)를 충족합니다: MobileModal 컴포넌트, useMediaQuery 훅, 필요한 레이아웃 통합, 다국어 지원이 포함되었습니다.
Out of Scope Changes check ✅ Passed 모든 변경 사항이 issue #31의 범위 내에 있으며, 로고 z-인덱스 조정은 모달 UI 구현을 지원하는 필요한 UI 조정입니다.

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

@chaeyoungwon chaeyoungwon changed the title Feature/stud 30 mobile modal UI [Feat] 모바일 접근 모달 UI 및 로직 구현 Jan 28, 2026
Copy link

@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 `@src/components/common/MobileModal.tsx`:
- Around line 29-35: The close button uses absolute positioning (button with
onClick={handleClose} and <Close />) but its immediate parent wrapper is missing
the relative positioning; update the parent container element that wraps the
modal content (the div that currently lacks "relative" near where the close
button is rendered) to include the "relative" class so the absolute-positioned
button is positioned correctly relative to the modal content.
🧹 Nitpick comments (2)
src/components/common/MobileModal.tsx (2)

37-41: 하드코딩된 한국어 텍스트 - i18n 미적용

프로젝트가 next-intl을 사용한 다국어 지원 구조인데, 모달 텍스트가 하드코딩되어 있습니다. src/app/[locale]/layout.tsx에서 NextIntlClientProvider 내부에 렌더링되므로 useTranslations 훅을 사용할 수 있습니다.

♻️ 개선 제안
+import { useTranslations } from "next-intl";

 const MobileModal = () => {
+  const t = useTranslations("mobileModal");
   const [isClosed, setIsClosed] = useState(false);
   // ...
   
-        <h1 className="Subhead_2_semibold text-Grey-100 mt-[3.25rem] text-center">
-          원활한 이용을 위해
-          <br />
-          PC 환경에서 접속해 주세요.
-        </h1>
+        <h1 className="Subhead_2_semibold text-Grey-100 mt-[3.25rem] text-center whitespace-pre-line">
+          {t("message")}
+        </h1>

43-52: 이미지 alt 텍스트 개선 권장

alt="mobile only"는 이미지의 내용을 설명하지 않습니다. 접근성을 위해 더 명확한 설명을 제공하거나, 순수 장식용 이미지라면 빈 문자열(alt="")을 사용하세요.

Copy link

@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 `@src/components/common/MobileModal.tsx`:
- Around line 29-33: 모달의 닫기 버튼에 하드코딩된 영어 aria-label("close modal")이 있어 로캘화가
필요합니다; MobileModal.tsx의 해당 <button>에서 aria-label을 직접 문자열 대신 i18n 키(예:
t('modal.close') 또는 props로 전달된 closeLabel)로 교체하고, 필요한 경우 props 인터페이스(예:
MobileModalProps)에 closeLabel?: string 추가 또는 내부에서 useTranslation 훅을 사용해 현재 로캘에
맞춘 문자열을 반환하도록 변경하세요; 또한 테스트와 접근성 검증을 위해 기본값을 제공하고(handleClose는 그대로 유지), 스냅샷/aria
테스트에서 i18n 키가 적용되는지 확인하도록 수정하세요.

@chaeyoungwon chaeyoungwon requested a review from ryu-won January 28, 2026 11:05
@chaeyoungwon chaeyoungwon merged commit 8820999 into dev Jan 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[STUD-30] 모바일 접근 모달 UI 구현 및 로직 추가

2 participants