Why
Some instances of Shareabouts (such as https://participate.boston.gov/ or https://pbsomervillema.poepublic.com/) have implemented custom interactive map legends and category filters. These features are highly desirable but currently require flavor-specific scripts and styles that monkey-patch core views (AppView, MapView, PlaceListView, ActivityView). Bringing a configurable legend component and list-view filtering into core Shareabouts will reduce custom code in flavors, standardize the filtering pipeline through the existing /filter/:locationtype route, and provide a polished, unified experience across instances.
What Changes
- Add a first-class
Shareabouts.LegendView and Shareabouts.LegendItemView to core to render a category legend in the sidebar.
- Introduce a new
legend configuration section in config.yml to toggle legend visibility, collapsible state, and map/list/activity filtering behaviors.
- Introduce a new
list configuration section in config.yml to control the display of a category dropdown filter directly in the list view header (list list config should contain a list.enabled option, but we should fall back to app.list_enabled for backward compatibility).
- Update
Shareabouts.ActivityView to respect the /filter/:type route when configured via activity.filterable.
- Update
Shareabouts.PlaceListView to include a category filter dropdown (if we move place-type filter capability into a map legend, we still need some way to be able to filter the list view if the instance implementer decides to omit menu-level filters).
Why
Some instances of Shareabouts (such as https://participate.boston.gov/ or https://pbsomervillema.poepublic.com/) have implemented custom interactive map legends and category filters. These features are highly desirable but currently require flavor-specific scripts and styles that monkey-patch core views (
AppView,MapView,PlaceListView,ActivityView). Bringing a configurable legend component and list-view filtering into core Shareabouts will reduce custom code in flavors, standardize the filtering pipeline through the existing/filter/:locationtyperoute, and provide a polished, unified experience across instances.What Changes
Shareabouts.LegendViewandShareabouts.LegendItemViewto core to render a category legend in the sidebar.legendconfiguration section inconfig.ymlto toggle legend visibility, collapsible state, and map/list/activity filtering behaviors.listconfiguration section inconfig.ymlto control the display of a category dropdown filter directly in the list view header (listlistconfig should contain alist.enabledoption, but we should fall back toapp.list_enabledfor backward compatibility).Shareabouts.ActivityViewto respect the/filter/:typeroute when configured viaactivity.filterable.Shareabouts.PlaceListViewto include a category filter dropdown (if we move place-type filter capability into a map legend, we still need some way to be able to filter the list view if the instance implementer decides to omit menu-level filters).