[S15P11A705-307] Home 지도 배경 레이어 재구성, SVG 마커 asset 적용, 줌·이동 범위 제한 - #98
Merged
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
관련 이슈
S15P11A705-307
작업 내용
Home 화면 지도 영역을 카드형 컨테이너에서 페이지 전체를 채우는 배경 레이어로 재구성하고, 마커를 SVG asset으로 교체한 뒤 지도 줌·이동 범위를 제한했다.
레이아웃 · 배경 지도
HomeMapSection의 카드 스타일(라운드·테두리·그림자·고정 높이)을 제거하고,HomePage를 배경(지도)/오버레이/컨텐츠(히어로+검색 결과) 3개 레이어로 분리. 컨텐츠 레이어만PAGE_CONTAINER_CLASS폭을 유지하고 지도는 사이드바를 제외한 영역을 풀블리드로 채운다.dragged,handleResearch)·bbox 재조회 로직(refetchWithBbox)을 제거.마커
src/assets/color-markers/의 SVG asset 20색을<img>로 렌더링(CustomOverlay). asset 20개가 모두 같은<filter id="shadow">를 써서 인라인으로 심으면 문서 전체에서 id가 충돌하기 때문에<img>로 독립 렌더한다.getRecordMarkerAsset(collectionId)가hashPaletteIndex로 01~19번을 배정하고,collectionId가null인 Record는 20번 slate 고정(미분류). slate를 해시 팔레트에서 빼 미분류가 특정 Collection과 겹치지 않게 했다. 기존getRecordMarkerColor.ts는 삭제.yAnchor를1이 아니라 핀 끝 비율(68.32/76)로 지정 — asset 하단 여백은 내장 그림자 자리라1이면 핀 끝이 좌표보다 약 8px 위에 찍힌다.지도 줌 · 이동 범위 제한
kakao.maps.Map생성 옵션maxLevel: 13으로 최대 축소를 SDK에 직접 맡겼다 — 줌 버튼·휠·트랙패드 핀치·setLevel·setBounds어느 경로든 예외 없이 적용된다.dragend·zoom_changed를 구독해 지도 중심이KOREA_PAN_BOUNDS(위도 3339, 경도 124132)를 벗어나면panTo로 가장 가까운 경계로 되돌린다. 마라도·독도·백령도가 모두 범위 안이다.fitBounds가 잡는 중심(전체 bounds의 한가운데)은 기록이 하나도 없는 지역일 수 있고, 평균은 멀리 떨어진 한 건에 끌려간다.브랜드 컬러 · 히어로 오버레이
tailwind.config.js에snow-white: #FDFDFD토큰 추가. xl 사이드바 배경을 본문(paper-white)보다 한 단계 흰 톤으로 구분.snow-white, 아이콘/텍스트를pin-navy, hover를log-mint로 통일. 비활성 상태는opacity대신cursor-not-allowed와 색상 알파(bg-pin-navy/90)로 표현해 브랜드 색이 흐려지지 않게 했다.mask-image(알파 그라데이션)로 구현.backdrop-filter는 요소 영역 안에서만 적용되고 경계에서 끊기므로, 고정 높이로 끝나는 레이어를 쓰면 tint가 투명해진 지점에도 "흐린 지도 / 선명한 지도"가 맞닿는 가로줄이 남는다. 마스크가 요소의 합성 결과 전체에 적용돼 블러와 흰 tint가 같은 곡선으로 사라진다.버그 수정
position:absolute; z-index:1~2인 내부 레이어를 7개 만드는데, 컨테이너가 stacking context가 아니라 그 z-index가 문서 최상위로 새어 나가z-index:auto인 형제 요소를 전부 덮고 있었다. 컨테이너에isolate를 줘 SDK 내부 z-index를 가뒀다.img { max-width: 100%; height: auto }가 폭 0인CustomOverlay래퍼 안에서 0으로 계산됐다.max-width: none+ 인라인 px 크기로 고정.mapRef.current가드로 차단.API 계약
GET /records/map응답에collectionId(number, nullable) 필드가 추가됨을docs/api-contract.md에 반영(백엔드 배포 시점 대비 프론트 스키마는 optional로 받음).변경 유형
확인 방법
npm run dev로/(Home) 접속. (지도 SDK 키는http://localhost:5173만 등록돼 있어 다른 포트로 뜨면domain mismatched로 거부된다.)체크리스트
member.id(내부 사용자 ID)를 URL·요청·응답에 사용하지 않았다 (진입점은 Collection id)label만 사용하고code를 노출하지 않았다 — 이 PR은 Keyword를 다루지 않는다contextId로 쿼리 키·URL·선택 상태를 교체했다 — 이 PR은 Context를 수정하지 않는다keywords: []등 빈 결과를 오류로 처리하지 않았고 로딩·오류·401 상태를 처리했다 (items: []는 "저장된 기록이 없습니다" 안내로 처리, 401 재요청 루프 방지를 위해retry: false)docs/conventions.md(용어·any·컴포넌트 직접 API 호출 금지)를 지켰다 (any없음, 컴포넌트는useRecordMapMarkersQuery만 호출)lint/tsc -b/vitest(12 files, 70 tests) 모두 통과. 줌·이동 제한과 마커 색상 매핑은 Playwright로 실제 브라우저에서 확인했고, 순수 로직은recordMapViewportLimits.test.ts로 고정했다.