Repository navigation
fix: [TA-264] 필터 변경이 뒤로가기 히스토리에 쌓여 목록 이탈이 어려움 - #136
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- 마운트 시 URL 쿼리를 filters로 lazy 복원해 공유/새로고침/뒤로가기 시 필터 유지 - 배열 필터(regions/photographyTypes)는 split로 배열 round-trip - 직전 쿼리와 동일하면 setSearchParams 스킵해 불필요한 재조회 방지
seorinn
marked this pull request as ready for review
June 29, 2026 08:10
seorinn
added a commit
that referenced
this pull request
Sep 20, 2026
* fix: [TA-264] 필터 변경을 replace로 처리해 뒤로가기 히스토리 누적 방지 * fix: [TA-264] URL→filters 복원 및 동일쿼리 재조회 방지(replace) - 마운트 시 URL 쿼리를 filters로 lazy 복원해 공유/새로고침/뒤로가기 시 필터 유지 - 배열 필터(regions/photographyTypes)는 split로 배열 round-trip - 직전 쿼리와 동일하면 setSearchParams 스킵해 불필요한 재조회 방지
This branch was successfully deployed
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.
변경 사항
FilterBar의 URL 동기화를setSearchParams(params, { replace: true })로 변경 → 필터 변경이 히스토리에 쌓이지 않음filters로 복원(lazy init) → 공유 링크/새로고침/뒤로가기 복귀 시 적용돼 있던 필터 유지regions/photographyTypes)는 콤마 split로 배열 복원하여 직렬화와 round-tripsetSearchParams호출을 건너뛰어 결과값이 바뀌지 않는 조작에서 불필요한 재조회 방지SetURLSearchParams로 정정(replace 옵션 허용)배경
필터/정렬 변경이 기본 push로 호출돼 히스토리가 쌓이면서, 여러 번 필터를 바꾼 뒤 뒤로가기를 누르면 이전 화면으로 못 나가고 필터 이력을 되감았음. 필터는 '화면 내 상태'이므로 replace가 자연스러움. 추가로 같은 값 재선택 시 중복 로딩/재조회가 발생하던 점도 함께 정리.
적용 범위
FilterBar 단일 지점 → 이벤트목록/작가목록/검색(작가·이벤트) 4개 화면 전부 반영
테스트
FilterBar/index.test.tsx신규(4): 기존 URL 필터 마운트 시 비덮어쓰기 / 변경 시 replace+값 반영 / 같은 정렬 재선택 시 재조회 미발생(dedup) / 배열 필터 round-trip리뷰
Opus 코드리뷰 3라운드: C1(마운트 덮어쓰기)·C-A(배열 역직렬화) 해소 확인, 머지 가능 판정. 잔여 백로그(콤마 포함 명칭 시 split 취약, 칩 activation/selectedLocs URL 미복원)는 별도 스코프.
Closes TA-264