-
Notifications
You must be signed in to change notification settings - Fork 2
♻️refactor: 반응형 및 마무리 수정 작업 #104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Walkthrough레이아웃과 스타일링의 응답성 및 일관성을 개선하는 변경이 다수의 컴포넌트에 적용되었습니다. 일부 컴포넌트에서는 글로벌 상태 관리(Zustand)를 통한 사용자 정보 동기화가 추가되었고, 헤더 및 관련 컴포넌트에서는 경로 기반 조건부 렌더링과 오버플로우 처리 방식이 변경되었습니다. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant ProfileEditForm
participant Server
participant ZustandStore
User->>ProfileEditForm: 프로필 수정 제출
ProfileEditForm->>Server: PATCH /profile
Server-->>ProfileEditForm: 업데이트된 user 정보 반환
ProfileEditForm->>ZustandStore: setUser(병합된 user 정보)
ZustandStore-->>ProfileEditForm: 글로벌 상태 업데이트
ProfileEditForm-->>User: UI에 최신 정보 반영
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
npm error Exit handler never called! ✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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
🧹 Nitpick comments (2)
src/app/features/mypage/components/ProfileEditForm.tsx (1)
10-10: 일관성을 위해 useAuth 훅 사용을 권장합니다.
useAuthStore를 직접 사용하는 대신useAuth훅을 통해setUser함수에 접근하는 것이 더 일관된 패턴입니다.useAuth.ts에서 이미setUser를 노출하도록 수정되었으므로 이를 활용하는 것이 좋겠습니다.다음과 같이 수정하는 것을 권장합니다:
-import { useAuthStore } from '@/app/features/auth/store/useAuthStore' +import { useAuth } from '@/app/features/auth/hooks/useAuth'-// Zustand 상태 갱신 함수 가져오기 -const setUser = useAuthStore((state) => state.setUser) +// 인증 상태 갱신 함수 가져오기 +const { setUser } = useAuth()Also applies to: 46-47
src/app/features/dashboard/components/edit/EditInvitation.tsx (1)
132-169: 초대 아이템 레이아웃과 UX가 크게 개선되었습니다.다음과 같은 개선사항들이 적절히 적용되었습니다:
- 마지막 아이템을 제외한 조건부 하단 테두리 처리
- Tooltip을 통한 닉네임 정보 제공으로 사용성 향상
- 취소 버튼의 일관된 스타일링과 로딩 상태 처리
justify-between레이아웃으로 공간 활용 최적화다만, 접근성 개선을 위해 고려해볼 점이 있습니다.
접근성 향상을 위해 다음 개선사항을 고려해보세요:
<Tooltip content={member.invitee.nickname}> - <p className="Text-black max-w-[200px] cursor-help truncate text-13"> + <p + className="Text-black max-w-[200px] cursor-help truncate text-13" + role="button" + tabIndex={0} + aria-label={`${member.invitee.email} (${member.invitee.nickname})`} + > {member.invitee.email} </p> </Tooltip>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (13)
src/app/dashboard/[id]/edit/page.tsx(1 hunks)src/app/features/auth/hooks/useAuth.ts(1 hunks)src/app/features/dashboard/components/edit/DeleteDashboardButton.tsx(1 hunks)src/app/features/dashboard/components/edit/EditInfo.tsx(1 hunks)src/app/features/dashboard/components/edit/EditInvitation.tsx(1 hunks)src/app/features/dashboard/components/edit/EditMember.tsx(1 hunks)src/app/features/dashboard/components/edit/PaginationHeader.tsx(1 hunks)src/app/features/mypage/components/ProfileEditForm.tsx(3 hunks)src/app/mypage/page.tsx(1 hunks)src/app/shared/components/common/UserInfo.tsx(1 hunks)src/app/shared/components/common/header/Collaborator/CollaboratorList.tsx(1 hunks)src/app/shared/components/common/header/Header.tsx(1 hunks)src/app/shared/components/common/header/LeftHeaderContent.tsx(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (3)
src/app/shared/components/common/header/Header.tsx (1)
src/app/shared/components/common/header/LeftHeaderContent.tsx (1)
LeftHeaderContent(7-33)
src/app/features/mypage/components/ProfileEditForm.tsx (1)
src/app/features/auth/store/useAuthStore.ts (1)
useAuthStore(6-21)
src/app/shared/components/common/header/LeftHeaderContent.tsx (1)
src/app/shared/store/useSelectedDashboardStore.ts (1)
useSelectedDashboardStore(10-15)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: eslint-check
🔇 Additional comments (22)
src/app/features/auth/hooks/useAuth.ts (1)
27-27: 훌륭한 API 개선입니다!
setUser함수를useAuth훅의 반환 객체에 추가하여 다른 컴포넌트에서 전역 사용자 상태를 업데이트할 수 있도록 하는 것은 좋은 접근입니다. 기존의updateAuthState와logout함수와 일관된 패턴을 유지하고 있습니다.src/app/features/mypage/components/ProfileEditForm.tsx (1)
77-88: 전역 상태 동기화 로직이 잘 구현되었습니다.프로필 수정 후 Zustand 전역 상태를 업데이트하는 로직이 훌륭합니다. 사용자 정보 존재 여부 확인, 스프레드 연산자를 통한 기존 데이터 보존, 그리고 적절한 fallback 처리가 모두 잘 되어 있습니다. 이를 통해 헤더의 사용자 정보가 프로필 수정 후 즉시 반영될 것입니다.
src/app/shared/components/common/UserInfo.tsx (1)
25-27: 반응형 디자인이 올바르게 구현되었습니다.태블릿 화면에서 닉네임을 숨기는
tablet:hidden클래스가 적절히 적용되었습니다. 이는 PR 목표와 일치하는 반응형 레이아웃 개선입니다.src/app/features/dashboard/components/edit/PaginationHeader.tsx (2)
24-24: 텍스트 줄바꿈 방지가 적절히 적용되었습니다.
whitespace-nowrap클래스 추가로 레이아웃의 일관성이 개선되었습니다.
27-28: flexbox 레이아웃 안정성이 향상되었습니다.
shrink-0클래스를 통해 네비게이션 컨트롤과 페이지 카운트가 의도치 않게 축소되는 것을 방지했습니다. 이는 반응형 레이아웃에서 중요한 개선사항입니다.src/app/mypage/page.tsx (1)
14-16: 다음 스크립트로 애플리케이션 전반에서<Header>사용 패턴과pl-300클래스 적용 위치를 다시 확인해보겠습니다.#!/bin/bash # Description: Header 컴포넌트 사용 위치 및 pl-300 클래스 적용 파일 검색 echo "🔍 <Header> 사용 위치 검색" rg '<Header' --glob '*.tsx' -n -C 3 || true echo -e "\n🔍 pl-300 클래스 적용 위치 검색" rg 'pl-300' --glob '*.tsx' -n -C 3 || truesrc/app/features/dashboard/components/edit/DeleteDashboardButton.tsx (1)
61-61: 버튼 텍스트 줄바꿈 방지가 적절히 적용되었습니다.
whitespace-nowrap클래스 추가로 버튼 텍스트의 무결성이 보장됩니다. 다른 컴포넌트와 일관된 스타일링 개선입니다.src/app/features/dashboard/components/edit/EditInfo.tsx (1)
19-19: 반응형 크기 조정이 올바르게 구현되었습니다.고정 크기(
h-300 w-584)에서 유연한 최대 너비 제한(max-w-584)으로 변경하여 콘텐츠에 따라 높이가 동적으로 조정되면서도 최대 너비는 제한하는 좋은 반응형 디자인 패턴입니다.src/app/features/dashboard/components/edit/EditMember.tsx (1)
67-67: 반응형 레이아웃 개선이 잘 적용되었습니다.고정된 높이와 너비(
h-360 w-584)를 최대 너비(max-w-584)로 변경하여 컨텐츠에 따라 동적으로 높이가 조정될 수 있도록 개선했습니다. 이는 다양한 화면 크기에서 더 나은 사용자 경험을 제공할 것입니다.src/app/shared/components/common/header/Collaborator/CollaboratorList.tsx (1)
34-34: 협업자 아바타 겹침 효과가 올바르게 구현되었습니다.
gap-4에서-space-x-10으로 변경하여 협업자 프로필 이미지들이 겹치도록 표시하는 컴팩트한 레이아웃을 구현했습니다. 이는 PR 목표에서 언급된 UI 개선사항과 일치합니다.src/app/shared/components/common/header/LeftHeaderContent.tsx (3)
3-3: pathname 기반 조건부 렌더링을 위한 hook 추가가 적절합니다.경로별로 다른 헤더 타이틀과 아이콘 표시를 위해
usePathnamehook을 추가한 것이 적절합니다.
16-18: 경로별 타이틀 조건부 렌더링이 올바르게 구현되었습니다.
/mypage경로에서는 "계정관리"를, 다른 경로에서는 대시보드 제목을 표시하도록 구현한 것이 사용자 경험을 개선할 것입니다.
21-21: 마이페이지에서 crown 아이콘 숨김 처리가 적절합니다.계정관리 페이지에서는 대시보드 소유권을 나타내는 crown 아이콘을 표시할 필요가 없으므로
pathname !== '/mypage'조건을 추가한 것이 합리적입니다.src/app/shared/components/common/header/Header.tsx (3)
12-12: 헤더 오버플로우 처리 개선이 적절합니다.
overflow-x-hidden에서overflow-x-auto로 변경하여 컨텐츠가 넘칠 때 수평 스크롤을 허용하도록 한 것이 사용자 경험을 개선할 것입니다.
15-17: 좌측 헤더 컨텐츠 반응형 처리가 올바르게 구현되었습니다.작은 화면에서는 좌측 대시보드명을 숨기고 큰 화면에서만 표시하도록
hidden lg:block클래스를 적용한 것이 모바일 친화적인 레이아웃을 만들어줍니다.
20-20: 텍스트 줄바꿈 방지 처리가 적절합니다.우측 헤더 컨테이너에
whitespace-nowrap을 추가하여 헤더 요소들이 여러 줄로 나누어지는 것을 방지한 것이 레이아웃 안정성을 높입니다.src/app/dashboard/[id]/edit/page.tsx (2)
28-28: 컨텐츠 컨테이너 반응형 레이아웃이 잘 구현되었습니다.고정 너비에서
mx-auto ml-16과sm:max-w-full sm:px-4를 사용한 반응형 레이아웃으로 변경하여 다양한 화면 크기에서 최적화된 표시가 가능합니다.
35-35: 삭제 버튼 영역 반응형 처리가 적절합니다.
max-w-292,mt-8,px-16클래스를 적용하여 삭제 버튼 컨테이너도 반응형으로 동작하도록 개선했습니다. 주석에서 언급한 대로 좌측 마진 조정과 함께 레이아웃이 더 유연해졌습니다.src/app/features/dashboard/components/edit/EditInvitation.tsx (4)
100-100: 반응형 컨테이너 스타일링이 적절하게 적용되었습니다.
max-w-584,overflow-x-auto,whitespace-nowrap조합으로 반응형 레이아웃과 오버플로우 처리가 잘 구현되었습니다. 텍스트 왜곡 방지를 위한 최대 너비 제한도 적절합니다.
101-117: PaginationHeader 구조 개선으로 레이아웃 일관성이 향상되었습니다.초대하기 버튼을 PaginationHeader의 children으로 이동시켜 헤더 영역의 레이아웃이 더욱 일관성 있게 구성되었습니다.
w-fit shrink-0클래스로 버튼 크기 제어도 적절합니다.
119-119: 폼 요소에 수평 오버플로우 처리가 추가되었습니다.긴 이메일 주소나 콘텐츠가 오버플로우될 때 스크롤 처리가 가능하도록
overflow-x-auto가 적절히 추가되었습니다.
124-131: 로딩 및 에러 상태 처리가 명확하게 구성되었습니다.조건부 렌더링 순서가 논리적으로 정리되어 사용자에게 적절한 피드백을 제공합니다.
📌 변경 사항 개요
반응형 및 마무리 수정 작업
✨ 요약
반응형 및 마무리 수정 작업
📝 상세 내용
🐛fix:
🎨style:
🔗 관련 이슈
🖼️ 스크린샷
20250622_080703.mp4
✅ 체크리스트
💡 참고 사항
Summary by CodeRabbit
신규 기능
버그 수정
스타일