[Phase 4] frontend zoom rendering - #60
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughAdds a new ChangesViewport-Mode-Aware Map Marker Rendering
Sequence Diagram(s)sequenceDiagram
participant User
participant MapExplorer
participant mapStore
participant mapViewport as mapViewport.js
User->>MapExplorer: pan/zoom map
MapExplorer->>mapStore: fetch viewport items
mapStore->>mapStore: filter properties via isPropertyItem(item)
mapStore-->>MapExplorer: viewportItems, filteredProperties
MapExplorer->>MapExplorer: compute visibleMapItems (mode-based)
loop each item in visibleMapItems
MapExplorer->>mapViewport: viewportMarkerKind(item)
mapViewport-->>MapExplorer: kind
MapExplorer->>mapViewport: viewportMarkerLabel(item, {formatWons, transactionLabel})
mapViewport-->>MapExplorer: {eyebrow, title, value}
MapExplorer->>MapExplorer: build HTML via regionMarkerContent / clusterMarkerContent / propertyMarkerContent
end
User->>MapExplorer: click marker
alt property marker
MapExplorer->>mapStore: selectProperty(id)
else region / cluster marker
MapExplorer->>MapExplorer: pan and zoom map
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
🚥 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/views/MapExplorer.vue (1)
384-443: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚖️ Poor tradeoffOptional: extract the shared marker-HTML scaffold.
regionMarkerContent,clusterMarkerContent, andpropertyMarkerContentrepeat near-identical inline-style button/pointer markup with only colors, dimensions, and label slots differing. A small builder (style config + label slots) would reduce duplication and keep marker styling consistent as it evolves.🤖 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/views/MapExplorer.vue` around lines 384 - 443, The marker content builders are duplicating the same button/pointer HTML scaffold across regionMarkerContent, clusterMarkerContent, and propertyMarkerContent. Extract the shared marker markup into a small reusable builder or helper that accepts a style/config object and label slots, then update these functions to call it with their specific dimensions, colors, and text fields so the styling stays consistent and easier to maintain.
🤖 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/views/MapExplorer.vue`:
- Around line 384-443: The marker content builders are duplicating the same
button/pointer HTML scaffold across regionMarkerContent, clusterMarkerContent,
and propertyMarkerContent. Extract the shared marker markup into a small
reusable builder or helper that accepts a style/config object and label slots,
then update these functions to call it with their specific dimensions, colors,
and text fields so the styling stays consistent and easier to maintain.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 3a6dee96-1da0-41a3-be28-fa3ecd9e6107
📒 Files selected for processing (7)
frontend/package.jsonfrontend/src/store/mapStore.jsfrontend/src/utils/mapViewport.jsfrontend/src/utils/mapViewport.test.mjsfrontend/src/views/MapExplorer.vuephases/map-viewport-zoom/phase4-frontend-zoom-rendering.mdphases/map-viewport-zoom/phase4.status.json
Changes
Linked Issue
closes #59
Tests
Summary by CodeRabbit