You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: unify attribution into manifest dataSources and remove per-item attribution objects
Replace inline attribution objects on DataSourceDetail, SharedMobilityStation, SharedMobilityVehicle, and weather responses with a sourceId-based lookup system that resolves attribution from integration manifest dataSources at render time. This eliminates hardcoded attribution objects scattered across providers and consolidates all licensing/attribution metadata into the single source of truth established by the dataSources manifest schema.
Core type changes:
- DataSourceDetail: replace `source: string` with `sources: string[]`, remove `attribution` field
- DataSourceMeta: remove `id`, `name`, `attribution`, `categoryChipLabel` (now sourced from manifest)
- DataSourceProvider.getDetail() now returns `DataSourceDetail | null` instead of synthetic fallback objects
- DataSourceFilterDef: add `clientSide?: boolean` flag for filters applied locally instead of sent to API
- DataSourceDetailSection: add `image` and `embed` section types with imageUrl/embedUrl/embedType fields, add `videocam` and `warning` section icons
- SharedMobilityStation/Vehicle: replace `source: string` + `attribution` with `sources: string[]`
- IntegrationDataSource: add required `sourceId` field to all ~90 manifest dataSources entries
- WeatherResponse: remove inline `attribution` object, use `source` field for registry lookup
Attribution rendering:
- Add `buildSourceAttribution()` and `extractSourcePrefix()` utilities to packages/core
- DataSourceSections: new AttributionFooter component resolves attribution from integration registry by matching source prefixes against manifest dataSources
- DataSourceLayer: build map attribution from visible result sources via registry lookup, recreate MapLibre source when attribution HTML changes
- PlaceWeather/WeatherWidget: resolve weather attribution from integration registry instead of inline object
- PhotoAttribution/PlacePhotoGallery: resolve photo source names and URLs from registry instead of hardcoded PHOTO_SOURCES map
- DataSourceFilterContent/DataSourceLayer: replace duplicated CLIENT_SIDE_FILTER_IDS set with shared `splitFilters()` and `applyClientSideFilters()` utilities using the new `clientSide` filter flag
Data source orchestrator:
- listWithFilters() now derives id, name, categoryChipLabel from integration manifest instead of provider meta
- data-source detail endpoint returns 404 when provider returns null instead of serving empty fallback
Provider cleanup (bike-sharing, car-sharing, ev-charging, fuel, scooter-sharing, parking):
- Remove all inline attribution objects from station/vehicle/result construction
- Remove fallback detail objects on cache miss (return null)
- Remove server-side speed filter from ev-charging (now client-side only)
- merge-stations: merge source arrays instead of attribution objects, remove mergeAttributions import
SSRF protection:
- Consolidate three duplicate URL validation implementations (gtfs/importer.ts, validate-url.ts, store.ts) into shared `validatePublicUrl()` from @openmapx/core
- Delete apps/api/src/utils/validate-url.ts
- Add validatePublicUrl() call to catalog source fetching
Parking integration expansion:
- Add 12 new parking data sources to manifest: RDW Netherlands, BNLS France, Ghent, Brussels, Basel, Florence, Barcelona, Vienna, Copenhagen, Singapore, Madrid, UTMC Newcastle, NSW Australia
- Add corresponding health checks, env vars (UTMC_USERNAME/PASSWORD, NSW_TRANSPORT_API_KEY, WINDY_WEBCAMS_API_KEY), and i18n strings
- Add new source headers for webcam sources (windy, osm-webcam, caltrans, tfl)
Opening hours:
- Handle unknown/unparseable opening hours gracefully (isUnknown flag) in PlaceOverviewTab and CategoryResultsContent instead of showing misleading open/closed status
Other fixes:
- PlaceDetailContent: use `bgcolor: "background.paper"` for sticky tabs instead of `inherit`
- CyclingBaseLayer: fix OSM attribution link text
- Overlay attribution text corrections (hiking, winter-sports)
0 commit comments