Skip to content

feat: 메모업데이트모달에서도 카테고리 모달을 열수 있도록 수정, 카테고리 모달 위치 수정#141

Merged
nakyeonko3 merged 4 commits intomainfrom
feat/memo-editor-modal
Jun 20, 2025
Merged

feat: 메모업데이트모달에서도 카테고리 모달을 열수 있도록 수정, 카테고리 모달 위치 수정#141
nakyeonko3 merged 4 commits intomainfrom
feat/memo-editor-modal

Conversation

@nakyeonko3
Copy link
Copy Markdown
Collaborator

@nakyeonko3 nakyeonko3 commented Jun 20, 2025

feat: 메모업데이트모달에서도 카테고리 모달을 열수 있도록 수정, 카테고리 모달 위치 수정

Summary by CodeRabbit

  • 신규 기능
    • 메모 수정 인터페이스에 카테고리 선택 모달이 추가되었습니다. 이제 카테고리 입력란 옆의 추가 버튼을 통해 카테고리 모달을 열 수 있습니다.
  • 버그 수정
    • 일부 컴포넌트의 불필요한 임포트 경로가 수정되었습니다.
  • 리팩터
    • 카테고리 모달의 열기/닫기 로직이 개선되어 더 명확하게 동작합니다.
    • 카테고리 모달의 위치와 스타일이 조정되어 UI가 개선되었습니다.
  • 제거
    • 메모 오류 및 로딩 시 표시되던 모달 컴포넌트가 삭제되었습니다.
  • 스타일
    • 로그인 모달 내부에 패딩이 추가되어 콘텐츠 여백이 향상되었습니다.

- src/components/memo-editor/MemoCreateButton.tsx -> src/components/common/MemoCreateButton.tsx
- src/components/memo-editor/MemoEditorSkeleton.tsx -> src/components/common/MemoEditorSkeleton.tsx
- src/components/memo-editor/MemoCreateModal.tsx -> src/components/memo-editor/MemoCreateModal.tsx
- MemoErrorFallbackModal.tsx, MemoLoadingModal.tsx 제거
@vercel
Copy link
Copy Markdown

vercel bot commented Jun 20, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
memoji ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 20, 2025 2:42am

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jun 20, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

이 변경사항은 메모 에디터와 관련된 모달 컴포넌트의 위치, 오픈/클로즈 로직, import 경로를 조정하고, 불필요한 에러/로딩 모달 컴포넌트를 제거합니다. 카테고리 모달의 상태 관리가 개선되었고, 일부 컴포넌트의 import 경로가 공통 디렉터리로 변경되었습니다.

Changes

파일(들) 변경 요약
src/components/layout/MainLayout.tsx MemoCreateButton import 경로를 memo-editor에서 common으로 변경
src/components/memo-editor/MemoCreateModal.tsx MemoEditorSkeleton import 경로 수정, 카테고리 모달 오픈/클로즈 핸들러 분리 및 위치/스타일 조정, AddButton 핸들러 업데이트
src/components/memo-editor/MemoUpdateModal.tsx 카테고리 모달 상태 및 오픈/클로즈 핸들러 추가, AddButton 클릭 시 모달 오픈, 모달 위치 및 import 경로 조정
src/components/memo-editor/MemoErrorFallbackModal.tsx,
src/components/memo-editor/MemoLoadingModal.tsx MemoErrorFallbackModal, MemoLoadingModal 컴포넌트 파일 삭제
src/components/auth/SignInModal.tsx Modal 내부 컨테이너에 패딩(p-6) 추가

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant MemoUpdateModal
    participant CategoryModal

    User->>MemoUpdateModal: AddButton 클릭
    MemoUpdateModal->>MemoUpdateModal: handleOpenCategoryModal() 호출 (isOpenCategoryModal = true)
    MemoUpdateModal-->>CategoryModal: CategoryModal 렌더링
    User->>CategoryModal: 모달 내 동작/카테고리 선택
    User->>CategoryModal: 모달 닫기 요청
    CategoryModal->>MemoUpdateModal: onClose 호출
    MemoUpdateModal->>MemoUpdateModal: handleCloseCategoryModal() 호출 (isOpenCategoryModal = false)
    MemoUpdateModal-->>CategoryModal: CategoryModal 언마운트
Loading

Possibly related PRs

Suggested labels

feature

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-20T02_41_54_441Z-debug-0.log


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 9757638 and 4fb9423.

📒 Files selected for processing (1)
  • src/components/auth/SignInModal.tsx (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

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

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
src/components/memo-editor/MemoCreateModal.tsx (1)

98-108: 카테고리 모달 positioning 검토 필요

모달의 위치가 top-1 left-44로 설정되어 있는데, 다양한 화면 크기에서 적절한 위치에 표시되는지 확인이 필요합니다. 특히 모바일 환경에서의 UX를 고려해주세요.

더 responsive한 positioning을 고려해보세요:

- <div className="absolute top-1 left-44 z-50">
+ <div className="absolute top-full left-0 z-50 mt-1">
src/components/memo-editor/MemoUpdateModal.tsx (1)

156-165: 카테고리 모달 기능 추가 완료, positioning 일관성 확인

메모 업데이트 모달에서도 카테고리 모달을 열 수 있는 기능이 성공적으로 추가되었습니다. MemoCreateModal과 동일한 positioning (top-1 left-44)을 사용하여 일관성을 유지하고 있습니다.

다만 앞서 언급한 것처럼 responsive design 관점에서 positioning 개선을 고려해보세요.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between ec640f8 and 9757638.

📒 Files selected for processing (5)
  • src/components/layout/MainLayout.tsx (1 hunks)
  • src/components/memo-editor/MemoCreateModal.tsx (3 hunks)
  • src/components/memo-editor/MemoErrorFallbackModal.tsx (0 hunks)
  • src/components/memo-editor/MemoLoadingModal.tsx (0 hunks)
  • src/components/memo-editor/MemoUpdateModal.tsx (4 hunks)
💤 Files with no reviewable changes (2)
  • src/components/memo-editor/MemoLoadingModal.tsx
  • src/components/memo-editor/MemoErrorFallbackModal.tsx
🧰 Additional context used
🧬 Code Graph Analysis (1)
src/components/memo-editor/MemoCreateModal.tsx (2)
src/components/common/AddButton.tsx (1)
  • AddButton (10-26)
src/components/category/CategoryModal.tsx (1)
  • CategoryModal (16-369)
🔇 Additional comments (6)
src/components/layout/MainLayout.tsx (1)

2-2: LGTM: import path 리팩토링이 적절합니다

MemoCreateButtoncommon 디렉터리로 이동된 것은 컴포넌트의 재사용성을 높이는 좋은 구조 개선입니다.

src/components/memo-editor/MemoCreateModal.tsx (2)

5-5: LGTM: import path 일관성 개선

MemoEditorSkeletoncommon 디렉터리에서 import하는 것은 다른 컴포넌트들과 일관된 구조입니다.


46-52: LGTM: 핸들러 분리로 코드 가독성 향상

카테고리 모달 열기/닫기 로직을 별도 함수로 분리한 것은 코드 가독성과 유지보수성을 개선합니다. useCallback 사용도 적절합니다.

src/components/memo-editor/MemoUpdateModal.tsx (3)

2-2: LGTM: 필요한 import들이 적절히 추가됨

CategoryModal 기능 추가를 위한 필수 import들과 MemoEditorSkeleton의 path 리팩토링이 잘 적용되었습니다.

Also applies to: 6-6, 14-14


26-26: LGTM: 상태 변수 추가가 적절함

카테고리 모달의 가시성을 관리하기 위한 상태 변수가 명확하게 정의되었습니다.


91-97: LGTM: 일관된 핸들러 패턴 구현

MemoCreateModal과 동일한 패턴으로 카테고리 모달 핸들러들이 구현되어 코드 일관성이 유지됩니다. useCallback 사용도 적절합니다.

@nakyeonko3 nakyeonko3 merged commit 0a3178b into main Jun 20, 2025
2 of 4 checks passed
@nakyeonko3 nakyeonko3 deleted the feat/memo-editor-modal branch June 20, 2025 02:41
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