Skip to content

feat(case-map-overview): apply spec#389

Merged
rubenvdlinde merged 1 commit into
developmentfrom
feat/apply-case-map-overview
May 11, 2026
Merged

feat(case-map-overview): apply spec#389
rubenvdlinde merged 1 commit into
developmentfrom
feat/apply-case-map-overview

Conversation

@rubenvdlinde
Copy link
Copy Markdown
Contributor

Summary

Applies the case-map-overview spec. Converts the existing /map page from a hand-written CaseMapView.vue (type: 'custom') to a fully manifest-driven type: 'map' page that consumes CnMapPage from @conduction/nextcloud-vue beta.30. The only Vue surface added is a tiny marker-formatter module.

Manifest changes

src/manifest.jsonCaseMap page:

  • type: 'custom'type: 'map'
  • Removed component: 'CaseMapView'
  • New config block:
    • register: 'procest', schema: 'case', geometryField: 'geometry'
    • filters: ['status', 'caseType', 'assignee', 'deadlineRange']
    • marker.formatter: 'caseMarkerFormatter'
    • clustering: { enabled: true, disableAtZoom: 14, priority: ['blocked','in_progress','open','closed'] }
    • bboxQuery: { threshold: 5000 } (viewport-bounded queries beyond 5k pins)
    • tileLayer: 'pdok-brt'
    • sidebar: { enabled: true, filtersOpen: true }
    • inline emptyState (icon + nl title/body)

Formatter registration

  • New src/services/mapFormatters.js exports caseMarkerFormatter, statusColor, statusIcon.
  • Handles Point + Polygon (arithmetic-mean centroid) + missing geometry (returns null so the lib skips).
  • Status palette uses NL Design System color tokens (var(--color-status-{info,warning,error}), var(--color-text-maxcontrast)) — no hardcoded hex.
  • src/main.js exposes the formatter registry as Vue.prototype.$mapFormatters and on App props (mirrors the existing customComponents pattern).

Cleanup

  • Deleted src/views/CaseMapView.vue (replaced by CnMapPage).
  • Removed CaseMapView import + registration from src/customComponents.js.

Constraints honoured

  • Manifest-first — no new Vue page component, only a formatter function.
  • No new PHP / controllers / schemas — pin data flows through existing OpenRegister endpoints.
  • No i18n — empty-state strings declared inline in manifest (Dutch).
  • No composer check — strict watchdog scope, jq validation only.

jq validation

$ jq '.pages | map(select(.type == "map")) | length' src/manifest.json
1
$ jq -e '.pages[] | select(.id=="CaseMap") | .config.marker.formatter=="caseMarkerFormatter" and .config.clustering.disableAtZoom==14 and .config.bboxQuery.threshold==5000' src/manifest.json
true

Deferred (recorded in builds/build.json)

  • T04/T05/T06/T08 — lib-internal wiring (router dispatch, filterRegistry, leaflet.markercluster transitive dep, automatic NcEmptyContent) handled by CnMapPage.
  • V01-V04 — manual dev-env walkthroughs + 5k-pin perf benchmark; strict watchdog limits to lint + jq only this round.

Test plan

  • Navigate to /map after npm run build — page renders via CnMapPage, no console errors.
  • Pins appear for seed cases that have geometry; status colours match palette.
  • Click a pin → router navigates to /cases/:id.
  • Apply sidebar filter (status = open) → only blue pins remain; viewport preserved.
  • Zoom out → clusters appear; cluster colour matches most severe child status.

Convert the existing `/map` page from a hand-written `CaseMapView.vue`
custom component to a manifest-driven `type: 'map'` page consuming
`CnMapPage` from @conduction/nextcloud-vue beta.30 (ADR-008).

Changes:
- src/manifest.json: CaseMap page entry switched to `type: 'map'` with
  full config block — register/schema, geometryField, filter ids,
  marker.formatter, clustering (with status-priority order
  blocked > in_progress > open > closed), bboxQuery threshold (5k pins),
  pdok-brt tile layer, sidebar config, and inline emptyState (nl).
- src/services/mapFormatters.js: new — exports `caseMarkerFormatter`,
  `statusColor`, `statusIcon`. Handles Point + Polygon centroid + null
  geometry. Uses NL Design System color tokens (var(--color-status-*),
  no hardcoded hex).
- src/main.js: registers the mapFormatters registry on Vue.prototype
  and on the App props (mirrors customComponents pattern).
- src/customComponents.js: drop the CaseMapView import + registration.
- src/views/CaseMapView.vue: deleted (replaced by CnMapPage).
- builds/build.json: record application; verification tasks deferred
  per strict watchdog (lint + jq only) and 5k-pin perf benchmark
  follows in a separate change.
@rubenvdlinde rubenvdlinde force-pushed the feat/apply-case-map-overview branch from 9277fd8 to 3a1d425 Compare May 11, 2026 12:04
@rubenvdlinde rubenvdlinde merged commit 9159c53 into development May 11, 2026
12 of 15 checks passed
@rubenvdlinde rubenvdlinde deleted the feat/apply-case-map-overview branch May 11, 2026 12:05
@github-actions
Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/procest @ a8a2a58

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
composer ✅ 100/100
npm ✅ 419/419
PHPUnit ⏭️
Newman ⏭️
Playwright

Spec coverage: 3% (21 tests / 673 specs)


Quality workflow — 2026-05-11 12:09 UTC

Download the full PDF report from the workflow artifacts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant