Skip to content

Comments

[feature] 사이드바가 스크롤을 따라온다#730

Merged
suhyun113 merged 1 commit intofeature/#731-add-layout-divider-MOA-230from
feature/#718-sidebar-sticky-fix-MOA-213
Sep 9, 2025
Merged

[feature] 사이드바가 스크롤을 따라온다#730
suhyun113 merged 1 commit intofeature/#731-add-layout-divider-MOA-230from
feature/#718-sidebar-sticky-fix-MOA-213

Conversation

@suhyun113
Copy link
Collaborator

@suhyun113 suhyun113 commented Sep 8, 2025

#️⃣연관된 이슈

ex) #718

📝작업 내용

스크롤 시, 사이드바 고정

default.mp4

애니메이션을 넣으니 이상해서, 고정하는 것으로 진행했습니다.

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

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

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

🫡 참고사항

현재 글이 박스 안에 들어가 있어 스크롤 시 상단이 잘려 보이는 어색함이 있습니다.
이를 개선하기 위해 글 영역의 박스를 제거하고, 사이드바와 본문 사이에 구분선을 추가하며, 상단 모아동 로고 영역과 (사이드바, 본문 영역) 사이에도 구분선을 넣는 방식을 고려하고 있습니다. 이렇게 하면 레이아웃 전환이 보다 자연스럽고 시각적으로도 덜 어색해질 것 같은데, 디자인이 없어서 일단 해보겠습니다...

Summary by CodeRabbit

  • 스타일
    • 관리자 페이지 사이드바 레이아웃을 개선했습니다. 스크롤 시 사이드바가 상단에서 98px 위치에 고정되어 긴 페이지에서도 탐색이 용이합니다. 또한 사이드바 높이가 콘텐츠에 맞춰 자동 조정되어 불필요한 여백이 줄고 가독성이 향상되었습니다. 전반적으로 사용성이 개선되고 페이지 레이아웃의 안정성이 높아졌습니다. 기능 동작에는 영향이 없으며 시각적/배치 개선에 집중되었습니다.

@suhyun113 suhyun113 self-assigned this Sep 8, 2025
@suhyun113 suhyun113 added ✨ Feature 기능 개발 💻 FE Frontend labels Sep 8, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 8, 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

사이드바 레이아웃을 position: sticky와 top: 98px, height: fit-content로 변경하여 스크롤 시 상단 98px에 고정되도록 스타일을 수정했습니다. 퍼블릭/익스포트 시그니처 변경은 없습니다.

Changes

Cohort / File(s) Change Summary
Sticky sidebar layout tweak
frontend/src/pages/AdminPage/components/SideBar/SideBar.styles.ts
SidebarWrapperposition: sticky; top: 98px; height: fit-content; 적용.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Assessment against linked issues

Objective Addressed Explanation
사이드바가 스크롤을 따라온다 (MOA-213)

Assessment against linked issues: Out-of-scope changes

(없음)

Possibly related issues

Suggested reviewers

  • Zepelown
  • lepitaaar
  • seongwon030
  • oesnuj
✨ 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/#718-sidebar-sticky-fix-MOA-213

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.

@vercel
Copy link

vercel bot commented Sep 8, 2025

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

Project Deployment Preview Comments Updated (UTC)
moadong Ready Ready Preview Comment Sep 8, 2025 11:54am

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: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
frontend/src/pages/AdminPage/components/SideBar/SideBar.styles.ts (3)

6-6: align-items: left는 유효한 값이 아닙니다 → flex-start로 수정 필요

현재 값은 무시되어 기본 정렬로 동작합니다.

-  align-items: left;
+  align-items: flex-start;

59-59: font-weight: medium은 표준 CSS 값이 아닙니다 → 500(또는 디자인 토큰)으로 교체

브라우저가 무시할 수 있어 의도치 않은 굵기로 렌더링됩니다.

-  font-weight: medium;
+  font-weight: 500;

(위 변경을 SidebarCategoryTitle, SidebarButton, .active 모두에 적용)

Also applies to: 77-77, 85-85


63-86: 버튼 접근성: all: unset으로 포커스 링 제거됨 → :focus-visible 추가

키보드 내비게이션용 포커스 표시를 복원하세요.

   transition: background-color 0.1s ease;
 
+  &:focus-visible {
+    outline: 2px solid rgba(255, 117, 67, 1);
+    outline-offset: 2px;
+    border-radius: 10px;
+  }
🧹 Nitpick comments (4)
frontend/src/pages/AdminPage/components/SideBar/SideBar.styles.ts (4)

11-13: sticky 오프셋 매직 넘버(98px) 제거 및 반응형 안전성 확보

헤더 높이가 브레이크포인트마다 달라질 수 있어 하드코딩(98px)은 유지보수 비용이 큽니다. 전역 CSS 변수(또는 테마 토큰)로 치환해 주세요.

적용 예(해당 범위 내 변경):

-  top: 98px;
+  /* 전역 --header-height가 없으면 98px로 폴백 */
+  top: var(--header-height, 98px);

검증:

  • SidebarWrapper의 모든 조상에 overflow: hidden/auto/scroll, transform, filter가 설정되어 있으면 sticky가 무력화될 수 있습니다. 해당 페이지 레이아웃에서 이런 속성이 있는지 한 번 확인 부탁드립니다(특히 “박스 컨테이너 내부에서 상단이 잘리는” 현상과 연관 가능성 높음).

7-9: 타이포그래피 속성 정리(중복/비권장 제거)

word-wrap은 overflow-wrap의 레거시 별칭이며 white-space: normal은 기본값입니다. 하나로 단순화하세요.

-  word-wrap: break-word;
-  overflow-wrap: break-word;
-  white-space: normal;
+  overflow-wrap: anywhere;

10-10: 사이즈 매직 넘버(168px) 단일 소스화

같은 값이 여러 곳에 중복됩니다. CSS 변수(또는 TS 상수/테마 토큰)로 통일해 유지보수성을 높이세요.

-  width: 168px;
+  width: var(--sidebar-width, 168px);
-  width: 168px;
-  height: 168px;
+  width: var(--sidebar-width, 168px);
+  height: var(--sidebar-width, 168px);
+  object-fit: cover;

추가(참고): 상단에 상수를 두고 쓰는 대안

// 파일 상단
const SIDEBAR_WIDTH = '168px';
// 사용처: width: ${SIDEBAR_WIDTH};

Also applies to: 25-26


41-46: Divider 스타일 명확화(border-color 사용) 및 마진 축약

color 대신 border-color로 의도를 분명히 하고, 마진은 축약형을 사용하세요.

-  border: 1px solid;
-  color: #C5C5C5;
-  height: 0;
-  margin: 16px 0px 16px 0px;
+  border: 0;
+  border-top: 1px solid #C5C5C5;
+  height: 0;
+  margin: 16px 0;
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • Jira 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 c72d914 and 76b50a7.

📒 Files selected for processing (1)
  • frontend/src/pages/AdminPage/components/SideBar/SideBar.styles.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
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/pages/AdminPage/components/SideBar/SideBar.styles.ts

@suhyun113 suhyun113 removed the request for review from alsdddk September 8, 2025 12:02
@suhyun113 suhyun113 changed the base branch from develop-fe to feature/#731-add-layout-divider-MOA-230 September 8, 2025 12:25
@suhyun113 suhyun113 merged commit 3b0a030 into feature/#731-add-layout-divider-MOA-230 Sep 9, 2025
5 checks passed
@lepitaaar lepitaaar deleted the feature/#718-sidebar-sticky-fix-MOA-213 branch October 21, 2025 08:07
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.

1 participant