Skip to content

Conversation

@DongEun02
Copy link
Contributor

@DongEun02 DongEun02 commented Oct 29, 2025

1) 작업한 이슈번호

SISC1-188

2) 변경 요약 (What & Why)

  • 무엇을 변경했는지: 랜딩페이지 구현
  • 변경했는지(문제/목표): 사용자가 처음 접하는 홈페이지, 사용자는 로그인/회원가입 페이지로 이동 가능, 상단 햄버거바를 통하여 다른 페이지로도 이동 가능

3) 스크린샷/동영상 (UI 변경 시)

전/후 비교, 반응형(모바일/데스크톱) 캡쳐

  • Before:
  • After:
image

햄버거바 클릭 시
image

4) 상세 변경사항 (전부 다)

  • 라우팅/페이지: App.jsx, Home.jsx
  • 컴포넌트: Layout.jsx에서 조건부 렌더링을 사용하여 홈페이지가 아닐 시 사이드바 고정, 홈페이지인 경우에만 햄버거 바를 사용하여 사이드바 토글, Sidebar.jsx에서도 마찬가지로 조건부 렌더링을 통하여 햄버거 바 클릭 시 사이드바 메뉴가 슬라이드하도록 구현했습니다. menuSections라는 변수에 공통으로 사용되는 사이드바 태그들을 넣어 재사용하였습니다.
  • 상태관리:
  • API 호출:
  • 스타일: Home.module.css, Sidebar.module.css
  • 기타:

5) 참고사항

position: absolute; 같은 속성을 쓰다보니 반응형이 전혀 고려가 안되어있어서 차후에 반응형으로 CSS 스타일 수정 예정입니다.

Summary by CodeRabbit

릴리스 노트

  • 새로운 기능

    • 재설계된 홈페이지 추가: 로그인/회원가입 버튼과 네비게이션 이동 동작
    • 경로 인식 사이드바 도입: 홈 전용 슬라이드 패널과 토글, 비홈 페이지용 항상 열림 사이드바
    • 레이아웃의 루트 여부에 따른 동적 렌더링 개선
  • UI/스타일

    • 홈페이지 비주얼 강화(그라데이션 배경, 타이포그래피, 이미지 갤러리/데코)
    • 사이드바 색상·애니메이션·브랜드(로고/제목) 및 메뉴 스타일 개선

@DongEun02 DongEun02 requested a review from gxuoo as a code owner October 29, 2025 17:35
@coderabbitai
Copy link

coderabbitai bot commented Oct 29, 2025

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

📥 Commits

Reviewing files that changed from the base of the PR and between 3cf9cd9 and edfb0b5.

⛔ Files ignored due to path filters (1)
  • frontend/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • frontend/package.json (1 hunks)
  • frontend/src/components/Sidebar.module.css (2 hunks)
  • frontend/src/pages/Home.module.css (1 hunks)
 __________________________________________
< Fight fire with fire. Review AI with AI. >
 ------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ

Tip

CodeRabbit can generate a title for your PR based on the changes with custom instructions.

Add the reviews.auto_title_instructions setting in your project's settings in CodeRabbit to generate a title for your PR based on the changes in the PR with custom instructions.

Walkthrough

루트 경로인지 감지하여 레이아웃과 사이드바 렌더링 분기를 추가하고, 홈 전용 슬라이드 사이드바 및 새로운 Home 페이지와 스타일(CSS 모듈)을 도입했습니다.

Changes

Cohort / File(s) 변경 요약
레이아웃 변경
frontend/src/components/Layout.jsx
useLocation 도입, 루트 경로 여부(isRoot)에 따라 Sidebar를 메인 내부 또는 외부에 조건부 렌더링하도록 구조 변경 및 outer/main에 position: relative 스타일 추가(주석 포함).
사이드바 컴포넌트
frontend/src/components/Sidebar.jsx
useLocation, useNavigate, useState 도입, isRoot 기반 토글 가능한 isOpen 슬라이드 사이드바 구현, menuSections 추출 및 루트/비루트 경로에 따른 다른 렌더링 흐름 추가, 로고 이미지 사용.
사이드바 스타일
frontend/src/components/Sidebar.module.css
배경색 변경 및 홈 전용 슬라이딩 패널 .homeSidebarMenu와 상태 클래스 .open/.closed, 헤더 .left, 브랜드/타이틀/메뉴버튼/로고 관련 클래스 추가 및 .title 스타일 확장.
홈 페이지 추가
frontend/src/pages/Home.jsx, frontend/src/pages/Home.module.css
Home 컴포넌트 추가(로그인/회원가입 네비게이션, 타이틀, 이미지 스트립 등) 및 전체 뷰포트용 스타일 모듈(그라디언트 배경, 버튼, 데코 코인 이미지) 추가.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Router
    participant Layout
    participant Sidebar

    User->>Router: 요청 (예: / 또는 다른 경로)
    Router->>Layout: Layout 렌더
    Layout->>Layout: useLocation -> isRoot 결정

    alt isRoot == true
        Layout->>Sidebar: render as home header + slide menu
        Sidebar->>Sidebar: show brand + menuButton
        User->>Sidebar: 클릭(menuButton)
        Sidebar->>Sidebar: toggle isOpen -> apply .open/.closed (transform)
        Sidebar->>Sidebar: render menuSections inside sliding panel
    else isRoot == false
        Layout->>Sidebar: render traditional sidebar (항상 열림)
        Sidebar->>Sidebar: render menuSections directly
    end

    User->>Sidebar: 메뉴 클릭 (NavLink)
    Sidebar->>Router: navigate -> 페이지 변경
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20-25 minutes

주의 깊은 검토 대상:

  • frontend/src/components/Sidebar.jsx: isOpen 상태 관리와 토글 로직, 루트/비루트 분기에서 중복 렌더링이나 ARIA/접근성 누락 여부
  • frontend/src/components/Layout.jsx: Sidebar 위치 변경에 따른 레이아웃 겹침/포지셔닝 문제
  • frontend/src/components/Sidebar.module.css & frontend/src/pages/Home.module.css: 슬라이드 애니메이션(transform), z-index 충돌, 반응형/뷰포트 적응성

Possibly related PRs

Suggested reviewers

  • gxuoo

Poem

🐰 루트 길 찾아 폴짝댄다,
슬라이드 문 열고 인사하네.
버튼 반짝, 동전 춤추고,
방문객 맞이 준비 끝! ✨

Pre-merge checks and finishing touches

❌ 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%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed PR 제목 "[FE] SISC1-188 [FEAT] : 랜딩페이지 구현"은 변경 사항의 핵심을 정확하게 반영합니다. 실제 변경 내용은 Home.jsx 구현, Layout.jsx의 조건부 사이드바 렌더링, Sidebar.jsx의 햄버거 메뉴 구현, 그리고 관련 CSS 스타일링으로 구성되어 있으며, 모두 랜딩 페이지 기능 구현이라는 목표를 지원합니다. 제목은 간결하고 명확하며, 히스토리를 스캔하는 팀원이 주요 변경 사항을 쉽게 이해할 수 있습니다. "[FE]"는 프론트엔드 영역을, "SISC1-188"는 이슈 추적 번호를, "[FEAT]"는 기능 추가를 나타내며, "랜딩페이지 구현"은 구체적이고 설명적입니다.

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

@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: 2

🧹 Nitpick comments (1)
frontend/src/pages/Home.jsx (1)

13-18: 회원가입 버튼 경로를 절대 경로로 통일해주세요.
현재 nav('signup')은 상대 경로라서 이 컴포넌트가 루트가 아닌 다른 라우트 안에서 재사용될 경우 잘못된 경로(/현재경로/signup)로 이동할 수 있습니다. 로그인 버튼과 동일하게 절대 경로를 지정해 두면 이런 잠재 오류를 예방할 수 있습니다.

-        <button className={styles.signUp} onClick={() => nav('signup')}>
+        <button className={styles.signUp} onClick={() => nav('/signup')}>
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2cca9b0 and 8261c13.

⛔ Files ignored due to path filters (3)
  • frontend/src/assets/coin3.png is excluded by !**/*.png
  • frontend/src/assets/coin5.png is excluded by !**/*.png
  • frontend/src/assets/logo.png is excluded by !**/*.png
📒 Files selected for processing (5)
  • frontend/src/components/Layout.jsx (1 hunks)
  • frontend/src/components/Sidebar.jsx (3 hunks)
  • frontend/src/components/Sidebar.module.css (2 hunks)
  • frontend/src/pages/Home.jsx (1 hunks)
  • frontend/src/pages/Home.module.css (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (3)
frontend/src/components/Layout.jsx (1)
frontend/src/components/Sidebar.jsx (3)
  • location (7-7)
  • isRoot (8-8)
  • Sidebar (6-174)
frontend/src/pages/Home.jsx (1)
frontend/src/pages/Attendance.jsx (1)
  • nav (15-15)
frontend/src/components/Sidebar.jsx (1)
frontend/src/components/Layout.jsx (2)
  • location (5-5)
  • isRoot (6-6)

gxuoo
gxuoo previously approved these changes Oct 30, 2025
Copy link
Contributor

@gxuoo gxuoo left a comment

Choose a reason for hiding this comment

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

크게 수정할 것은 없어보입니다~! 고생하셨습니다!

gxuoo
gxuoo previously approved these changes Oct 30, 2025
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: 3

♻️ Duplicate comments (2)
frontend/src/components/Sidebar.module.css (1)

22-29: 닫힌 사이드바가 접근성 트리에서 완전히 제거되지 않습니다.

.closed 상태에 pointer-events: none만 설정되어 있어 키보드 포커스는 여전히 숨겨진 링크로 이동할 수 있습니다. 완전한 접근성을 위해 visibility 속성도 함께 사용해야 합니다.

Based on learnings

다음과 같이 수정하세요:

 .open {
   transform: translateX(0);
+  visibility: visible;
+  pointer-events: auto;
 }
 
 .closed {
   transform: translateX(-100%);
+  visibility: hidden;
   pointer-events: none;
 }
frontend/src/components/Sidebar.jsx (1)

134-136: 햄버거 버튼 내부의 장식용 요소를 스크린 리더에서 숨기세요.

버튼 안의 빈 <span> 요소들은 시각적 장식용이므로 aria-hidden="true"를 추가하여 스크린 리더에서 무시되도록 해야 합니다.

다음과 같이 수정하세요:

           <button
             className={styles.menuButton}
             onClick={toggleSidebar}
             aria-label={isOpen ? '메뉴 닫기' : '메뉴 열기'}
             aria-expanded={isOpen}
           >
-            <span></span>
-            <span></span>
-            <span></span>
+            <span aria-hidden="true"></span>
+            <span aria-hidden="true"></span>
+            <span aria-hidden="true"></span>
           </button>
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8261c13 and 3cf9cd9.

📒 Files selected for processing (3)
  • frontend/src/components/Sidebar.jsx (3 hunks)
  • frontend/src/components/Sidebar.module.css (2 hunks)
  • frontend/src/pages/Home.module.css (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
frontend/src/components/Sidebar.jsx (3)
frontend/src/components/Layout.jsx (2)
  • location (5-5)
  • isRoot (6-6)
frontend/src/pages/Home.jsx (1)
  • nav (8-8)
frontend/src/pages/Attendance.jsx (1)
  • nav (15-15)
🔇 Additional comments (5)
frontend/src/components/Sidebar.jsx (3)

7-11: LGTM! 상태 관리와 라우팅 로직이 잘 구현되었습니다.

useLocation, useState, useNavigate를 활용한 루트 경로 감지 및 사이드바 토글 로직이 적절하게 구현되었습니다.


13-121: LGTM! 메뉴 섹션 추출로 코드 중복이 제거되었습니다.

네비게이션 구조를 menuSections 변수로 추출하여 루트/비루트 경로에서 재사용하도록 리팩토링한 점이 훌륭합니다. 코드 유지보수성이 크게 향상되었습니다.


43-43: 제목 요소의 의미론적 레벨 확인이 필요합니다.

"출석체크"를 <h3>에서 <span>으로 변경했습니다. 만약 이것이 섹션 제목의 역할을 한다면 의미론적으로 후퇴한 것일 수 있습니다. 실제로 제목의 역할을 하지 않는다면 현재 구현이 적절합니다.

제목 역할을 해야 한다면 적절한 heading 레벨을 사용하세요:

-          <span className={styles['menu-title']}>출석체크</span>
+          <h3 className={styles['menu-title']}>출석체크</h3>
frontend/src/components/Sidebar.module.css (2)

8-20: LGTM! 홈 사이드바 메뉴의 레이아웃과 애니메이션이 적절합니다.

고정 위치 지정과 transform 기반 슬라이드 애니메이션이 잘 구현되었습니다. z-indexoverflow 설정도 적절합니다.


114-161: LGTM! 홈페이지 헤더 영역의 스타일이 잘 정의되었습니다.

.left, .brand, .menuButton, .logo 클래스들이 햄버거 메뉴와 브랜드 영역을 구성하는 데 적절하게 정의되었습니다.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants