Skip to content

Fix(#278): 사이드바 개선#279

Merged
L0521 merged 5 commits into
devfrom
fix/278-sidebar-notes
May 21, 2026
Merged

Fix(#278): 사이드바 개선#279
L0521 merged 5 commits into
devfrom
fix/278-sidebar-notes

Conversation

@L0521
Copy link
Copy Markdown
Collaborator

@L0521 L0521 commented May 21, 2026

📌 관련 이슈

🏷️ PR 타입

  • ✨ 기능 추가 (Feature)
  • 🐛 버그 수정 (Bug Fix)
  • ♻️ 리팩토링 (Refactoring)
  • 🗑️ 코드 제거 (Chore)
  • 📝 문서 수정 (Documentation)
  • 🎨 스타일 변경 (Style)
  • ✅ 테스트 추가 (Test)

📝 작업 내용

사이드바 레이아웃

  • 최근 노트 목록 ↔ 저장소 버튼 간격 52px → 24px 축소

  • 접힌 사이드바 아이콘 좌우 여백 균등화 (NavItem/SearchButton 18px, expand·UserIcon 16px, 크레딧 버튼 6px)

  • 펼친 사이드바 크레딧 카드 좌우 여백 20px 고정

  • 노트 목록 아이템 스타일

  • 기본: #6B7280 / font-weight 400

  • 호버: 배경 없이 텍스트 #000으로 변경

  • 선택(active): #000 / font-weight 500 + 기존 #EBEBEB 배경 유지

  • 선택 시 위아래 패딩 6px → 3px 축소

  • 미트볼 버튼 위치를 클릭 시 배경 오른쪽 끝(right-[-6px])에 정렬

  • 드롭다운 UI

  • 크기 width 105px, padding 8px, border-radius 8px, box-shadow 업데이트

  • 버튼명 이름 변경 → 수정하기, 삭제 → 삭제하기로 변경

  • 버튼 색상 노트 아이템과 동일하게 통일, 가운데 정렬 적용

  • 버그 수정

  • 삭제 확인 모달이 Divider 슬라이더 버튼 뒤에 가리는 문제 → createPortal로 document.body에 마운트해 stacking context 우회

📸 스크린샷 (UI 변경 시 필수)

Before After
이전 화면 이후 화면

UI 변경이 없는 경우 이 섹션을 삭제해주세요.

✅ 체크리스트

공통

  • 셀프 리뷰를 완료했습니다
  • 코드 리뷰를 받을 준비가 완료되었습니다
  • pnpm tsc --noEmit 타입 체크를 통과했습니다
  • 브랜치명 컨벤션을 준수했습니다 (type/이슈번호-작업명)

UI/레이아웃 변경 시

  • 태블릿(768px~) / 데스크탑(1280px~) / 와이드(1360px~) 반응형을 확인했습니다
  • PageContainer / ContentGrid 공통 컴포넌트를 활용했습니다

캔버스 관련 변경 시

  • Konva / perfect-freehand 드로잉 성능에 영향이 없음을 확인했습니다
  • 캔버스 이벤트 스트림(onPointerDown/Move/Up)이 정상 동작합니다

인증 관련 변경 시

  • 카카오 / 네이버 로그인 흐름에 영향이 없음을 확인했습니다
  • 토큰 갱신 및 로그아웃 흐름을 확인했습니다

📎 기타 참고사항

  • 논의가 필요한 부분, 리뷰 시 유의사항 등을 작성해주세요.

Summary by CodeRabbit

스타일

  • 사이드바 메뉴 영역의 간격을 조정하여 레이아웃 개선
  • 노트 항목 드롭다운 메뉴의 디자인 및 버튼 텍스트 업데이트
  • 프로필 섹션의 위치 정렬 개선

버그 수정

  • 삭제 확인 모달의 표시 처리 개선

Review Change Stack

L0521 and others added 5 commits May 21, 2026 11:25
- nav mb-[52px] → mb-[24px] (최근 노트 목록과 저장소 버튼 사이 간격)
- UserIcon left-[18px] → left-[16px] (40px 아이콘 72px 기준 좌우 16px 균등)
- 유저 행 ml-[18px] → ml-[16px] (spacer 정렬 일치)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- 기본: text-[#6B7280] font-normal
- 호버: text-black
- 클릭(active): text-black font-medium
- 미트볼 버튼 위치 right-[-6px]로 클릭 시 배경 오른쪽 끝에 정렬
- 드롭다운: w-[105px] p-[8px] rounded-[8px] shadow, 이름 변경→수정하기, 삭제→삭제하기
- 드롭다운 버튼 색상 노트와 동일 (#6B7280 → hover black → active font-medium)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- 삭제 확인 모달 z-50 → z-[9999]
- 수정하기/삭제하기 text-left → text-center

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- 삭제 모달을 document.body에 portal 마운트 → Divider 등 외부 z-index에 가려지는 문제 해결
- 노트 아이템 py-[6px] → py-[3px] (선택 시 위아래 여백 축소)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@L0521 L0521 added enhancement UI/UX, 기능, 완성도 개선 fix 코드 및 버그 수정 labels May 21, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

📝 Walkthrough

Walkthrough

사이드바 컴포넌트의 모달 렌더링 방식을 createPortal로 최적화하고, Figma 디자인에 따라 노트 항목 스타일, 드롭다운 메뉴, 전체 간격을 조정했습니다.

Changes

사이드바 개선

Layer / File(s) Summary
삭제 확인 모달 포탈 렌더링 변경
src/features/sidebar/components/RecentNotes.tsx
createPortal을 추가로 import하여 삭제 확인 모달을 document.body에 마운트하도록 변경했습니다. z-index 조정으로 stacking context 우회, 바깥 클릭 및 isDeleting 상태에 따른 동작은 유지됩니다.
사이드바 노트 항목 및 드롭다운 메뉴 스타일 업데이트
src/features/sidebar/components/SidebarNoteItem.tsx
NavLink active 상태 Tailwind 클래스(여백, 폰트, 배경), 더보기 버튼 위치 정렬, 드롭다운 메뉴 폭/패딩/보더/그림자, 버튼 정렬 및 텍스트를 Figma 디자인에 맞게 조정했습니다.
사이드바 전체 간격 및 정렬 조정
src/features/sidebar/Sidebar.tsx, src/features/sidebar/components/SidebarProfile.tsx
메인 네비게이션 하단 여백을 52px→24px로 줄이고, SidebarProfile의 좌측 마진과 UserIcon 절대 위치를 18px→16px으로 조정하여 전체 간격을 정규화했습니다.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested reviewers

  • stringnine
  • dev-ldy03
  • Mingyeong-Kang

Poem

🐰 사이드바가 말끔하게, 간격 맞춰 반짝반짝
포탈로 띄운 모달창, 스택 문제도 쏘옥 해결
피그마 디자인 따라, 매끈하게 완성! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목은 사이드바 개선이라는 주요 변경사항을 명확하게 요약하고 있으며, 이슈 #278과 연결되어 있습니다.
Description check ✅ Passed PR 설명은 템플릿 구조를 따르고 관련 이슈, PR 타입, 상세한 작업 내용을 포함하고 있습니다.
Linked Issues check ✅ Passed 모든 코드 변경사항이 이슈 #278의 요구사항을 충족합니다: 사이드바 여백 수정, 노트 목록 간격 조정, 노트 호버/활성 상태 UI 조정, 모달 z-인덱스 버그 수정이 구현되었습니다.
Out of Scope Changes check ✅ Passed 모든 변경사항이 이슈 #278의 범위 내에 있으며, 사이드바 관련 스타일, 레이아웃, 버그 수정에 집중되어 있습니다.
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
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/278-sidebar-notes

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

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

🧹 Nitpick comments (1)
src/features/sidebar/components/RecentNotes.tsx (1)

197-234: ⚡ Quick win

접근성 향상을 위한 모달 속성 추가를 권장합니다.

Portal 구현은 올바르게 동작하지만, 키보드 사용자와 스크린 리더 사용자를 위한 접근성 속성이 누락되어 있습니다. 다음 개선 사항을 고려해 주세요:

  • 모달 컨테이너에 role="dialog"aria-modal="true" 추가
  • 제목과 연결된 aria-labelledby 속성 추가
  • Escape 키로 모달을 닫을 수 있도록 키보드 이벤트 핸들러 추가
♿ 접근성 개선 제안
       {deleteTargetId !== null &&
         createPortal(
           <div
             className="fixed inset-0 z-[9999] flex items-center justify-center bg-[`#00000033`]"
             onClick={(e) => {
               if (e.target === e.currentTarget && !isDeleting) {
                 setDeleteTargetId(null);
               }
             }}
+            onKeyDown={(e) => {
+              if (e.key === "Escape" && !isDeleting) {
+                setDeleteTargetId(null);
+              }
+            }}
+            role="dialog"
+            aria-modal="true"
+            aria-labelledby="delete-modal-title"
           >
-            <div className="w-[360px] rounded-[20px] bg-white px-8 py-8 shadow-[0px_10px_40px_rgba(0,0,0,0.1)]">
+            <div className="w-[360px] rounded-[20px] bg-white px-8 py-8 shadow-[0px_10px_40px_rgba(0,0,0,0.1)]">
-              <h2 className="text-center text-[22px] leading-[32px] font-semibold text-black">
+              <h2 
+                id="delete-modal-title"
+                className="text-center text-[22px] leading-[32px] font-semibold text-black"
+              >
                 이 노트를 삭제하시겠습니까?
               </h2>
🤖 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 `@src/features/sidebar/components/RecentNotes.tsx` around lines 197 - 234, The
modal created in the createPortal when deleteTargetId !== null is missing
accessibility attributes and keyboard handling; update the modal container
element (the outermost div passed to createPortal) to include role="dialog",
aria-modal="true", and aria-labelledby pointing to the modal title (add an id to
the h2 used for the title), and add a keydown listener (mounted while the modal
is open) that closes the modal by calling setDeleteTargetId(null) when Escape is
pressed (ensure it respects isDeleting so it doesn't close mid-delete); keep
this logic adjacent to the existing
deleteTargetId/isDeleting/handleDeleteConfirm usage so it’s easy to find in
RecentNotes.tsx.
🤖 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.

Nitpick comments:
In `@src/features/sidebar/components/RecentNotes.tsx`:
- Around line 197-234: The modal created in the createPortal when deleteTargetId
!== null is missing accessibility attributes and keyboard handling; update the
modal container element (the outermost div passed to createPortal) to include
role="dialog", aria-modal="true", and aria-labelledby pointing to the modal
title (add an id to the h2 used for the title), and add a keydown listener
(mounted while the modal is open) that closes the modal by calling
setDeleteTargetId(null) when Escape is pressed (ensure it respects isDeleting so
it doesn't close mid-delete); keep this logic adjacent to the existing
deleteTargetId/isDeleting/handleDeleteConfirm usage so it’s easy to find in
RecentNotes.tsx.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: de3d9de4-3641-4586-8885-acb387cac87f

📥 Commits

Reviewing files that changed from the base of the PR and between 92191d5 and 97f9f4e.

📒 Files selected for processing (4)
  • src/features/sidebar/Sidebar.tsx
  • src/features/sidebar/components/RecentNotes.tsx
  • src/features/sidebar/components/SidebarNoteItem.tsx
  • src/features/sidebar/components/SidebarProfile.tsx

Copy link
Copy Markdown
Collaborator

@stringnine stringnine left a comment

Choose a reason for hiding this comment

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

오 좋아요!!! 깔끔하게 리팩토링 잘 된 것 같습니다!

@L0521 L0521 merged commit d8d4120 into dev May 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement UI/UX, 기능, 완성도 개선 fix 코드 및 버그 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Fix] 사이드바 개선

2 participants