Skip to content

NRF2-963 Add datasets-plugin map example with excluded areas layer#301

Open
jonnywyatt wants to merge 7 commits into
mainfrom
NRF2-963-excluded-areas-map
Open

NRF2-963 Add datasets-plugin map example with excluded areas layer#301
jonnywyatt wants to merge 7 commits into
mainfrom
NRF2-963-excluded-areas-map

Conversation

@jonnywyatt

Copy link
Copy Markdown
Contributor

Summary

  • Adds a standalone /quote/draw-boundary-datasets example page built on the interactive-map datasets plugin (rather than the existing custom layer-controls approach), demonstrating an edp_boundaries layer alongside a new excluded_areas layer.
  • Adds an excluded-areas-map proxy route, since the excluded areas tile server doesn't return CORS headers permitting direct browser access.
  • Includes draw tools (polygon draw/edit/delete), boundary check + save-and-continue (reusing the existing /quote/draw-boundary/check and /save endpoints), zoom-based fill opacity reduction, and hiding vector layers while in draw mode.
  • Page is exempt from the in-progress quote session gate, since it's a standalone technical example rather than a journey step.
  • Fixes a pre-existing gap in _draw-boundary.scss causing an unwanted vertical scrollbar on draw-boundary map pages (missing padding-bottom: 0 override on .govuk-main-wrapper).

Test plan

  • npx eslint . and npx stylelint pass
  • Full test suite passes (1018 tests)
  • Manually verified in browser: layers render, style switching, search, draw tools (draw/edit/delete), boundary check (valid + invalid geometry), save-and-continue redirect, zoom-based opacity, layer hide/show on draw, no scrollbar on load

🤖 Generated with Claude Code

Adds a standalone /quote/draw-boundary-datasets example page built on
the interactive-map datasets plugin, demonstrating an EDP boundaries
layer alongside a new excluded-areas layer proxied through a new
excluded-areas-map route. Includes draw tools, boundary check/save,
zoom-based fill opacity, and layer visibility toggling while drawing.
@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

jonnywyatt and others added 6 commits July 13, 2026 16:17
Addresses SonarCloud quality gate failures on PR #301:
- Split the oversized wireDrawTools function into smaller functions
- Use a Set (with .has()) instead of Array.includes() for DRAW_LAYERS
- Add missing curly braces around an if statement
- Prefer optional chaining in boundary-info.js area/perimeter formatting
- Extract magic numbers (default zoom, Norfolk coordinates) into named constants
- Add unit tests for all new client-side datasets modules to satisfy the
  90% new-code coverage gate (datasets folder now at ~99% statement coverage)
…esize handling

Removes service navigation and phase banner for full-screen map routes via
a new fullScreen context flag, sets the header productName from serviceName,
and keeps the map filling available height on viewport resize.
The productName toggle and service-navigation conditional were not
needed after all — service navigation and header render the same
regardless of fullScreen.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

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