Label Flemish scope datasets correctly
GeoIntel CI / docs-smoke (push) Canceled after 0s
GeoIntel CI / contract-smoke (push) Canceled after 0s

This commit is contained in:
Codex
2026-07-17 16:47:36 +02:00
parent 6fd3ed49b2
commit 24247746c1
3 changed files with 19 additions and 1 deletions
+2
View File
@@ -22,6 +22,8 @@
municipalities are explicitly recorded as having no profiles.
- Made frontend Area loading exhaustive and bounded the Area/Dataset catalogs
with search and pagination so complete regional workspaces remain usable.
- Made VRBG boundary labels coverage-aware so Flanders is never presented as
the Kempen transport region.
## Sprint 235 Governed bathymetry profiles and Belgian scale architecture (2026-07-17)
@@ -322,3 +322,14 @@ def test_frontend_bounds_large_area_and_dataset_catalogs() -> None:
assert "visiblePrimaryDatasets.map" in dataset_panel
assert "Zoek in beschikbare bronnen" in dataset_panel
assert "{historyOpen ? <ul" in dataset_panel
def test_frontend_labels_flanders_scope_without_kempen_mislabeling() -> None:
dataset_display = (
ROOT / "frontend" / "src" / "lib" / "datasetDisplay.ts"
).read_text(encoding="utf-8")
assert "coverageScope === 'flanders' && layer === 'regional_boundary'" in dataset_display
assert "'Grens Vlaanderen'" in dataset_display
assert "coverageScope === 'flanders' && layer === 'municipality_boundaries'" in dataset_display
assert "'Gemeentegrenzen Vlaanderen'" in dataset_display
+6 -1
View File
@@ -64,7 +64,12 @@ export function getDatasetDisplayName(dataset: DatasetCreateResponse): string {
const layer = (dataset.reference_layer_name ?? dataset.source_metadata?.layer_name ?? dataset.source_metadata?.layer_type ?? '')
.toString()
.toLowerCase()
const label = DATASET_LABEL_BY_LAYER[layer]
const coverageScope = String(dataset.source_metadata?.coverage_scope ?? '').toLowerCase()
const label = coverageScope === 'flanders' && layer === 'regional_boundary'
? 'Grens Vlaanderen'
: coverageScope === 'flanders' && layer === 'municipality_boundaries'
? 'Gemeentegrenzen Vlaanderen'
: DATASET_LABEL_BY_LAYER[layer]
if (!label) {
return dataset.name
}