Skip to content

Add Filtering to External Resources on Toolkit Page #8558

@santi-jose

Description

@santi-jose

Prerequisite

  1. 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.
  2. 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

The filters on the Toolkit page work correctly on the Guide Pages cards, and this functionality should not be changed. The purpose of this issue is to add filtering to the External Resources cards.

Action Items

  • In /assets/js/toolkit.js, examine the applyFilters and retrieveFilterCategories functions 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.html
    • data/internal/toolkitresources.yml
    • includes/guide-card.html
  • In current-guides.html, make the following changes:
    • External Resource card div elements should have an attribute data-project-Tools alongside the data-article-type attribute. data-project-Tools should be populated from the tools listed in toolkitresources.yml.
    • Each External Resource card div should have the class resource-card.
  • In toolkit.js, edit the retrieveFilterCategories function to add Practice Area and Tools categories from External Resource cards to the filters list, using the attributes you added in the previous steps.
  • Edit the applyFilters function 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.
  • Test that the filters work as expected to filter both Guide Cards and External Resource cards.
  • Verify that the URL parameters are still updated when filters are selected and deselected.
  • If it was necessary to make changes to other functions or files in the course of this issue, make note of these additional changes in your PR.

Resources/Instructions

Metadata

Metadata

Assignees

No one assigned

    Labels

    Complexity: LargeP-Feature: Toolkithttps://www.hackforla.org/toolkit/ready for merge teamneeds a senior review either to do some re writing or to approve it for ready for prioritizationrole: back end/devOpsTasks for back-end developerssize: 2ptCan be done in 7-12 hours

    Type

    No type

    Projects

    Status

    New Issue Approval

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions