Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/catalog-realm/components/map-render.gts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export class MapRender extends GlimmerComponent<MapRenderSignature> {
margin: 0;
width: 100%;
height: 100%;
min-height: 300px;
aspect-ratio: 16/9;
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting both height: 100% and aspect-ratio: 16/9 on the same element can lead to conflicting layout behavior. If the parent container has a defined height, height: 100% will take precedence and the aspect-ratio will be ignored. If the parent doesn't have a defined height, the aspect-ratio will control the height based on width. This could lead to inconsistent sizing behavior depending on the parent container. Consider removing one of these properties or documenting the intended layout behavior more clearly.

Suggested change
aspect-ratio: 16/9;

Copilot uses AI. Check for mistakes.
position: relative;
display: flex;
align-items: center;
Expand Down Expand Up @@ -198,7 +198,9 @@ class LeafletLayerState implements LeafletLayerStateInterface {
const color =
i === 0 ? '#22c55e' : i === coords.length - 1 ? '#ef4444' : '#3b82f6';
const marker = createMarker(c, color);
if (c.address) marker.bindPopup(c.address);
const popupContent =
c.address?.trim() || `${c.lat.toFixed(6)}, ${c.lng.toFixed(6)}`;
Comment on lines +201 to +202
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fallback for popup content uses c.address?.trim() which returns an empty string for whitespace-only addresses. Empty strings are falsy, so the logic correctly falls back to coordinates. However, for better clarity and to handle edge cases explicitly, consider using c.address?.trim() || undefined to make the intent clearer.

Suggested change
const popupContent =
c.address?.trim() || `${c.lat.toFixed(6)}, ${c.lng.toFixed(6)}`;
const trimmedAddress = c.address?.trim() || undefined;
const popupContent =
trimmedAddress ?? `${c.lat.toFixed(6)}, ${c.lng.toFixed(6)}`;

Copilot uses AI. Check for mistakes.
marker.bindPopup(popupContent);
return marker;
});
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"data": {
"meta": {
"adoptsFrom": {
"name": "GeoPointFieldSpec",
"module": "../geo-point-spec"
}
},
"type": "card",
"attributes": {
"ref": {
"name": "default",
"module": "../../fields/geo-point"
},
"basic": {
"lat": 35.713552518550046,
"lon": 139.78250909596682
},
"readMe": null,
"cardInfo": {
"name": null,
"notes": null,
"summary": null,
"cardThumbnailURL": null
},
"combined": {
"lat": 3.1686073220230058,
"lon": 101.53343932757683
},
"specType": "field",
"cardTitle": "Geo Point Field",
"mapPicker": {
"lat": 40.75080629178881,
"lon": -74.03073135763408
},
"cardDescription": "Configurable GeoPointField spec used by the playground.",
"containedExamples": [],
"withQuickLocations": {
"lat": 48.8534951,
"lon": 2.3483915
},
"mapPickerWithAddons": {
"lat": 40.7127281,
"lon": -74.0060152
},
"withCurrentLocation": {
"lat": 3.1685946003187757,
"lon": 101.53342388429286
},
"mapPickerWithQuickLocations": {
"lat": 48.8534951,
"lon": 2.3483915
},
"mapPickerWithCurrentLocation": {
"lat": 3.168046434513096,
"lon": 101.53263743966819
}
},
"relationships": {
"cardInfo.theme": {
"links": {
"self": null
}
},
"linkedExamples": {
"links": {
"self": null
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"data": {
"meta": {
"adoptsFrom": {
"name": "GeoSearchPointFieldSpec",
"module": "../geo-search-point-spec"
}
},
"type": "card",
"attributes": {
"ref": {
"name": "default",
"module": "../../fields/geo-search-point"
},
"basic": {
"lat": 3.1336269,
"lon": 101.6299203,
"searchKey": "Glo damansara"
},
"readMe": null,
"cardInfo": {
"name": null,
"notes": null,
"summary": null,
"cardThumbnailURL": null
},
"combined": {
"lat": 3.1516964,
"lon": 101.6942371,
"searchKey": "Kuala Lumpur, 50100, Malaysia"
},
"specType": "field",
"cardTitle": "Geo Search Point Field",
"withTopResults": {
"lat": 3.1414907,
"lon": 101.7182597,
"searchKey": "Tun Razak Exchange (TRX), Pudu, Kuala Lumpur, 55188, Malaysia"
},
"cardDescription": "Spec card that renders GeoSearchPointField examples.",
"containedExamples": [],
"withoutRecentSearches": {
"lat": 48.8534951,
"lon": 2.3483915,
"searchKey": "Paris, Ile-de-France, Metropolitan France, France"
}
},
"relationships": {
"cardInfo.theme": {
"links": {
"self": null
}
},
"linkedExamples": {
"links": {
"self": null
}
}
}
}
}
Loading