You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds feature to allow ENV to reorder & filter aggs
** Why are these changes being introduced:
While the API provides a large number of possible options for users to
filter and aggregate their search results, not every instance of the
application will want to use every category (GeoData and the basic
Search application will likely use different sets, for example). One
good option for enabling these differences is to leverage environment
variables.
** Relevant ticket(s):
* https://mitlibraries.atlassian.net/browse/gdt-128
** How does this address that need:
This adds a new environment variable to the application, ACTIVE_FILTERS.
This is meant to be a list of the filter categories which should be
displayed in the application. The variable is optional - without it, the
application should include every available category, in the order they
appear in the query model.
The env variable is loaded and processed in the search controller, which
is then used to order and filter the categories returned from the API
before sending the result to the user in the UI.
The tests added in this commit demonstrate the impact of this change.
** Document any side effects to this change:
Because the env var is optional, I'm not adding it to app.json. I'm
leaning toward adding it to the Heroku pipeline, to preserve the current
behavior (only content type and source being shown).
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,6 +51,7 @@ change as part of the work.
51
51
52
52
-`ABOUT_APP`: If populated, an 'about' partial containing the contents of this variable will render on
53
53
`basic_search#index`.
54
+
-`ACTIVE_FILTERS`: If populated, this list of strings defines which filters are shown to the user, and the order in which they appear. Values are case sensitive, and must match those used in the TIMDEX GraphQL query. Extraneous values will be ignored. If not populated, all filters will be shown.
54
55
-`GDT`: Enables features related to geospatial data discovery. Setting this variable with any value will trigger GDT
55
56
mode (e.g., `GDT=false` will still enable GDT features). Note that this is currently intended _only_ for the GDT app and
56
57
may have unexpected consequences if applied to other TIMDEX UI apps.
0 commit comments