Repository navigation
[Feat/#94] 검색 화면 구현 - #95
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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. Comment |
github-actions
Bot
requested review from
leegain1,
sangrae2325,
tnals0924 and
xeoxxn
October 3, 2026 15:25
Collaborator
|
구현 화면 사진도 같이 올려주세요~ |
Collaborator
Author
|
네 수정했습니다~ |
jjunh33
force-pushed
the
feat/#94-search-view
branch
from
October 8, 2026 05:32
7a2baa6 to
745dd80
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#️⃣연관된 이슈
🎯 해결하려는 문제가 무엇인가요?
검색 화면이 없어서 홈·행사·공지·열린피드백·빌릴게 헤더의 검색 아이콘이 동작하지 않습니다. Figma 검색 프레임(진입 / 검색 중 / 검색 완료 / 결과 없음)과 화면설계서(FLW_HOM_001)를 기준으로 검색 화면을 구현합니다.
❓ 왜 해결해야 하나요?
검색 아이콘이 이미 각 헤더에 노출되어 있는데 눌러도 아무 일도 일어나지 않습니다. 사용자가 행사·공지·피드백·빌릴게·아카이빙을 한곳에서 찾을 수 있어야 합니다.
⭐ 어떻게 해결했나요?
/search라우트와SearchScreen을 추가했습니다. 진입(최근 검색어) → 응답 대기(스켈레톤) → 결과 / 결과 없음 흐름입니다.결과는
전체 / 행사 / 공지 / 열린피드백 / 빌릴게 / 아카이빙탭으로 보여주고, 탭명에 결과 수를 붙입니다. 전체 탭은 카테고리별 2개까지만 보여주고n개 더보기로 해당 탭으로 이동합니다.홈 검색은 전체 탭부터, 행사·공지·열린피드백·빌릴게 헤더의 검색은 해당 탭부터 시작합니다 (
/search?tab=).최근 검색어는 localStorage(
stream:search:recent, 최대 10개)에 저장하고, 개별 삭제와 전체 삭제를 지원합니다.카드는 기존 것을 재사용했습니다. 설계서 4번에서 UI가 달라지는 두 가지만 바꿨습니다: 아카이빙(
SearchArchivingCard신규), 빌릴게(BililgeItemCard의bordered옵션).용어 사전에
검색 ↔ search를 추가했고,wds-component-usage.md에 검색 화면에서 확정한 WDS 매핑을 기록했습니다.데이터는 main의 로딩 구조(
entities/<도메인>API +mockupApi+use()/Suspense)를 따릅니다.entities/search/searchApi.ts의fetchSearchResults(keyword)를SearchResultContent가use()로 읽고, 응답 대기는Suspense가SearchResultSkeleton으로 받습니다.커밋 구성: 문서 → 아카이빙 목데이터 → 빌릴게 카드
bordered→ 검색 화면 → 헤더 아이콘 연결 → 데이터 로딩 구조 전환(main 리베이스 후 추가)2026-10-04.12.21.55.mov
🧩 이 PR의 한계 & 트레이드오프
fetchSearchResults()가mockupApi로 기존 목데이터를 제목류 필드(행사·공지title, 피드백question, 빌릴게name, 아카이빙title)로 대소문자 무시 부분 일치 필터링해 돌려줍니다. 개발 서버에서는mockupApi의 500ms 지연으로 스켈레톤을 볼 수 있고, 배포 빌드에서는 바로 응답합니다. 본문은 목데이터가 전부 같은 글이라 검색 대상에서 뺐습니다.useRecentSearches훅(저장·조회·개별 삭제·전체 삭제)은 그때 API 호출로 교체됩니다. 훅의 반환 형태는 유지하므로 화면 쪽 변경은 크지 않을 것으로 봅니다.fetchSearchResults안쪽만 요청 코드로 교체하면 됩니다(화면은 이 함수로만 데이터를 받습니다). 다만search라는 용어와 응답 형태(/api/search, 카테고리별 전체 개수 제공 여부)는 백엔드와 맞춰야 합니다. 지금은 배열 길이를 탭 숫자로 쓰므로 서버가 페이지네이션하면 숫자가 틀어집니다.SearchField는 배경·패딩·지움 버튼 노출 조건이 Figma와 달라 쓰지 않고 로컬 컴포넌트로 만들었습니다 (근거는wds-component-usage.md).entities로 옮겨지지 않아searchApi가features/feedbacks/constants의 목데이터를 직접 읽습니다.⛓️ 기존 기능에 미치는 영향
onClick만 추가했습니다(행사·공지·빌릴게는 main의 Suspense 리팩터링 위에 다시 적용).entities/archives/(types + mock)로 두었습니다.BililgeItemCard에 선택 propbordered를 추가했습니다. 기본값은 기존 동작과 같습니다./search라우트는hasBottomNav: false입니다.🔀 Edge Case & 실패 시나리오
mockupApi가 Promise를 재사용해서 스켈레톤 없이 바로 결과가 나옵니다.replace).📋 검토한 대안과 선택 이유
SearchField사용: 스펙 차이(배경색, 패딩, 지움 버튼 노출 조건)가 있고 내부 오버라이드는 컨벤션상 금지라 로컬 컴포넌트로 구현했습니다.ScreenLayout헤더 슬롯에 입력창 배치: 위 IME 문제로 제외했습니다.💬 리뷰 포인트
[c]빌릴게 검색 결과의 "대여 신청"은 대여 바텀시트가 빌릴게 화면 안의 상태라/bililge로 이동만 합니다. 검색에서 바로 바텀시트를 열어야 하는지 확인이 필요합니다.[c]검색어를 고치면 결과가 사라지고 최근 검색어로 돌아가는 동작이 설계서 의도와 맞는지 봐주세요.[a]최근 검색어 최대 10개는 설계서에 명시가 없어 임의로 정했습니다.[a]empty 화면의 세로 위치는 Figma 프레임 높이 기준으로 맞췄고, WebView 높이에 따라 약 7px 차이가 날 수 있습니다.