Skip to content

Add Legend Component #256

Description

@mjumbewu

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).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions