Replace blocky region graphic with clean world map base and interactive anchors#173
Replace blocky region graphic with clean world map base and interactive anchors#173
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 210154c67d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return ( | ||
| <div className={["region-world-map", className].filter(Boolean).join(" ")}> | ||
| <img src={worldMapCleanAsset} alt="World map" className="region-world-map__asset" draggable={false} /> | ||
| <svg viewBox="0 0 100 100" className="region-world-map__overlay" aria-hidden="true"> |
There was a problem hiding this comment.
Use a map-matching viewBox for the overlay
The interactive overlay is rendered with viewBox="0 0 100 100", but the base map asset is a wide 1000x460 canvas; with SVG’s default preserveAspectRatio="xMidYMid meet", the overlay content is fit into a centered square region rather than the full map area. This causes the region anchor dots/hit targets to be positioned incorrectly relative to the continents in normal dashboard layouts. Match the overlay viewBox to the map aspect ratio (or explicitly set preserveAspectRatio behavior) so click targets align with the map.
Useful? React with 👍 / 👎.
Motivation
Description
dashboard/src/assets/world-map-clean.svgcontaining a muted continent silhouette.RegionWorldMapReact component atdashboard/src/components/RegionWorldMap.tsxwhich renders the static asset and places interactive SVG region dots on top; the component supportsselectedRegion,highlightedRegion,onRegionSelect, andshowLocalAnchorprops.us-east-1,us-west-2,eu-west-1,eu-central-1,ap-southeast-1, andlocal(local/unassigned).dashboard/src/styles/region-world-map.cssthat provide muted map treatment and dashboard-accented dots for both Light and Altius/Dark themes.Testing
Codex Task