fix: localize primary map delivery status
GeoIntel CI / docs-smoke (push) Canceled after 0s
GeoIntel CI / contract-smoke (push) Canceled after 0s

This commit is contained in:
Codex
2026-07-14 23:18:22 +02:00
parent b50b250f72
commit d528677e03
4 changed files with 10 additions and 8 deletions
+1
View File
@@ -18,6 +18,7 @@
- Added a provenance-gated full-Area query path for official pre-clipped datasets, avoiding redundant intersection of every feature against the same detailed municipal/regional boundary while preserving exact rectangle selection behavior.
- Reduced a live complete-Kempen population/forest analysis from roughly 92 seconds to 2.8 seconds of API work while retaining the exact official totals.
- Grouped dated population and forest snapshots into one current source plus an optional historical disclosure, translated remaining user-facing status/download/model-evaluation text and made municipality selection explicitly optional.
- Replaced the last primary-map `features`/`PostGIS` delivery message with a plain Dutch zoom instruction and user-facing object counts.
- Added focused scope filtering, command construction, boundary resolution, multi-NIS provenance, full-Area correctness, temporal-language and frontend-label tests; the full readiness gate now passes with 571 tests.
## Sprint 193 End-user regional workbench simplification (2026-07-14)
@@ -44,5 +44,5 @@ def test_map_reports_viewport_and_does_not_refit_each_slice() -> None:
assert "map.on('moveend', emitViewport)" in geo_map
assert "fitDataOnChange" in geo_map
assert "onViewportChange" in geo_map
assert "Zoom in to level" in (ROOT / "frontend" / "src" / "hooks" / "useViewportVectorLayer.ts").read_text(encoding="utf-8")
assert "Zoom verder in" in (ROOT / "frontend" / "src" / "hooks" / "useViewportVectorLayer.ts").read_text(encoding="utf-8")
assert "viewport-vector-status" in workspace
+1 -1
View File
@@ -668,7 +668,7 @@ function App(): JSX.Element {
const areaContextLabel = selectedArea?.name ?? (areas.length > 0 ? 'Kies een gebied' : 'Geen gebied')
const datasetContextLabel = selectedDataset ? getDatasetDisplayName(selectedDataset) : datasets.length > 0 ? 'Kies een bron' : 'Geen bron'
const layerContextLabel = mapFeatureCollection
? `${mapFeatureCount} features`
? `${mapFeatureCount.toLocaleString('nl-BE')} objecten`
: viewportVectorLayerActive
? 'Kaartlaag gekozen'
: 'Geen actieve laag'
+7 -6
View File
@@ -6,6 +6,7 @@ import {
VECTOR_VIEWPORT_MIN_ZOOM,
} from '../config/vectorDelivery'
import { formatError } from '../lib/formatError'
import { getDatasetDisplayName } from '../lib/datasetDisplay'
import { datasetsApi } from '../services/api/datasets'
import type { DatasetCreateResponse, MapViewportState } from '../types'
@@ -38,7 +39,7 @@ export function useViewportVectorLayer({
)
const zoom = viewport?.zoom ?? null
const zoomRequired = enabled && (zoom === null || zoom < VECTOR_VIEWPORT_MIN_ZOOM)
const layerLabel = selectedDataset?.reference_layer_name?.trim() || 'features'
const layerLabel = selectedDataset ? getDatasetDisplayName(selectedDataset) : 'de kaartlaag'
useEffect(() => {
requestSequence.current += 1
@@ -86,7 +87,7 @@ export function useViewportVectorLayer({
setData(null)
setLoadedFeatureCount(0)
setTruncated(false)
setError(formatError(requestError, 'Unable to load visible vector features'))
setError(formatError(requestError, 'De zichtbare kaartobjecten konden niet worden geladen'))
} finally {
if (requestSequence.current === sequence) {
setLoading(false)
@@ -104,18 +105,18 @@ export function useViewportVectorLayer({
return null
}
if (zoomRequired) {
return `Zoom in to level ${VECTOR_VIEWPORT_MIN_ZOOM} to load ${layerLabel} from PostGIS.`
return `Zoom verder in (tot niveau ${VECTOR_VIEWPORT_MIN_ZOOM}) om ${layerLabel} op de kaart te tonen.`
}
if (loading) {
return 'Loading visible features from PostGIS...'
return 'Zichtbare kaartobjecten laden...'
}
if (error) {
return error
}
if (truncated) {
return `${loadedFeatureCount.toLocaleString()} visible features loaded; zoom in further because this view exceeds the ${VECTOR_VIEWPORT_FEATURE_LIMIT.toLocaleString()} feature limit.`
return `${loadedFeatureCount.toLocaleString('nl-BE')} kaartobjecten getoond. Zoom verder in om meer detail te zien.`
}
return `${loadedFeatureCount.toLocaleString()} visible of ${(featureCount ?? 0).toLocaleString()} total features loaded from PostGIS.`
return `${loadedFeatureCount.toLocaleString('nl-BE')} van ${(featureCount ?? 0).toLocaleString('nl-BE')} kaartobjecten zichtbaar.`
}, [enabled, error, featureCount, layerLabel, loadedFeatureCount, loading, truncated, zoomRequired])
return {