Skip to content

Add categories option to filters

Frank Duncan requested to merge 165-add-categories into main

This required a new mediawiki variable, and some refactoring of the filter display.

Issue ots/clients/lfc/torque-tracker#165: Add ability to filter YGOC proposals by Focus Area in Explore

@justin This needs some styling love! Right now it looks like this when there's a lot of filters:

filters_with_more

And this when there's not many:

filters

If you don't have time for styling love, I'll take a shot at it and move forward, just to get the issue closed out. No one is really giong to use this feature currently, but we want to have it ready for when they inevitably do use it!

For the configuration when connecting to staging, you can use:

$wgTorqueFilterCategories["focus_area"] = [
  "Arts and Culture" => [
    "Bridging divides",
    "Creative youth development",
    "Cultural awareness",
    "Multidisciplinary arts",
    "Performing arts",
  ],
  "Democratic Process" => [
    "Civic and social engagement",
    "Democracy",
  ],

  "Economic Security and Opportunity" => [
    "Access to housing and housing development",
    "Agricultural development",
    "Economic development",
    "Financial inclusion",
    "Livelihoods and workforce development",
  ],
  "Education" => [
    "Early learning",
    "Elementary, secondary education",
    "Postsecondary, tertiary education",
    "Vocational education",
    "Youth development",
  ],
  "Environment" => [
    "Climate change",
    "Environmental justice",
    "Natural resources conservation",
  ],
  "Equity and Justice" => [
    "Aging",
    "Caste",
    "Disability",
    "Gender identity",
    "Immigration or migration",
    "Incarceration and justice system involvement",
    "Race and ethnicity",
    "Sexual orientation",
  ],
  "Funding and Regranting" => [
    "Regrantor",
  ],
  "Health" => [
    "Access to healthcare",
    "Active living",
    "Child development and welfare",
    "Chronic diseases",
    "Maternal and perinatal health",
    "Mental and behavioral health",
    "Nutrition and food security",
    "Public health, public health infrastructure",
    "Sexual and gender-based violence",
    "Sexual and reproductive health and justice",
    "Water access, sanitation, and hygiene",
  ],
  "Humanitarian Assistance" => [
    "Humanitarian assistance and relief",
  ],
  "Human Rights" => [
    "Human rights",
  ],
  "Nonprofit Sector" => [
    "Nonprofit sector strengthening",
  ],
];

Merge request reports