Label Flemish scope datasets correctly
This commit is contained in:
@@ -22,6 +22,8 @@
|
|||||||
municipalities are explicitly recorded as having no profiles.
|
municipalities are explicitly recorded as having no profiles.
|
||||||
- Made frontend Area loading exhaustive and bounded the Area/Dataset catalogs
|
- Made frontend Area loading exhaustive and bounded the Area/Dataset catalogs
|
||||||
with search and pagination so complete regional workspaces remain usable.
|
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)
|
## 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 "visiblePrimaryDatasets.map" in dataset_panel
|
||||||
assert "Zoek in beschikbare bronnen" in dataset_panel
|
assert "Zoek in beschikbare bronnen" in dataset_panel
|
||||||
assert "{historyOpen ? <ul" 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
|
||||||
|
|||||||
@@ -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 ?? '')
|
const layer = (dataset.reference_layer_name ?? dataset.source_metadata?.layer_name ?? dataset.source_metadata?.layer_type ?? '')
|
||||||
.toString()
|
.toString()
|
||||||
.toLowerCase()
|
.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) {
|
if (!label) {
|
||||||
return dataset.name
|
return dataset.name
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user