feat(import): selective GPX/KML element import and performance improvements

Add type-selector UI in the file import modal letting users choose which
GPX elements (waypoints, routes, tracks) or KML/KMZ elements (points,
paths) to import. KML LineString placemarks are now imported as path
places with route_geometry.

Performance improvements:
- Extract MemoPlaceRow with React.memo and contentVisibility:auto to cut
  unnecessary re-renders in PlacesSidebar
- Add weatherQueue to cap concurrent weather fetches at 3
- Replace sequential per-place deletes with a single bulkDelete API call
  (new DELETE /places/bulk endpoint + deletePlacesMany service)
- Memoize atlas/photo/weather service calls to avoid redundant requests
- Add multi-select mode to PlacesSidebar for bulk operations

Add large GPX/KML/KMZ fixtures for integration/perf testing and two
profiler analysis scripts under scripts/.
This commit is contained in:
jubnl
2026-04-18 01:28:37 +02:00
parent 9a31fcac7b
commit 6a718fccea
45 changed files with 22471 additions and 285 deletions
+18
View File
@@ -10,6 +10,9 @@ const en: Record<string, string | { name: string; category: string }[]> = {
'common.add': 'Add',
'common.loading': 'Loading...',
'common.import': 'Import',
'common.select': 'Select',
'common.selectAll': 'Select all',
'common.deselectAll': 'Deselect all',
'common.error': 'Error',
'common.unknownError': 'Unknown error',
'common.tooManyAttempts': 'Too many attempts. Please try again later.',
@@ -937,6 +940,8 @@ const en: Record<string, string | { name: string; category: string }[]> = {
'trip.toast.reservationAdded': 'Reservation added',
'trip.toast.deleted': 'Deleted',
'trip.confirm.deletePlace': 'Are you sure you want to delete this place?',
'trip.confirm.deletePlaces': 'Delete {count} places?',
'trip.toast.placesDeleted': '{count} places deleted',
// Day Plan Sidebar
'dayplan.emptyDay': 'No places planned for this day',
@@ -981,6 +986,17 @@ const en: Record<string, string | { name: string; category: string }[]> = {
'places.importFileError': 'Import failed',
'places.importAllSkipped': 'All places were already in the trip.',
'places.gpxImported': '{count} places imported from GPX',
'places.gpxImportTypes': 'What do you want to import?',
'places.gpxImportWaypoints': 'Waypoints',
'places.gpxImportRoutes': 'Routes',
'places.gpxImportTracks': 'Tracks (with path geometry)',
'places.gpxImportNoneSelected': 'Select at least one type to import.',
'places.kmlImportTypes': 'What do you want to import?',
'places.kmlImportPoints': 'Points (Placemarks)',
'places.kmlImportPaths': 'Paths (LineStrings)',
'places.kmlImportNoneSelected': 'Select at least one type to import.',
'places.selectionCount': '{count} selected',
'places.deleteSelected': 'Delete selected',
'places.kmlKmzImported': '{count} places imported from KMZ/KML',
'places.urlResolved': 'Place imported from URL',
'places.importList': 'List Import',
@@ -997,6 +1013,7 @@ const en: Record<string, string | { name: string; category: string }[]> = {
'places.assignToDay': 'Add to which day?',
'places.all': 'All',
'places.unplanned': 'Unplanned',
'places.filterTracks': 'Tracks',
'places.search': 'Search places...',
'places.allCategories': 'All Categories',
'places.categoriesSelected': 'categories',
@@ -1772,6 +1789,7 @@ const en: Record<string, string | { name: string; category: string }[]> = {
'undo.reorder': 'Places reordered',
'undo.optimize': 'Route optimized',
'undo.deletePlace': 'Place deleted',
'undo.deletePlaces': 'Places deleted',
'undo.moveDay': 'Place moved to another day',
'undo.lock': 'Place lock toggled',
'undo.importGpx': 'GPX import',