feat: add map category filter widget with colored legend #72

Open
opened 2026-06-29 14:06:40 +00:00 by jmiller · 1 comment
Owner

Summary

The map module displays all locations but has no way for users to filter markers by category on the map itself. A category filter legend (clickable category badges that toggle marker visibility) would be a significant UX improvement.

Checklist

  • Load published categories with colors in the map module dispatcher (already JOINed, extend to pass category list)
  • Add a category legend/filter bar below or beside the map in tmpl/default.php
  • Render each category as a clickable badge with its color and optional marker icon
  • Add JavaScript to show/hide markers by category on click (toggle L.LayerGroup per category)
  • Support "All" toggle to show/hide all markers
  • Add module parameter to enable/disable the category filter widget (default: enabled)
  • Style the filter widget responsively (horizontal on desktop, scrollable on mobile)
  • Use $wa->addInlineScript() for CSP compliance
  • Add language strings for "All Categories", "Filter by category"
## Summary The map module displays all locations but has no way for users to filter markers by category on the map itself. A category filter legend (clickable category badges that toggle marker visibility) would be a significant UX improvement. ## Checklist - [ ] Load published categories with colors in the map module dispatcher (already JOINed, extend to pass category list) - [ ] Add a category legend/filter bar below or beside the map in `tmpl/default.php` - [ ] Render each category as a clickable badge with its color and optional marker icon - [ ] Add JavaScript to show/hide markers by category on click (toggle `L.LayerGroup` per category) - [ ] Support "All" toggle to show/hide all markers - [ ] Add module parameter to enable/disable the category filter widget (default: enabled) - [ ] Style the filter widget responsively (horizontal on desktop, scrollable on mobile) - [ ] Use `$wa->addInlineScript()` for CSP compliance - [ ] Add language strings for "All Categories", "Filter by category"
jmiller added the priority/hightype/featurearea/module-maparea/frontend labels 2026-06-29 14:06:40 +00:00
Author
Owner

Branch created: feature/72-feat-add-map-category-filter-widget-with

git fetch origin
git checkout feature/72-feat-add-map-category-filter-widget-with
Branch created: [`feature/72-feat-add-map-category-filter-widget-with`](https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteStoreLocator/src/branch/feature/72-feat-add-map-category-filter-widget-with) ```bash git fetch origin git checkout feature/72-feat-add-map-category-filter-widget-with ```
Sign in to join this conversation.