Skip to content

Commit 0176db1

Browse files
committed
Map: open the place card instantly on a list/search pick; rename "Busiest airports"
- A list/search pick used to wait for the camera to finish easing before showing the place card. Open it immediately — anchored to the marker's coordinates, it rides along as the map eases beneath it — so it feels instant, like a marker tap. - Trips: "Busiest airports" → "Your most-visited airports" (clearer; en/fr/ko).
1 parent d896506 commit 0176db1

4 files changed

Lines changed: 11 additions & 16 deletions

File tree

‎apps/postcards/src/features/map/MapView.tsx‎

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1887,17 +1887,12 @@ export function MapView({
18871887
offset: focus.popup ? [0, cardSeatOffsetY(map)] : [0, 0],
18881888
duration: dur,
18891889
});
1890-
// A list tap on a not-visited city opens its preview card — same popup as
1891-
// tapping the dot, above the marker — once the marker has eased to centre so
1892-
// there's room for it on screen.
1890+
// Open the card IMMEDIATELY (anchored to the place's coordinates) and let the
1891+
// map ease beneath it — the popup stays pinned to the marker and rides along
1892+
// with the move. Tapping a list row shows the card at once, exactly like
1893+
// tapping the dot, instead of waiting for the camera to finish settling.
18931894
const pop = focus.popup;
1894-
if (pop) {
1895-
const open = () => {
1896-
if (map && loadedRef.current) openPlacePopup(map, [focus.lon, focus.lat], pop, pop.showImage);
1897-
};
1898-
if (dur === 0) open();
1899-
else setTimeout(open, dur + 40);
1900-
}
1895+
if (pop && loadedRef.current) openPlacePopup(map, [focus.lon, focus.lat], pop, pop.showImage);
19011896
// eslint-disable-next-line react-hooks/exhaustive-deps
19021897
}, [focus?.key]);
19031898

‎apps/postcards/src/lib/i18n/en.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,8 @@ export const en = {
367367
"travel.allMonths": "All months",
368368
"travel.totalsForAria": "Travel totals for {period}",
369369
"travel.totalsAria": "Travel totals",
370-
"travel.airports.title": "Busiest airports",
371-
"travel.airports.aria": "Busiest airports, most visits first",
370+
"travel.airports.title": "Your most-visited airports",
371+
"travel.airports.aria": "Your most-visited airports, most visits first",
372372
"travel.airports.count_one": "{count} visit",
373373
"travel.airports.count_other": "{count} visits",
374374
"travel.airports.focusAria": "Show {name} on the map",

‎apps/postcards/src/lib/i18n/fr.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,8 @@ export const fr: Messages = {
362362
"travel.allMonths": "Tous les mois",
363363
"travel.totalsForAria": "Totaux des trajets pour {period}",
364364
"travel.totalsAria": "Totaux des trajets",
365-
"travel.airports.title": "Aéroports les plus fréquentés",
366-
"travel.airports.aria": "Aéroports les plus fréquentés, du plus visité au moins visité",
365+
"travel.airports.title": "Vos aéroports les plus visités",
366+
"travel.airports.aria": "Vos aéroports les plus visités, du plus visité au moins visité",
367367
"travel.airports.count_one": "{count} visite",
368368
"travel.airports.count_other": "{count} visites",
369369
"travel.airports.focusAria": "Afficher {name} sur la carte",

‎apps/postcards/src/lib/i18n/ko.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,8 @@ export const ko: Messages = {
361361
"travel.allMonths": "모든 월",
362362
"travel.totalsForAria": "{period} 이동 합계",
363363
"travel.totalsAria": "이동 합계",
364-
"travel.airports.title": "가장 많이 방문한 공항",
365-
"travel.airports.aria": "가장 많이 방문한 공항 순",
364+
"travel.airports.title": "내가 가장 많이 방문한 공항",
365+
"travel.airports.aria": "내가 가장 많이 방문한 공항, 방문 많은 순",
366366
"travel.airports.count_one": "{count}회 방문",
367367
"travel.airports.count_other": "{count}회 방문",
368368
"travel.airports.focusAria": "{name} 지도에서 보기",

0 commit comments

Comments
 (0)