Hide map select controls for unmapped places#116
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughPlaceCard.astro now conditionally renders the "Show on guide map" button only when a place has valid coordinates. A ChangesMap Coordinate Conditional Rendering
🎯 2 (Simple) | ⏱️ ~10 minutes
🚥 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)
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 |
There was a problem hiding this comment.
Pull request overview
This PR updates the PlaceCard UI to hide the “show on guide map” (map select) control for places that don’t have map coordinates, aligning the card behavior with GuideMap’s existing mappable-place filter.
Changes:
- Add a
hasMapCoordinatesguard (place.lat !== null && place.lng !== null) to conditionally render the place-card map select button. - Add a frontend regression assertion to ensure the conditional render remains in place.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/frontend/guideMapInteractions.test.mjs | Adds an assertion that PlaceCard includes the hasMapCoordinates check and conditional rendering for the map select control. |
| src/components/PlaceCard.astro | Introduces hasMapCoordinates and wraps the “show on guide map” button with a conditional render so it only appears for mappable places. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
latandlngGuideMapbefore it builds map markersTest plan
bun run checkbun run test:frontendbun run buildSummary by CodeRabbit