fix(map): 지도 매물 표시와 확대 이동 보정 - #67
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughAdds a ChangesMap bounds validation, display title, and viewport focus hardening
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
frontend/src/utils/mapViewport.js (1)
44-47: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueOptional: token-scoped replacement instead of global
replaceAll.
replaceAll(type, label)substitutes the enum token anywhere in the title for every known key. For the current backend enum keys this is safe, but a building/title string that happens to embed an English token (e.g.VILLA) would be silently translated. If you want to harden this against future free-text titles, consider replacing only a recognized standalone token rather than any substring.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@frontend/src/utils/mapViewport.js` around lines 44 - 47, The current token translation in mapViewport uses replaceAll inside the PROPERTY_TYPE_LABELS reduction, which can replace enum text embedded in free-form titles as well. Update the translation logic around translatedType to only replace recognized standalone property-type tokens, rather than any substring match, so incidental words inside rawTitle are preserved.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@frontend/src/utils/mapViewport.js`:
- Around line 44-47: The current token translation in mapViewport uses
replaceAll inside the PROPERTY_TYPE_LABELS reduction, which can replace enum
text embedded in free-form titles as well. Update the translation logic around
translatedType to only replace recognized standalone property-type tokens,
rather than any substring match, so incidental words inside rawTitle are
preserved.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 89274c8a-b6b3-4f67-afd7-e2d2092bbaaf
📒 Files selected for processing (5)
frontend/src/store/mapStore.jsfrontend/src/store/mapStore.test.mjsfrontend/src/utils/mapViewport.jsfrontend/src/utils/mapViewport.test.mjsfrontend/src/views/MapExplorer.vue
변경 내용
MULTI_FAMILY를다세대주택으로 치환하고, 끝의매물단어를 제거했습니다.확대해서 보기동작이 선택 좌표를 지도 정중앙에 고정하도록 보정했습니다.연결 이슈
closes #66
테스트
npm testnpm run build./mvnw.cmd test리뷰 포인트
setZoom/setCenter순서로 선택 좌표가 중앙에 고정되는지 확인 부탁드립니다.매물suffix가 남지 않는지 확인 부탁드립니다.Summary by CodeRabbit
New Features
Bug Fixes