Skip to content

Conversation

@enunsnv
Copy link
Contributor

@enunsnv enunsnv commented Jan 24, 2026

관련 이슈

작업 내용

수정 전 수정 후
수정 전 - 로딩 스피너 중복 노출 수정 후 - 단일 로딩 스피너 노출

로딩 스피너를 불러오는 곳이 2가지(게시물 조회 시 isLoading, 전역 스피너의 isFetching)라 다음과 이와 같은 문제가 발생한 것으로 확인했습니다. 따라서 로딩 시, 1개의 로딩 스피너만 불러올 수 있도록 수정하였습니다.

기존 쿼리에 meta data 를 추가하여 수정하였으며, 추후에 다른 쿼리 및 페이지에서도 동일한 문제가 발생했을 경우, 같은 방식으로 해당 쿼리에 같은 meta data 만 추가한다면 문제를 해결할 수 있을 것이라 생각합니다!

특이 사항

리뷰 요구사항 (선택)

추후 다른 페이지에서도 동일한 문제가 발견되거나 새로운 페이지를 추가했을 경우 같은 문제가 생길 수도 있는 것을 감안하여 전역 스피너 관련 코드(index.tsx) 의 수정을 최소화하는 방안을 택하였습니다. 필요할 때마다 전역 스피너에 queryKey를 import하여 코드를 추가하게 된다면 코드가 지저분해질 것 같아서 이와 같은 방법을 택하였는데, 혹시 더 나은 방법이 있다면 알려주시면 감사하겠습니다! 피드백 부탁드리겠습니다☺️!

@vercel
Copy link

vercel bot commented Jan 24, 2026

@enunsnv is attempting to deploy a commit to the manNomi's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link

coderabbitai bot commented Jan 24, 2026

Walkthrough

이 변경사항은 전역 로딩 스피너의 가시성을 선택적으로 제어하는 기능을 추가합니다. 먼저 getPostDetail 쿼리에 meta 옵션을 추가하여 해당 쿼리에 대한 전역 스피너 표시를 명시적으로 비활성화하고, 동시에 ClientModal 컴포넌트의 useIsFetching() 훅을 predicate 기반으로 수정하여 meta.showGlobalSpinner 플래그를 확인하도록 변경합니다. 이를 통해 쿼리별로 전역 스피너 표시 여부를 세밀하게 관리할 수 있게 됩니다.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • wibaek
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 제목이 PR의 주요 변경 사항을 명확하게 설명하고 있으며, 커뮤니티 게시물 조회 시 전역 스피너 비활성화라는 핵심 수정 내용을 잘 나타냄.
Linked Issues check ✅ Passed PR의 코드 변경이 이슈 #374의 요구사항을 충족하고 있으며, 중복 로딩 스피너 제거라는 목표를 meta 데이터 기반 해결책으로 구현함.
Out of Scope Changes check ✅ Passed 모든 변경 사항이 이슈 #374의 해결을 위해 직접적으로 필요한 범위 내에 있으며, 전역 스피너 중복 현상 제거에만 집중함.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed PR 설명은 필수 템플릿 섹션을 모두 포함하고 있으며, 작업 내용을 이미지와 함께 명확히 설명하고 있습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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

Comment @coderabbitai help to get the list of available commands and usage tips.

const isFetching = useIsFetching();
const isFetching = useIsFetching({
predicate: (query) => query.meta?.showGlobalSpinner !== false,
});
Copy link
Contributor

Choose a reason for hiding this comment

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

오 너무 좋아요
앞으로도 이걸로 전역 스피너 불필요시 안쓰면 되겠네요
LGTM~~!

@enunsnv enunsnv merged commit 654da96 into solid-connection:main Jan 24, 2026
3 of 4 checks passed
@enunsnv enunsnv deleted the fix/spinner-overlap branch January 30, 2026 09:07
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.

로딩 스피너 중복 현상

2 participants