Prerequisite
- Be a member of Hack for LA. (There are no fees to join.) If you have not joined yet, please follow the steps on our Getting Started page and attend an onboarding session.
- Before you claim or start working on an issue, please make sure you have read our How to Contribute to Hack for LA Guide.
Overview
We need to add filtering functionality to the Toolkit page so that selected filters are applied to the External Resources cards in addition to the Guide Pages cards.
Details
Currently, the Toolkit page includes two types of cards:
- Guide Pages cards, e.g. 2FA Guide, Building a Survey Reporting Dashboard
- External Resources cards, e.g. Figma, GitHub
Filters are currently generated only from Guide Page card attributes and are applied only to Guide Page cards. This functionality should be preserved for the Guide Page cards, and expanded so External Resource cards can also be filtered by 'Practice Area' and 'Tools' selections. This issue requires the following changes:
- Update the External Resource card HTML to add a new "tools" data attribute in addition to the existing "practice area" attribute for storing card info, and add a new class to help JS querying these cards.
- Update the filter generation JS to include External Resource card attributes, and update the filtering to apply to the External Resource cards.
Action Items
Resources/Instructions
Prerequisite
Overview
We need to add filtering functionality to the Toolkit page so that selected filters are applied to the External Resources cards in addition to the Guide Pages cards.
Details
Currently, the Toolkit page includes two types of cards:
Filters are currently generated only from Guide Page card attributes and are applied only to Guide Page cards. This functionality should be preserved for the Guide Page cards, and expanded so External Resource cards can also be filtered by 'Practice Area' and 'Tools' selections. This issue requires the following changes:
Action Items
/assets/js/toolkit.js, examine theapplyFiltersandretrieveFilterCategoriesfunctions to understand how filters are currently generated and applied to the Guide Page cards. The following files will also be helpful to view to understand how the External Resource cards are created:includes/current-guides.htmldata/internal/toolkitresources.ymlincludes/guide-card.htmlcurrent-guides.html, make the following changes:data-project-toolsalongside thedata-article-typeattribute.data-project-toolsshould be populated from thetoolslisted intoolkitresources.yml.resource-card.toolkit.js, edit theretrieveFilterCategoriesfunction to add Practice Area and Tools categories from External Resource cards to the filters list, using the attributes you added in the previous steps.applyFiltersfunction to filter the External Resources cards when a Practice Area or Tools filter is selected. The other filter categories Status, Source, and Contributors will not apply to External Resources, so if one of them is selected, all External Resource cards should be hidden.Resources/Instructions