DigitalCommons / mykomap

A web application for mapping initiatives in the Solidarity Economy
3 stars 0 forks source link

[OBO MykoMap] Support explicit configurabilty of field used in Directory panel #248

Open lin-d-hop opened 2 months ago

lin-d-hop commented 2 months ago

Please track against the clockify project [OBO MykoMap]

Description

Within MM the Directory panel is an expanded version of the first filter in the Search panel. In this issue we want to make it possible to specify another filter, besides the first one, as the filter to be expanded in the Directory panel. The goal is the create a new field that allows any of the filters from the Search panel to be selected, which can be specified in the MM config file.

Acceptance Criteria

lin-d-hop commented 2 months ago

Replaces #237

wu-lee commented 2 months ago

An extra detail: the directory panel pre-dates the search/filter panel, and as such has its own separate implementation for finding the categories, which duplicates the filter functionality in a different way. (In brief: an index is built up when the data is loaded and stored as a look-up of look-ups.)

My intention for a while has been to remove that duplication and use the filter implementation. This is a separate task, but which perhaps should be done as part of this one (or prior to this one).

One consequence of this duplication of functionality is that the directory doesn't really play well with the search history management, see https://github.com/DigitalCommons/mykomap/issues/205#issuecomment-2027686857

wu-lee commented 2 months ago

In line with the way the config is going right now, I suggest that this is configured with a flag in one of the properties of the propDefs (i.e. fields) schema of the config. The filterableFields config value which used to define the list of filters - and so which one was in the directory - is partially deprecated already as a result of #205.