Skip to content

[refactor] 인터페이스 및 타입 통합 리팩토링#357

Merged
seongwon030 merged 4 commits intodevelop-fefrom
refactor/#356-type-refactoring-FE-98
May 3, 2025
Merged

[refactor] 인터페이스 및 타입 통합 리팩토링#357
seongwon030 merged 4 commits intodevelop-fefrom
refactor/#356-type-refactoring-FE-98

Conversation

@seongwon030
Copy link
Member

@seongwon030 seongwon030 commented Apr 30, 2025

#️⃣연관된 이슈

ex) #356

📝작업 내용

분리된 타입 파일 다시 통합

  • ImageProps 들은 각각 하나의 파일에서만 사용되므로 분리할 필요까지 없어보여 파일내로 이동시켰습니다. a629e24
  • info.ts파일 또한 InfoBox.tsx에서만 사용되기 때문에 분리되어있던 타입을 옮겼습니다.
  • type에서 interface로 변경했습니다. 6388d29

필드 순서 변경

  • 백엔드에서 필드 정의 된 순서로 바꾸었습니다.

중점적으로 리뷰받고 싶은 부분(선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

ex) 메서드 XXX의 이름을 더 잘 짓고 싶은데 혹시 좋은 명칭이 있을까요?

논의하고 싶은 부분(선택)

논의하고 싶은 부분이 있다면 작성해주세요.

🫡 참고사항

Summary by CodeRabbit

Summary by CodeRabbit

  • Refactor

    • 일부 컴포넌트에서 사용하던 타입 정의를 외부 파일에서 내부로 이동하여 관리 방식을 변경했습니다.
    • 불필요해진 타입 정의 파일이 삭제되었습니다.
  • Style

    • 코드 들여쓰기가 일부 수정되어 가독성이 향상되었습니다.

@seongwon030 seongwon030 added 🔨 Refactor 코드 리팩토링 💻 FE Frontend labels Apr 30, 2025
@seongwon030 seongwon030 requested a review from oesnuj April 30, 2025 08:37
@seongwon030 seongwon030 self-assigned this Apr 30, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Apr 30, 2025

"""

Walkthrough

이번 변경에서는 프론트엔드에서 여러 컴포넌트가 공통 타입 정의 파일에서 props 인터페이스를 가져와 사용하던 방식을 제거하고, 각 컴포넌트 파일 내부에 해당 인터페이스를 직접 선언하도록 리팩토링했습니다. 이에 따라 frontend/src/types/club.tsfrontend/src/types/Info.ts 파일에서 관련 타입 및 인터페이스가 삭제되었고, ImagePreview, ImageUpload, InfoBox 컴포넌트 파일에 props 및 데이터 구조 인터페이스가 로컬로 재정의되었습니다. 전체적인 컴포넌트 동작에는 변화가 없으며, 타입 관리 구조만 변경되었습니다.

Changes

파일/경로 요약 변경 요약
frontend/src/pages/AdminPage/components/ImagePreview/ImagePreview.tsx,
frontend/src/pages/AdminPage/components/ImageUpload/ImageUpload.tsx
기존 외부 타입(ImagePreviewProps, ImageUploadProps) import 제거 및 각 파일 내에서 동일한 인터페이스를 직접 선언하도록 변경
frontend/src/pages/ClubDetailPage/components/InfoBox/InfoBox.tsx 외부 타입(InfoList) import 제거, ClubInfoItem, ClubInfoSection, ClubInfoSectionWithRef 등 인터페이스를 로컬 선언 및 사용
frontend/src/types/Info.ts Description, InfoList 타입 전체 삭제
frontend/src/types/club.ts ImageUploadProps, ImagePreviewProps 인터페이스 삭제

Assessment against linked issues

Objective (이슈 번호) Addressed Explanation
전체적인 타입 및 인터페이스 통합 리팩토링 (FE-98)

Possibly related PRs

  • Moadong/moadong#237: 해당 PR은 ImagePreviewPropsImageUploadProps 인터페이스를 공통 타입 파일로 이동시키는 반대 방향의 변경을 포함하고 있어, 타입 위치 변경과 직접적으로 연관됨.
    """

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dcd7906 and 12853e3.

📒 Files selected for processing (1)
  • frontend/src/types/club.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/src/types/club.ts
✨ 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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.

@netlify
Copy link

netlify bot commented Apr 30, 2025

Deploy Preview for moadong ready!

Name Link
🔨 Latest commit 12853e3
🔍 Latest deploy log https://app.netlify.com/sites/moadong/deploys/6811e5bbdc09210008a413f3
😎 Deploy Preview https://deploy-preview-357--moadong.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 41
Accessibility: 87
Best Practices: 92
SEO: 92
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@seongwon030 seongwon030 linked an issue Apr 30, 2025 that may be closed by this pull request
2 tasks
Copy link
Member

@oesnuj oesnuj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저도 타입을 굳이 분리해야 하나 고민했는데, 재사용이 없으니 좋은 방향 같습니다.
리팩토링 고생하셨습니다!

@seongwon030 seongwon030 merged commit 1bc9fd7 into develop-fe May 3, 2025
5 checks passed
@seongwon030 seongwon030 deleted the refactor/#356-type-refactoring-FE-98 branch May 3, 2025 12:16
@coderabbitai coderabbitai bot mentioned this pull request May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💻 FE Frontend 🔨 Refactor 코드 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[refactor] FE-98 인터페이스 및 타입 통합 리팩토링

2 participants