feat(map): per-trip booking-route visibility with account default and bulk toggle

Lets a user see a booking's route on the map without manually
toggling it per item, two ways:

- The account setting from the previous commit sets the default for
  any trip that's never had its routes touched before.
- A new bulk "show all / hide all" button in the day-plan toolbar
  flips a trip explicitly between the two connectionsVisibility modes,
  independent of the per-item toggle (which still edits whichever
  mode's id list is active, in both directions, including while the
  account default is on).

useTripPlanner.ts resolves a trip's effective visible-connection ids
from connectionsVisibility.ts + the account setting + the trip's
routable reservations, and exposes it through the same
visibleConnections/toggleConnection contract MapView, MapViewGL and
DayPlanSidebar already had, plus allConnectionsShown/
toggleAllConnections for the new bulk control. MapView/MapViewGL
consume it via the shared reservationRoutes util instead of each
carrying their own copy of the filter.

The bulk toggle's tooltip gets its own map.showAllConnections/
hideAllConnections i18n keys (all 22 locales) distinct from the
per-item toggle's text, and matches the per-item toggle's active
(solid blue) styling rather than the toolbar's generic hover tint.

Manually verified end-to-end in a running dev server: the account
default seeding an untouched trip, the bulk toggle flipping a trip
between all-shown/all-hidden, and a single per-leg override while the
trip is in all-shown mode.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Dieter Blomme
2026-07-07 14:26:35 +02:00
committed by Maurice
parent 4c13b4e40f
commit fcc9c24fe4
30 changed files with 211 additions and 29 deletions
+2
View File
@@ -13,5 +13,7 @@ const map: TranslationStrings = {
'poi.cat.museums': 'متاحف وثقافة',
'poi.cat.nature': 'طبيعة وحدائق',
'poi.cat.activities': 'أنشطة',
'map.showAllConnections': 'إظهار جميع مسارات الحجوزات',
'map.hideAllConnections': 'إخفاء جميع مسارات الحجوزات',
};
export default map;
+2
View File
@@ -13,5 +13,7 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Museus e cultura',
'poi.cat.nature': 'Natureza e parques',
'poi.cat.activities': 'Atividades',
'map.showAllConnections': 'Mostrar todas as rotas de reservas',
'map.hideAllConnections': 'Ocultar todas as rotas de reservas',
};
export default map;
+2
View File
@@ -13,5 +13,7 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Muzea a kultura',
'poi.cat.nature': 'Příroda a parky',
'poi.cat.activities': 'Aktivity',
'map.showAllConnections': 'Zobrazit všechny trasy rezervací',
'map.hideAllConnections': 'Skrýt všechny trasy rezervací',
};
export default map;
+2
View File
@@ -13,5 +13,7 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Museen & Kultur',
'poi.cat.nature': 'Natur & Parks',
'poi.cat.activities': 'Aktivitäten',
'map.showAllConnections': 'Alle Buchungsrouten anzeigen',
'map.hideAllConnections': 'Alle Buchungsrouten ausblenden',
};
export default map;
+2
View File
@@ -13,5 +13,7 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Museums & culture',
'poi.cat.nature': 'Nature & parks',
'poi.cat.activities': 'Activities',
'map.showAllConnections': 'Show all booking routes',
'map.hideAllConnections': 'Hide all booking routes',
};
export default map;
+2
View File
@@ -13,5 +13,7 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Museos y cultura',
'poi.cat.nature': 'Naturaleza y parques',
'poi.cat.activities': 'Actividades',
'map.showAllConnections': 'Mostrar todas las rutas de reservas',
'map.hideAllConnections': 'Ocultar todas las rutas de reservas',
};
export default map;
+2
View File
@@ -13,5 +13,7 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Musées & culture',
'poi.cat.nature': 'Nature & parcs',
'poi.cat.activities': 'Activités',
'map.showAllConnections': 'Afficher tous les itinéraires',
'map.hideAllConnections': 'Masquer tous les itinéraires',
};
export default map;
+2
View File
@@ -13,5 +13,7 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Μουσεία & πολιτισμός',
'poi.cat.nature': 'Φύση & πάρκα',
'poi.cat.activities': 'Δραστηριότητες',
'map.showAllConnections': 'Εμφάνιση όλων των διαδρομών κρατήσεων',
'map.hideAllConnections': 'Απόκρυψη όλων των διαδρομών κρατήσεων',
};
export default map;
+2
View File
@@ -13,5 +13,7 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Múzeumok és kultúra',
'poi.cat.nature': 'Természet és parkok',
'poi.cat.activities': 'Programok',
'map.showAllConnections': 'Összes foglalási útvonal megjelenítése',
'map.hideAllConnections': 'Összes foglalási útvonal elrejtése',
};
export default map;
+2
View File
@@ -13,5 +13,7 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Museum & budaya',
'poi.cat.nature': 'Alam & taman',
'poi.cat.activities': 'Aktivitas',
'map.showAllConnections': 'Tampilkan semua rute pemesanan',
'map.hideAllConnections': 'Sembunyikan semua rute pemesanan',
};
export default map;
+2
View File
@@ -13,5 +13,7 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Musei e cultura',
'poi.cat.nature': 'Natura e parchi',
'poi.cat.activities': 'Attività',
'map.showAllConnections': 'Mostra tutti i percorsi prenotati',
'map.hideAllConnections': 'Nascondi tutti i percorsi prenotati',
};
export default map;
+2
View File
@@ -13,5 +13,7 @@ const map: TranslationStrings = {
'poi.cat.museums': '美術館・文化施設',
'poi.cat.nature': '自然・公園',
'poi.cat.activities': 'アクティビティ',
'map.showAllConnections': 'すべての予約ルートを表示',
'map.hideAllConnections': 'すべての予約ルートを非表示',
};
export default map;
+2
View File
@@ -13,5 +13,7 @@ const map: TranslationStrings = {
'poi.cat.museums': '박물관 & 문화',
'poi.cat.nature': '자연 & 공원',
'poi.cat.activities': '액티비티',
'map.showAllConnections': '모든 예약 경로 표시',
'map.hideAllConnections': '모든 예약 경로 숨기기',
};
export default map;
+2
View File
@@ -13,5 +13,7 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Musea & cultuur',
'poi.cat.nature': 'Natuur & parken',
'poi.cat.activities': 'Activiteiten',
'map.showAllConnections': 'Alle boekingsroutes tonen',
'map.hideAllConnections': 'Alle boekingsroutes verbergen',
};
export default map;
+2
View File
@@ -13,5 +13,7 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Muzea i kultura',
'poi.cat.nature': 'Przyroda i parki',
'poi.cat.activities': 'Aktywności',
'map.showAllConnections': 'Pokaż wszystkie trasy rezerwacji',
'map.hideAllConnections': 'Ukryj wszystkie trasy rezerwacji',
};
export default map;
+2
View File
@@ -13,5 +13,7 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Музеи и культура',
'poi.cat.nature': 'Природа и парки',
'poi.cat.activities': 'Развлечения',
'map.showAllConnections': 'Показать все маршруты бронирований',
'map.hideAllConnections': 'Скрыть все маршруты бронирований',
};
export default map;
+2
View File
@@ -13,5 +13,7 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Museer och kultur',
'poi.cat.nature': 'Natur och parker',
'poi.cat.activities': 'Aktiviteter',
'map.showAllConnections': 'Visa alla bokningsvägar',
'map.hideAllConnections': 'Dölj alla bokningsvägar',
};
export default map;
+2
View File
@@ -13,5 +13,7 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Müzeler ve kültür',
'poi.cat.nature': 'Doğa ve parklar',
'poi.cat.activities': 'Aktiviteler',
'map.showAllConnections': 'Tüm rezervasyon rotalarını göster',
'map.hideAllConnections': 'Tüm rezervasyon rotalarını gizle',
};
export default map;
+2
View File
@@ -13,5 +13,7 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Музеї та культура',
'poi.cat.nature': 'Природа та парки',
'poi.cat.activities': 'Активності',
'map.showAllConnections': 'Показати всі маршрути бронювань',
'map.hideAllConnections': 'Приховати всі маршрути бронювань',
};
export default map;
+2
View File
@@ -13,5 +13,7 @@ const map: TranslationStrings = {
'poi.cat.museums': 'Bảo tàng & văn hóa',
'poi.cat.nature': 'Thiên nhiên & công viên',
'poi.cat.activities': 'Các hoạt động',
'map.showAllConnections': 'Hiển thị tất cả lộ trình đặt chỗ',
'map.hideAllConnections': 'Ẩn tất cả lộ trình đặt chỗ',
};
export default map;
+2
View File
@@ -13,5 +13,7 @@ const map: TranslationStrings = {
'poi.cat.museums': '博物館與文化',
'poi.cat.nature': '自然與公園',
'poi.cat.activities': '活動',
'map.showAllConnections': '顯示所有預訂路線',
'map.hideAllConnections': '隱藏所有預訂路線',
};
export default map;
+2
View File
@@ -13,5 +13,7 @@ const map: TranslationStrings = {
'poi.cat.museums': '博物馆与文化',
'poi.cat.nature': '自然与公园',
'poi.cat.activities': '活动',
'map.showAllConnections': '显示所有预订路线',
'map.hideAllConnections': '隐藏所有预订路线',
};
export default map;