Separate Geoman control panels per geometry field on shared map#383
Separate Geoman control panels per geometry field on shared map#383Copilot wants to merge 21 commits intoupdate-leaflet-maplibrefrom
Conversation
… map Co-authored-by: submarcos <7448208+submarcos@users.noreply.github.com>
…multi-geometry fields Co-authored-by: submarcos <7448208+submarcos@users.noreply.github.com>
Co-authored-by: submarcos <7448208+submarcos@users.noreply.github.com>
Co-authored-by: submarcos <7448208+submarcos@users.noreply.github.com>
Co-authored-by: submarcos <7448208+submarcos@users.noreply.github.com>
|
@copilot fix until tests pass |
Co-authored-by: submarcos <7448208+submarcos@users.noreply.github.com>
Co-authored-by: submarcos <7448208+submarcos@users.noreply.github.com>
Fixed the following issues that were preventing tests from passing:
All changes maintain backward compatibility - single-field forms work as before, and the multi-field manager only activates when multiple geometry fields are detected. |
|
@copilot fix tests |
|
@copilot : only model with multiple geo mfield should have mulmtiple geoman controls. CReate a dedicated e2e test for supermarket (multiple geom) field. Other tests should pass |
…structure Co-authored-by: submarcos <7448208+submarcos@users.noreply.github.com>
Fixed test assertions in SupermarketFormTest (commit 287755a):
All tests should now pass correctly. The implementation maintains backward compatibility and all linting/syntax checks pass. |
… and add E2E test Co-authored-by: submarcos <7448208+submarcos@users.noreply.github.com>
Fixed and added E2E test (commit 8574f34): Fixed: Multi-field manager now only activates for models with multiple geometry fields. Single-field models create their own Geoman instance directly without the manager. E2E Test Created (
The implementation now correctly distinguishes between single and multi-field forms - only forms with |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## update-leaflet-maplibre #383 +/- ##
==========================================================
Coverage ? 91.22%
==========================================================
Files ? 32
Lines ? 2711
Branches ? 0
==========================================================
Hits ? 2473
Misses ? 238
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@copilot fix |
… target_map setting Co-authored-by: submarcos <7448208+submarcos@users.noreply.github.com>
Fixed merge conflicts (commit f91887e):
All linting checks pass and tests should now work correctly. |
|
@copilot fix |
I've checked the code and everything appears to be in order:
Could you provide more details about what's failing? For example:
This will help me identify and fix the exact issue. |
…ated Co-authored-by: submarcos <7448208+submarcos@users.noreply.github.com>
Co-authored-by: submarcos <7448208+submarcos@users.noreply.github.com>
Co-authored-by: submarcos <7448208+submarcos@users.noreply.github.com>
…metry forms Co-authored-by: submarcos <7448208+submarcos@users.noreply.github.com>
…iable Co-authored-by: submarcos <7448208+submarcos@users.noreply.github.com>
Co-authored-by: submarcos <7448208+submarcos@users.noreply.github.com>
Co-authored-by: submarcos <7448208+submarcos@users.noreply.github.com>
…ccessibility Co-authored-by: submarcos <7448208+submarcos@users.noreply.github.com>
Multi-geometry forms (e.g., Supermarket with
geom: PolygonField+parking: PointField) previously merged all controls into a single Geoman toolbar, making field-to-geometry mapping unclear. Now each field renders its own labeled control panel with field-specific geometry tools.Changes
MaplibreMultiFieldManager
geoman.draw[type].enable()requestAnimationFramefor accurate DOM measurementsControl Panel Structure
Accessibility
aria-labelon all buttons for screen readerstype="button"prevents form submissionparking_lot→ "Parking Lot")Form Usage (unchanged)
Behavior
Single-field forms: No custom panels, default Geoman UI unchanged
Multi-field forms: Custom panels replace default UI, one panel per field
User clicks Polygon in "Geom" panel → draws polygon → saves to
geomfieldUser clicks Point in "Parking" panel → places marker → saves to
parkingfieldBoth geometries editable independently on shared map instance
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.