Skip to content

fix: 모달 컴포넌트 디자인 수정(메모생성모달, 메모수정모달 디자인 수정)#140

Merged
nakyeonko3 merged 3 commits intomainfrom
fix/design-modal
Jun 20, 2025
Merged

fix: 모달 컴포넌트 디자인 수정(메모생성모달, 메모수정모달 디자인 수정)#140
nakyeonko3 merged 3 commits intomainfrom
fix/design-modal

Conversation

@nakyeonko3
Copy link
Copy Markdown
Collaborator

@nakyeonko3 nakyeonko3 commented Jun 20, 2025

Summary by CodeRabbit

  • 스타일
    • 모달 및 입력 폼의 레이아웃과 스타일이 개선되어, 더 넓은 최대 너비와 세련된 구분, 정렬된 헤더 및 본문 구조로 변경되었습니다.
    • 입력 필드가 기본 HTML 입력 요소로 교체되어, 더욱 깔끔하고 일관된 디자인을 제공합니다.
    • 버튼 및 아이콘 스타일이 개선되어 시각적으로 더 명확해졌습니다.
    • 마크다운 에디터와 모달의 크기, 패딩, 테두리, 그림자 등 UI 요소의 세부 스타일이 향상되었습니다.

@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:04am

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jun 20, 2025

Walkthrough

이 변경 사항은 여러 모달 및 입력 관련 컴포넌트의 UI 스타일과 레이아웃을 전반적으로 리팩터링합니다. 기존 커스텀 InputField를 네이티브 input으로 대체하고, Tailwind CSS를 활용해 스타일을 일관성 있게 개선했으며, 모달 레이아웃을 flex 기반으로 재구성했습니다. 주요 로직과 컴포넌트 인터페이스는 변경되지 않았습니다.

Changes

파일/경로 그룹 변경 요약
src/components/Modal.tsx 모달 컨테이너의 padding 클래스(p-5) 제거
src/components/common/AddButton.tsx 스타일링 개선: cn 유틸리티로 클래스 결합, 아이콘에 Tailwind 클래스 적용, 기존 size prop 제거
src/components/memo-editor/LexicalMarkdownEditor/LexicalMarkdownEditor.tsx 에디터 컨테이너 크기를 h-full, w-full로 변경, ContentEditable에 하단 라운드 추가
src/components/memo-editor/MemoCreateModal.tsx 모달 최대 너비 확대, flex 레이아웃 적용, InputField → 네이티브 input, 내부 구조 및 스타일 전면 개선
src/components/memo-editor/MemoUpdateModal.tsx InputField → 네이티브 input, flex 레이아웃 적용, 버튼 및 입력 UI 재배치, 스타일 일관화

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant MemoCreateModal
    participant MemoUpdateModal
    participant AddButton
    participant LexicalMarkdownEditor

    User->>MemoCreateModal: 모달 열기
    MemoCreateModal->>User: 네이티브 input(제목, 카테고리) 표시
    MemoCreateModal->>AddButton: 카테고리 추가 버튼 렌더링
    MemoCreateModal->>LexicalMarkdownEditor: 마크다운 에디터 렌더링

    User->>MemoUpdateModal: 모달 열기
    MemoUpdateModal->>User: 네이티브 input(제목, 카테고리) 및 에러/로딩 UI 표시
    MemoUpdateModal->>AddButton: 카테고리 추가 버튼 렌더링
    MemoUpdateModal->>LexicalMarkdownEditor: 마크다운 에디터 렌더링
Loading

Possibly related PRs

  • unanbb/memoji#41: MemoUpdateModal의 업데이트 로직 및 API 연동 추가와 관련 있음.
  • unanbb/memoji#37: AddButton 컴포넌트 및 카테고리 모달 토글 기능 도입과 직접적으로 관련됨.
  • unanbb/memoji#25: Modal 및 MemoCreateModal 컴포넌트 최초 도입 및 확장과 관련됨.

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

✨ 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 (1)
src/components/memo-editor/MemoUpdateModal.tsx (1)

145-147: TODO 주석 처리 필요.

카테고리 선택 기능이 아직 구현되지 않았습니다. 이 기능의 구현 계획이 있는지 확인해주세요.

이 TODO 항목에 대한 구현을 도와드릴 수 있습니다. 새로운 이슈를 생성하시겠습니까?

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 359c126 and fb7fd5d.

📒 Files selected for processing (5)
  • src/components/Modal.tsx (1 hunks)
  • src/components/common/AddButton.tsx (2 hunks)
  • src/components/memo-editor/LexicalMarkdownEditor/LexicalMarkdownEditor.tsx (1 hunks)
  • src/components/memo-editor/MemoCreateModal.tsx (1 hunks)
  • src/components/memo-editor/MemoUpdateModal.tsx (2 hunks)
🧰 Additional context used
🧠 Learnings (2)
src/components/memo-editor/MemoCreateModal.tsx (1)
Learnt from: nakyeonko3
PR: unanbb/memoji#32
File: src/components/memo-editor/MemoCreateModal.tsx:43-46
Timestamp: 2025-06-02T03:29:01.124Z
Learning: memoji 프로젝트의 MemoCreateModal은 조건부 렌더링 패턴을 사용한다. MemoCreateButton이 {isModalOpen && <MemoCreateModal onClose={onClose} />}로 렌더링을 제어하며, 모달이 렌더링될 때는 항상 isOpen={true}로 설정된다. submitMemo 함수에서 onClose()를 먼저 호출하여 모달을 언마운트시킨 후 비동기 메모 생성 작업을 수행하는 것이 정상적인 흐름이다.
src/components/memo-editor/MemoUpdateModal.tsx (1)
Learnt from: nakyeonko3
PR: unanbb/memoji#32
File: src/components/memo-editor/MemoCreateModal.tsx:43-46
Timestamp: 2025-06-02T03:29:01.124Z
Learning: memoji 프로젝트의 MemoCreateModal은 조건부 렌더링 패턴을 사용한다. MemoCreateButton이 {isModalOpen && <MemoCreateModal onClose={onClose} />}로 렌더링을 제어하며, 모달이 렌더링될 때는 항상 isOpen={true}로 설정된다. submitMemo 함수에서 onClose()를 먼저 호출하여 모달을 언마운트시킨 후 비동기 메모 생성 작업을 수행하는 것이 정상적인 흐름이다.
🧬 Code Graph Analysis (2)
src/components/memo-editor/LexicalMarkdownEditor/LexicalMarkdownEditor.tsx (1)
src/components/memo-editor/LexicalMarkdownEditor/plugins/ToolbarPlugin.tsx (1)
  • ToolbarPlugin (285-559)
src/components/common/AddButton.tsx (1)
src/utils/cn.ts (1)
  • cn (4-6)
🔇 Additional comments (18)
src/components/common/AddButton.tsx (3)

1-1: cn 유틸리티 함수 도입이 좋습니다.

코드의 일관성과 클래스 병합을 위해 cn 유틸리티 함수를 사용하는 것이 좋은 접근입니다.


13-16: 클래스 병합 로직 개선이 우수합니다.

기본 스타일과 전달받은 classNamecn 함수로 병합하여 스타일 충돌을 방지하고 Tailwind CSS 클래스를 올바르게 처리합니다.


23-23: 아이콘 스타일링 개선이 효과적입니다.

고정 크기 prop 대신 명시적인 width/height 클래스를 사용하고 hover 효과를 추가한 것이 더 직관적이고 인터랙티브합니다.

src/components/Modal.tsx (1)

54-54: 패딩 제거가 레이아웃 유연성을 향상시킵니다.

모달 컨테이너에서 고정 패딩을 제거하고 각 모달 컨텐츠에서 자체적으로 패딩을 처리하도록 하는 것이 더 유연한 레이아웃을 가능하게 합니다.

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

104-104: 컨테이너 크기 조정이 유연성을 개선합니다.

고정 높이 퍼센트에서 h-full w-full로 변경하여 에디터가 부모 컨테이너의 크기에 완전히 맞춰지도록 한 것이 더 유연한 레이아웃을 제공합니다.


111-111: 둥근 모서리 추가로 시각적 일관성 향상.

rounded-b-lg 클래스를 추가하여 에디터 하단에 둥근 모서리를 적용한 것이 전체적인 모달 디자인과 일관성을 유지합니다.

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

95-95: 모달 컨테이너 스타일링 개선이 우수합니다.

flex 레이아웃과 일관된 스타일링(둥근 모서리, 그림자, 테두리)을 적용하여 모던하고 일관성 있는 디자인을 구현했습니다.


98-111: 오류 상태 UI 개선이 좋습니다.

오류 메시지의 가독성을 높이고 버튼 스타일링을 개선하여 사용자 경험을 향상시켰습니다.


116-119: 헤더 레이아웃 구조화가 효과적입니다.

절대 위치 지정 대신 flex 컨테이너를 사용하여 삭제 및 닫기 버튼을 배치한 것이 더 예측 가능하고 유지보수하기 쉬운 레이아웃을 제공합니다.


122-129: 네이티브 입력 필드로의 전환이 우수합니다.

커스텀 InputField를 네이티브 HTML input으로 교체하고 Tailwind CSS로 스타일링한 것이 더 직관적이고 성능상 이점이 있습니다. 제목 입력의 스타일링도 적절합니다.


130-153: 카테고리 입력 디자인이 직관적입니다.

"#" 접두사와 임베디드 AddButton을 포함한 카테고리 입력 디자인이 사용자에게 명확한 시각적 피드백을 제공합니다.


155-162: 에디터 컨테이너 레이아웃 최적화.

flex-grow를 사용하여 에디터가 사용 가능한 공간을 최대한 활용하도록 하고, autoFocus를 비활성화한 것이 적절합니다.

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

61-61: 모달 스타일링이 MemoUpdateModal과 일관성 있게 적용되었습니다.

두 모달 컴포넌트 간의 일관된 디자인 언어를 유지하여 사용자 경험의 일관성을 보장합니다.


66-69: 레이아웃 구조 개선이 효과적입니다.

flex 기반 레이아웃으로 헤더와 메인 컨텐츠 영역을 명확히 분리한 것이 더 나은 구조를 제공합니다.


72-79: 제목 입력 필드 스타일링이 우수합니다.

네이티브 input을 사용하면서도 적절한 스타일링(대형 폰트, 하단 보더, 포커스 효과)을 적용하여 시각적으로 매력적이고 기능적입니다.


80-97: 카테고리 입력 디자인이 일관성 있게 구현되었습니다.

MemoUpdateModal과 동일한 카테고리 입력 패턴("#" 접두사, 임베디드 AddButton)을 사용하여 일관성을 유지합니다.


98-102: 카테고리 모달 위치 조정이 적절합니다.

모달의 새로운 레이아웃에 맞춰 카테고리 모달의 위치를 조정한 것이 적절합니다.


104-111: 에디터 컨테이너 구성이 최적화되었습니다.

flex-grow를 사용하여 에디터가 사용 가능한 공간을 최대한 활용하도록 하고, placeholder 텍스트도 개선되었습니다.

@nakyeonko3 nakyeonko3 merged commit ec640f8 into main Jun 20, 2025
4 checks passed
@nakyeonko3 nakyeonko3 deleted the fix/design-modal branch June 20, 2025 02:15
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