Skip to content

dashboard 양 옆 공백, 홈 버튼 수정#6

Open
longtea313 wants to merge 1 commit into
developfrom
yoon_uiupdate
Open

dashboard 양 옆 공백, 홈 버튼 수정#6
longtea313 wants to merge 1 commit into
developfrom
yoon_uiupdate

Conversation

@longtea313

@longtea313 longtea313 commented Aug 19, 2025

Copy link
Copy Markdown
Contributor

📌 변경 사항 개요

backoffice/dashboard 홈 버튼 색상 변경, UI 양 옆 공백 제거

Summary by CodeRabbit

  • 신기능
    • 사이드바에 ‘홈’ 메뉴를 추가하여 대시보드로 빠르게 이동할 수 있습니다.
  • 리팩터링
    • 모든 메뉴 클릭 동작을 통합해 일관된 내비게이션을 제공합니다.
  • 스타일
    • 대시보드 내부 가로 패딩과 레이아웃 기본 패딩을 제거하여 콘텐츠가 가장자리까지 확장되며 여백이 조정됩니다.

@coderabbitai

coderabbitai Bot commented Aug 19, 2025

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

백오피스 대시보드 레이아웃에서 내부 패딩이 제거되었습니다. 사이드바는 “홈” 메뉴를 목록에 추가하고, 아이템 공통 onClick → path 매핑으로 라우팅을 일원화했습니다. 별도 홈 아이콘 클릭 로직을 제거했습니다. 런타임 로직 변경은 사이드바 클릭 처리 방식에 국한됩니다.

Changes

Cohort / File(s) Summary
레이아웃 패딩 제거
src/app/(backoffice)/backoffice/layout.tsx, src/app/(backoffice)/backoffice/dashboard/page.tsx
메인/대시보드 컨테이너의 수평/내부 패딩 제거(p-4, px-[140px] 삭제)로 레이아웃 여백 축소.
사이드바 네비게이션 일원화
src/components/backoffice/DashboardSidebar.tsx
메뉴 배열에 “홈” 추가 및 menuToPath 매핑 연결. 개별 아이템 네비게이션을 공통 onClick 핸들러에서 router.push로 처리. 홈 아이콘 이미지 및 별도 onClick 제거. 활성화 스타일 로직 변화 없음.

Sequence Diagram(s)

sequenceDiagram
  participant U as User
  participant SB as DashboardSidebar
  participant R as Router

  U->>SB: 클릭(메뉴 라벨)
  SB->>SB: onMenuClick(라벨)
  SB->>R: router.push(menuToPath[라벨]) (경로 존재 시)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

귀 끝 세운 토끼가 톡톡, 패딩을 털어내고
복도 끝까지 쭉쭉, 화면은 넓어지고
“홈”도 메뉴에 쏙, 길찾긴 한결 쉽네
클릭 한 번이면 휙, 라우터가 길을 내네
오늘도 깡총깡총, 깔끔한 백오피스로! 🐇✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch yoon_uiupdate

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary or @coderabbitai 요약 to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
src/app/(backoffice)/backoffice/layout.tsx (1)

45-45: 메인 패딩 제거 의도 충족 — flex 컨텍스트에서는 min-w-0 추가 권장

좌우 여백 제거 목적은 충족되었습니다. 다만 사이드바와 같은 flex 컨테이너 내에서 긴 제목/테이블이 포함될 때 수평 오버플로우를 방지하려면 메인 영역에 min-w-0을 부여하는 것이 안전합니다.

적용 제안(diff):

-               <main className="bg-white flex-1 overflow-y-auto">{children}</main>
+               <main className="bg-white flex-1 overflow-y-auto min-w-0">{children}</main>
src/components/backoffice/DashboardSidebar.tsx (1)

14-20: 레이블-경로의 이중 정의를 단일 소스로 통일 권장

현재 menus 배열과 menuToPath 맵 모두에 레이블을 중복 정의하고 있어, 추후 레이블/경로 변경 시 불일치 위험이 있습니다. 단일 소스에서 파생하는 구조로 정리하는 것을 권장합니다.

간단한 방법 1: menuToPath에서 menus를 파생

// 권장: menuToPath를 단일 소스로 두고, 아래처럼 파생
const menuToPath: Record<string, string> = {
  "홈": "/backoffice/dashboard",
  "경매": "/backoffice/auction",
  "상품": "/backoffice/products",
  "고객": "/backoffice/customers",
  "권한": "/backoffice/roles",
  "설정": "/backoffice/settings",
}

const menus = Object.keys(menuToPath)

대안 2: 객체 배열로 단일화(라벨 변경/번역시 안전, 안정적인 key 사용 가능)

const items = [
  { id: "home", label: "홈", path: "/backoffice/dashboard" },
  { id: "auction", label: "경매", path: "/backoffice/auction" },
  { id: "products", label: "상품", path: "/backoffice/products" },
  { id: "customers", label: "고객", path: "/backoffice/customers" },
  { id: "roles", label: "권한", path: "/backoffice/roles" },
  { id: "settings", label: "설정", path: "/backoffice/settings" },
] as const

{items.map(({ id, label, path }) => (
  <div key={id} onClick={() => router.push(path)}>
    <span>{label}</span>
  </div>
))}

참고로 레이블을 key로 사용하는 현재 구조는 i18n(번역) 도입 시 취약할 수 있으니, id 기반 key를 권장합니다.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear 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 ce0292d and 2a75c8a.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • src/app/(backoffice)/backoffice/dashboard/page.tsx (1 hunks)
  • src/app/(backoffice)/backoffice/layout.tsx (1 hunks)
  • src/components/backoffice/DashboardSidebar.tsx (2 hunks)
🔇 Additional comments (3)
src/app/(backoffice)/backoffice/dashboard/page.tsx (1)

7-7: 대시보드 wrapper 좌우 패딩 제거 — OK

상위 레이아웃의 패딩 제거와 일관적이며, 내부 섹션들이 자체 여백(ml-4, px-4 등)을 가지고 있어 가독성도 유지됩니다. 의도대로 좌우 공백이 사라지는 변경으로 보입니다.

src/components/backoffice/DashboardSidebar.tsx (2)

12-12: 메뉴에 ‘홈’ 추가 — 레이아웃의 기본 active 값(“홈”)과 일치, 내비게이션 동작 일관화

레이아웃의 초기 상태와 맞물려 초기 활성 메뉴가 자연스럽게 표시됩니다. 기존 아이템과 동일한 처리 흐름으로 통합된 점도 좋습니다.


24-24: 의미 있는 코드 변화 없음

빈 줄 변경으로 보이며 별도 조치 불필요합니다.

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.

1 participant