Skip to content

bug: 카테고리 수정을 동시에 여러개 할 수 있던 오류 수정 및 수정/생성 중 하나만 가능하도록 변경#139

Merged
unanbb merged 2 commits intomainfrom
bug/only1-category-138
Jun 20, 2025
Merged

bug: 카테고리 수정을 동시에 여러개 할 수 있던 오류 수정 및 수정/생성 중 하나만 가능하도록 변경#139
unanbb merged 2 commits intomainfrom
bug/only1-category-138

Conversation

@unanbb
Copy link
Copy Markdown
Owner

@unanbb unanbb commented Jun 19, 2025

📋 작업 세부 사항

카테고리 수정 시,
선택된 창만 isEditing = true,
나머지는 isEditing = false, 기존 값 유지 되도록 수정

카테고리 생성/수정 모드가 서로 상호 배타적으로 동작하도록 수정(동시에 일어나지 않음)

  • 생성모드 on -> 수정모드 off
  • 수정모드 on -> 생성모드 off

🔧 변경 사항 요약

  • 카테고리 수정을 동시에 여러개 할 수 있던 오류 수정
  • 수정 input에 placeholder 속성을 추가하여 기존 값을 확인할 수 있도록 수정
  • categoryStates의 isEditing이 종료될 때 isCreating(false)로 설정
  • isCreating이 종료될 때, categoryStates의 isEditing을 전부 false로 설정

Summary by CodeRabbit

  • 개선 사항
    • 카테고리 편집 시 한 번에 하나의 카테고리만 수정할 수 있도록 동작이 개선되었습니다.
    • 편집 입력란에 현재 카테고리 이름이 플레이스홀더로 표시됩니다.
    • 카테고리 편집 모드 전환 시 입력값과 오류 메시지가 초기화됩니다.

@unanbb unanbb self-assigned this Jun 19, 2025
@unanbb unanbb added the bug Something isn't working label Jun 19, 2025
@vercel
Copy link
Copy Markdown

vercel bot commented Jun 19, 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 0:29am

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jun 19, 2025

"""

Walkthrough

이 변경은 CategoryModal 컴포넌트에서 카테고리 편집 및 생성 모드 상태 관리를 개선합니다. 편집 모드 진입 시 선택한 카테고리만 편집 가능하도록 하고, 나머지는 편집 모드를 해제하며 상태와 에러를 초기화합니다. 생성 모드와 편집 모드가 상호 배타적으로 동작하도록 수정되었으며, 입력란에 현재 카테고리 이름을 placeholder로 표시합니다.

Changes

파일/경로 변경 요약
src/components/category/CategoryModal.tsx 카테고리 편집 및 생성 모드 상태 관리 개선, 단일 카테고리 편집 모드 토글, 생성 모드와 편집 모드 상호 배타적 처리, 입력란 placeholder 추가, 코드 정리

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CategoryModal

    User->>CategoryModal: 생성 모드 토글 클릭 (handlePlusClick)
    CategoryModal->>CategoryModal: 모든 카테고리 편집 상태 false로 초기화
    CategoryModal->>CategoryModal: 생성 모드 상태 토글

    User->>CategoryModal: 편집 버튼 클릭 (handleModifyClick)
    CategoryModal->>CategoryModal: 생성 모드 false로 설정
    CategoryModal->>CategoryModal: 모든 카테고리 편집 상태 false, 에러 및 입력값 초기화
    CategoryModal->>CategoryModal: 선택한 카테고리만 편집 상태 true로 설정
    User->>CategoryModal: 입력 및 저장/취소
    CategoryModal->>CategoryModal: 상태 반영 및 편집 모드 종료
Loading

Possibly related issues

Possibly related PRs

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-20T00_29_46_250Z-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 0dd9bcf and 05f20d6.

📒 Files selected for processing (1)
  • src/components/category/CategoryModal.tsx (5 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/components/category/CategoryModal.tsx
✨ 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.

@unanbb unanbb changed the title bug: 카테고리 수정을 동시에 여러개 할 수 있던 오류 수정 bug: 카테고리 수정을 동시에 여러개 할 수 있던 오류 수정 및 수정/생성 중 하나만 가능하도록 변경 Jun 20, 2025
@unanbb unanbb merged commit 359c126 into main Jun 20, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] 카테고리 수정을 동시에 여러개 할 수 있던 오류 수정

1 participant