Skip to content

[feature] 동아리 검색 결과가 없을 시 안내 문구 추가#495

Merged
oesnuj merged 2 commits intodevelop-fefrom
feature/#494-no-club-search-message-MOA-36
Jun 5, 2025
Merged

[feature] 동아리 검색 결과가 없을 시 안내 문구 추가#495
oesnuj merged 2 commits intodevelop-fefrom
feature/#494-no-club-search-message-MOA-36

Conversation

@oesnuj
Copy link
Member

@oesnuj oesnuj commented Jun 5, 2025

#️⃣연관된 이슈

#494

📝작업 내용

이번 PR에서 작업한 내용을 간략히 설명해주세요(이미지/동영상 첨부 가능)

1. 검색 기능 UX 개선

image

  • 검색 중 로딩 상태에 Spinner 컴포넌트 표시 추가
  • 검색 결과가 없을 경우 사용자 친화적인 안내 메시지 표시
  • 반응형 디자인을 적용하여 모바일 환경에서도 적절한 메시지 크기 조정

참고사항

  • isEmptyisLoading 상태를 추가

Summary by CodeRabbit

  • 신규 기능

    • 클럽 목록이 비어 있을 때 사용자에게 안내 메시지가 표시됩니다.
    • 데이터 로딩 중에 스피너가 표시되어 진행 상황을 확인할 수 있습니다.
  • 스타일

    • 빈 결과 메시지에 대한 새로운 스타일이 추가되어 다양한 화면 크기에서 가독성이 향상되었습니다.

oesnuj added 2 commits June 5, 2025 12:08
1. 검색 결과가 없을 때 사용자에게 표시할 메시지의 스타일을 정의
2. 반응형 디자인을 적용하여 작은 화면에서 글자 크기를 조정하도록 설정
1. 로딩 중일 때 Spinner를 표시하도록 구현
2. 검색 결과가 없을 경우 사용자에게 안내 메시지를 표시하도록 처리
3. 코드 가독성을 위해 관련 로직을 리팩토링하여 isEmpty 및 isLoading 상태 추가
@oesnuj oesnuj requested review from Copilot and seongwon030 June 5, 2025 03:17
@oesnuj oesnuj self-assigned this Jun 5, 2025
@oesnuj oesnuj added ✨ Feature 기능 개발 💻 FE Frontend labels Jun 5, 2025
@netlify
Copy link

netlify bot commented Jun 5, 2025

Deploy Preview for moadong ready!

Name Link
🔨 Latest commit a40161b
🔍 Latest deploy log https://app.netlify.com/projects/moadong/deploys/68410c42f9be880008d003e5
😎 Deploy Preview https://deploy-preview-495--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: 40
Accessibility: 89
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 project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 5, 2025

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Validation error: Invalid regex pattern for base branch. Received: "**" at "reviews.auto_review.base_branches[0]"
⚙️ Configuration instructions
  • 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

Walkthrough

MainPage 컴포넌트에 동아리 목록이 비어 있을 때 안내 문구를 표시하는 로직이 추가되었습니다. 로딩 중에는 스피너를, 데이터가 없을 때는 새로 추가된 EmptyResult 스타일 컴포넌트를 이용해 안내 메시지를 보여줍니다. 기존 코드에는 영향이 없습니다.

Changes

파일/경로 변경 요약
frontend/src/pages/MainPage/MainPage.styles.ts EmptyResult 스타일 컴포넌트 신규 추가
frontend/src/pages/MainPage/MainPage.tsx 로딩 및 빈 결과 안내 메시지 렌더링 로직 추가, Spinner 컴포넌트 사용

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant MainPage
    participant useGetCardList
    participant Spinner
    participant EmptyResult

    User->>MainPage: 페이지 진입
    MainPage->>useGetCardList: 동아리 목록 요청
    useGetCardList-->>MainPage: { data, isLoading }
    alt isLoading
        MainPage->>Spinner: 로딩 표시
    else data.length === 0
        MainPage->>EmptyResult: "검색 결과가 없습니다." 안내 표시
    else data.length > 0
        MainPage->>MainPage: 동아리 리스트 렌더링
    end
Loading

Assessment against linked issues

Objective Addressed Explanation
동아리 검색 결과가 없을 시 안내 문구 추가 (MOA-36)

Possibly related PRs

  • Moadong/moadong#391: Spinner 컴포넌트의 접근성 및 height prop 추가로, MainPage에서 Spinner를 사용하는 로직과 직접적으로 연관됨.

📜 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 9ec8768 and a40161b.

📒 Files selected for processing (2)
  • frontend/src/pages/MainPage/MainPage.styles.ts (1 hunks)
  • frontend/src/pages/MainPage/MainPage.tsx (3 hunks)
🔇 Additional comments (4)
frontend/src/pages/MainPage/MainPage.styles.ts (1)

52-63: 빈 결과 스타일 컴포넌트가 잘 구현되었습니다.

새로 추가된 EmptyResult 스타일 컴포넌트는 사용자 경험을 고려한 좋은 디자인을 가지고 있습니다. 적절한 여백, 중앙 정렬, 그리고 모바일 반응형 디자인이 잘 적용되었습니다.

frontend/src/pages/MainPage/MainPage.tsx (3)

14-14: Spinner 컴포넌트 import가 적절합니다.

로딩 상태를 표시하기 위한 Spinner 컴포넌트 import가 올바르게 추가되었습니다.


27-32: 상태 관리 로직이 잘 구현되었습니다.

useGetCardList 훅에서 isLoading을 추가로 구조 분해하고, isEmpty 상태를 계산하는 로직이 정확합니다. 로딩 중이 아니면서 동시에 데이터가 없거나 빈 배열일 때를 올바르게 감지합니다.


57-67: 삼항 조건 렌더링이 사용자 경험을 향상시킵니다.

로딩 상태, 빈 결과 상태, 데이터 표시 상태를 명확하게 구분하여 렌더링하는 로직이 우수합니다. 사용자에게 현재 상태를 명확히 전달하고, 빈 결과에 대한 친근한 안내 메시지가 좋습니다.

✨ 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

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the search results page by adding a UX improvement for when no club matches are found.

  • Added a Spinner component for loading state feedback
  • Displayed a friendly empty result message when no clubs are found
  • Introduced responsive styling for the empty result message

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
frontend/src/pages/MainPage/MainPage.tsx Updated to handle loading state and show user-friendly messages when no clubs are returned
frontend/src/pages/MainPage/MainPage.styles.ts Added styling for the empty result message
Comments suppressed due to low confidence (1)

frontend/src/pages/MainPage/MainPage.tsx:27

  • Consider adding a UI element to display an error message when 'error' is not null, so that users are informed of any issues during the data fetching process.
const { data: clubs, error, isLoading, } = useGetCardList(keyword, recruitmentStatus, division, selectedCategory);

@codecov
Copy link

codecov bot commented Jun 5, 2025

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
frontend/src/pages/MainPage/MainPage.tsx 0.00% 5 Missing ⚠️
frontend/src/pages/MainPage/MainPage.styles.ts 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@oesnuj oesnuj requested a review from PororoAndFriends June 5, 2025 09:20
Copy link
Collaborator

@PororoAndFriends PororoAndFriends left a comment

Choose a reason for hiding this comment

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

고생하셨습니다

@oesnuj oesnuj merged commit 8ecc61a into develop-fe Jun 5, 2025
8 of 9 checks passed
@oesnuj oesnuj deleted the feature/#494-no-club-search-message-MOA-36 branch July 28, 2025 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💻 FE Frontend ✨ Feature 기능 개발

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments