Skip to content

Conversation

@yuj2n
Copy link
Contributor

@yuj2n yuj2n commented Jun 21, 2025

📌 변경 사항 개요

반응형 및 마무리 수정 작업

✨ 요약

반응형 및 마무리 수정 작업

📝 상세 내용

🐛fix:

  • 프로필 수정 후 저장 시 헤더 사용자 정보 미갱신 오류 수정
  • 마이페이지의 헤더 왼쪽 컨텐츠 짤리는 문제 수정

🎨style:

  • 헤더 반응형 틀 작성
  • 대시보드 수정 페이지 반응형 틀 작성
  • 반응형 최대 너비 적용 및 글자 깨짐 방지
  • 태블릿 사이즈에서 헤더의 사용자 닉네임 안 보이게 적용
  • 마이페이지인 경우 계정관리가 보이도록 수정
  • 공동 사용자 프로필 이미지 겹치도록 수정

🔗 관련 이슈

🖼️ 스크린샷

20250622_080703.mp4

✅ 체크리스트

  • 브랜치 네이밍 컨벤션을 준수했습니다
  • 커밋 컨벤션을 준수했습니다
  • 코드가 프로젝트의 스타일 가이드라인을 준수합니다

💡 참고 사항

Summary by CodeRabbit

  • 신규 기능

    • 마이페이지 경로에서 헤더 제목이 "계정관리"로 표시되고, 해당 경로에서는 크라운 아이콘이 숨겨집니다.
    • 사용자 프로필 수정 시 글로벌 사용자 상태가 자동으로 최신 정보로 갱신됩니다.
    • 인증 훅에서 setUser 함수를 직접 사용할 수 있습니다.
  • 버그 수정

    • 버튼 및 텍스트가 화면 크기에 따라 올바르게 정렬되고, 줄바꿈 및 오버플로우 이슈가 개선되었습니다.
    • 초대 및 멤버 관리, 대시보드 편집 화면의 레이아웃과 반응형 스타일이 개선되었습니다.
  • 스타일

    • 협업자 아바타가 서로 겹치도록 스타일이 변경되었습니다.
    • 헤더, 버튼, 사용자 정보 등 여러 컴포넌트의 레이아웃과 반응형 스타일이 개선되었습니다.
    • 닉네임이 태블릿 화면에서 숨겨지도록 조정되었습니다.

@yuj2n yuj2n added this to the 2차 구현 기간 milestone Jun 21, 2025
@yuj2n yuj2n self-assigned this Jun 21, 2025
@yuj2n yuj2n added 🎨Style UI, 스타일 관련 수정 ♻️Refactor 리팩토링 labels Jun 21, 2025
@coderabbitai
Copy link

coderabbitai bot commented Jun 21, 2025

Walkthrough

레이아웃과 스타일링의 응답성 및 일관성을 개선하는 변경이 다수의 컴포넌트에 적용되었습니다. 일부 컴포넌트에서는 글로벌 상태 관리(Zustand)를 통한 사용자 정보 동기화가 추가되었고, 헤더 및 관련 컴포넌트에서는 경로 기반 조건부 렌더링과 오버플로우 처리 방식이 변경되었습니다.

Changes

파일/그룹 경로 변경 요약
src/app/dashboard/[id]/edit/page.tsx Edit 관련 컨테이너 레이아웃을 고정 폭에서 반응형(max-width, padding 등)으로 변경
src/app/features/dashboard/components/edit/EditInfo.tsx
src/app/features/dashboard/components/edit/EditMember.tsx
EditInfo, EditMember 컨테이너를 고정 크기에서 max-width만 제한하는 유동적 레이아웃으로 변경
src/app/features/dashboard/components/edit/EditInvitation.tsx 불필요한 div 제거, 레이아웃 및 버튼 스타일 개선, PaginationHeader 구조 변경, 초대 취소 버튼 로딩 처리 등 UI 구조 개선
src/app/features/dashboard/components/edit/PaginationHeader.tsx
src/app/features/dashboard/components/edit/DeleteDashboardButton.tsx
whitespace-nowrap 등 flexbox 레이아웃 및 텍스트 줄바꿈 방지 스타일 추가
src/app/features/auth/hooks/useAuth.ts useAuth 훅의 반환 객체에 setUser 함수 추가
src/app/features/mypage/components/ProfileEditForm.tsx 프로필 수정 성공 시 Zustand 글로벌 상태의 user 정보 동기화(setUser) 로직 추가
src/app/mypage/page.tsx Header를 감싸는 div(pl-300) 추가로 레이아웃 패딩 적용
src/app/shared/components/common/UserInfo.tsx 닉네임 span에 tablet:hidden 적용(태블릿에서 닉네임 숨김)
src/app/shared/components/common/header/Collaborator/CollaboratorList.tsx flex gap-4 → flex -space-x-10(아이템 간 간격을 음수로 조정하여 겹치거나 더 가까워짐)
src/app/shared/components/common/header/Header.tsx overflow-x-hidden → overflow-x-auto, 좌측 콘텐츠 large 이상에서만 표시, 우측에 whitespace-nowrap 추가
src/app/shared/components/common/header/LeftHeaderContent.tsx usePathname 도입, /mypage 경로에서 "계정관리" 고정 타이틀, crown 아이콘 조건부 렌더링

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에 최신 정보 반영
Loading

Possibly related PRs

  • CoPlay-FE/coplan#75: Edit 페이지의 레이아웃 및 컴포넌트 구조를 최초로 도입한 PR로, 이번 변경의 스타일 및 구조 개선과 직접적으로 관련됨.

Suggested labels

💄Modify

Suggested reviewers

  • Insung-Jo
  • LeeCh0129

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

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

npm error Exit handler never called!
npm error This is an error with npm itself. Please report this error at:
npm error https://github.com/npm/cli/issues
npm error A complete log of this run can be found in: /.npm/_logs/2025-06-21T23_08_47_482Z-debug-0.log

✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 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.
    • Explain this complex logic.
    • 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. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • 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 src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary 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.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • 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

Documentation and Community

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 9169f13 and fd743f4.

📒 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 훅의 반환 객체에 추가하여 다른 컴포넌트에서 전역 사용자 상태를 업데이트할 수 있도록 하는 것은 좋은 접근입니다. 기존의 updateAuthStatelogout 함수와 일관된 패턴을 유지하고 있습니다.

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 || true
src/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 추가가 적절합니다.

경로별로 다른 헤더 타이틀과 아이콘 표시를 위해 usePathname hook을 추가한 것이 적절합니다.


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-16sm: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: 로딩 및 에러 상태 처리가 명확하게 구성되었습니다.

조건부 렌더링 순서가 논리적으로 정리되어 사용자에게 적절한 피드백을 제공합니다.

@yuj2n yuj2n merged commit 2ebcbfe into develop Jun 22, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

♻️Refactor 리팩토링 🎨Style UI, 스타일 관련 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants