From 96f326012a81f72962a760bcd0a6f06a1244aec3 Mon Sep 17 00:00:00 2001 From: Tomomi Date: Thu, 24 Sep 2026 19:37:51 -0700 Subject: [PATCH 1/9] updated retriveFilterCategories function to include external resource data --- assets/js/toolkit.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/assets/js/toolkit.js b/assets/js/toolkit.js index 45bec96e2d..2ad24d9f7c 100644 --- a/assets/js/toolkit.js +++ b/assets/js/toolkit.js @@ -55,6 +55,8 @@ document.addEventListener("DOMContentLoaded", () => { function retrieveFilterCategories() { {% assign projects = site.guide-pages | where: "display", "true" %} let projects = JSON.parse(decodeURIComponent("{{ projects | jsonify | uri_escape }}")) + {% assign resources = site.data.internal.toolkitresources | where: "display", true %} + const resources = JSON.parse(decodeURIComponent("{{ resources | jsonify | uri_escape }}")) const practiceAreas = [] const projectStatus = [] @@ -108,6 +110,23 @@ function retrieveFilterCategories() { } } } + + resources.forEach(resource => { + const practiceArea = resource["practice-area"] + + if (practiceArea && !practiceAreas.includes(practiceArea)) { + practiceAreas.push(practiceArea) + } + + if (resource["tools"]) { + resource["tools"].forEach(tool => { + if (tool && !projectTools.includes(tool)) { + projectTools.push(tool) + } + }) + } +}) + return {projectStatus, practiceAreas, projectTools, projectResourceType, projectTechnologies, projectSource, projectContributors} } From 49f69828c568a491e7504bad39f0a894a6673f05 Mon Sep 17 00:00:00 2001 From: Tomomi Date: Thu, 24 Sep 2026 20:33:00 -0700 Subject: [PATCH 2/9] added and updated data attribute for toolkit-resource-card and updated scss file to reflect the attribute change --- _includes/current-guides.html | 2 +- _sass/components/_toolkit.scss | 4 ++-- assets/js/toolkit.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/_includes/current-guides.html b/_includes/current-guides.html index 0cbc176ff7..58133c6e71 100644 --- a/_includes/current-guides.html +++ b/_includes/current-guides.html @@ -66,7 +66,7 @@

External Resources

{%- for item in site.data.internal.toolkitresources -%} {%- if item.display == true -%} -
+
{%- if item.svg -%}
{% include {{ item.svg }} %} diff --git a/_sass/components/_toolkit.scss b/_sass/components/_toolkit.scss index ebada21cd4..03673662ea 100644 --- a/_sass/components/_toolkit.scss +++ b/_sass/components/_toolkit.scss @@ -104,12 +104,12 @@ margin: 0 auto; } -[data-article-type="development"] .resource-svg-icons svg{ +.toolkit-resource-card[data-project-tools="GitHub"] .resource-svg-icons svg{ width: 50%; height: 50%; } -[data-article-type="development"] .toolkit-flex-item-img-container{ +.toolkit-resource-card[data-project-tools="GitHub"] .toolkit-flex-item-img-container{ display: flex; align-items: center; justify-content: center; diff --git a/assets/js/toolkit.js b/assets/js/toolkit.js index 2ad24d9f7c..f85f9d26c5 100644 --- a/assets/js/toolkit.js +++ b/assets/js/toolkit.js @@ -211,11 +211,11 @@ function initializeFilters() { function applyFilters(filtersParams) { // Show all cards if there are no active filters if (Object.values(filtersParams).every(x => x.length === 0)) { - document.querySelectorAll(".guide-card").forEach(card => { + document.querySelectorAll(".guide-card, .toolkit-resource-card").forEach(card => { card.style.display = 'block' }) } else { - document.querySelectorAll(".guide-card").forEach(card => { + document.querySelectorAll(".guide-card, .toolkit-resource-card").forEach(card => { card.style.display = 'block' for (let key in filtersParams) { let filterList From 8d8bd66ea68ff310e8e3447ed28f5dda109af9cc Mon Sep 17 00:00:00 2001 From: Tomomi Date: Tue, 29 Sep 2026 17:37:09 -0700 Subject: [PATCH 3/9] fixed wrong dataset name -data-practice-area to data-practice-areas --- _includes/current-guides.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/current-guides.html b/_includes/current-guides.html index 58133c6e71..86941c2daf 100644 --- a/_includes/current-guides.html +++ b/_includes/current-guides.html @@ -66,7 +66,7 @@

External Resources

{%- for item in site.data.internal.toolkitresources -%} {%- if item.display == true -%} -
+
{%- if item.svg -%}
{% include {{ item.svg }} %} From 0bbc49d7582f9ecd89325584da7404cc6e34a90a Mon Sep 17 00:00:00 2001 From: Tomomi Date: Tue, 29 Sep 2026 17:39:15 -0700 Subject: [PATCH 4/9] updated applyFilter so that the resource cards will now show when filtered by other items that are not project areas or tools. --- assets/js/toolkit.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/js/toolkit.js b/assets/js/toolkit.js index f85f9d26c5..f7842c63aa 100644 --- a/assets/js/toolkit.js +++ b/assets/js/toolkit.js @@ -238,7 +238,8 @@ function applyFilters(filtersParams) { } }) } - if (!(filterList.some(data => card.dataset[key].includes(data)))) { + const cardFilterValue = card.dataset[key] ?? '' + if (!(filterList.some(data => cardFilterValue.includes(data)))) { card.style.display = 'none' } } From eec632196449318d73f43a8d54abcc61a3dee303 Mon Sep 17 00:00:00 2001 From: Tomomi Date: Tue, 29 Sep 2026 17:51:30 -0700 Subject: [PATCH 5/9] updated the filter frequency including external resources --- assets/js/toolkit.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/assets/js/toolkit.js b/assets/js/toolkit.js index f7842c63aa..f5d361e2af 100644 --- a/assets/js/toolkit.js +++ b/assets/js/toolkit.js @@ -299,10 +299,7 @@ function applyURLtoFilters(filterParams) { // Computes and returns the frequency of each checkbox filter that are currently present on the displayed cards on the page function updateFilterFrequency() { const onPageFilters = [] - const guideCards = document.querySelectorAll('.guide-card') - const guideCardsArray = Array.from(guideCards) - const visibleGuideCards = guideCardsArray.filter(card => card.style.display === 'block') - document.querySelectorAll('.guide-card[style*="display: block"]').forEach(card => { + document.querySelectorAll('.guide-card[style*="display: block"], .toolkit-resource-card[style*="display: block"]').forEach(card => { for(const [key, value] of Object.entries(card.dataset)) { value.split(",").map(item => { if (item.toLowerCase() === 'completed') { From f2f9804615c411e9bda874627fb3b220d01b8bfe Mon Sep 17 00:00:00 2001 From: Tomomi Date: Tue, 29 Sep 2026 19:28:50 -0700 Subject: [PATCH 6/9] updated toggleNoResultMsgIfNoMatch function in toolkit.js --- assets/js/toolkit.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/assets/js/toolkit.js b/assets/js/toolkit.js index f5d361e2af..22b67eaab2 100644 --- a/assets/js/toolkit.js +++ b/assets/js/toolkit.js @@ -263,7 +263,7 @@ function applyFilters(filtersParams) { attachEventListenerToFilterTags(filtersParams) // Displays no results message if no matches and 2nd parameter is querySelector name - toggleNoResultMsgIfNoMatch(filtersParams, 'guide-card') + toggleNoResultMsgIfNoMatch(filtersParams, ['guide-card', 'toolkit-resource-card']) } // Apply current filters to URL @@ -516,10 +516,16 @@ function tabFocusedKeyDownHandler(e) { } //controls if no results message should display if no results match from filter selection -function toggleNoResultMsgIfNoMatch(filtersParams,querySelector) { - if ([...document.querySelectorAll(`.${querySelector}`)].every(card => card.style.display === 'none')) { - noResultsMessageComponent(filtersParams,'white') +function toggleNoResultMsgIfNoMatch(filtersParams, querySelector) { + const selectedSelectors = Array.isArray(querySelector) ? querySelector : [querySelector] + + const cards = selectedSelectors.flatMap(selector => + [...document.querySelectorAll(`.${selector}`)] + ) + + if (cards.length === 0 || cards.every(card => card.style.display === 'none')) { + noResultsMessageComponent(filtersParams, 'white') } else { document.querySelector(".no-results-message").innerHTML = "" - } -} \ No newline at end of file + } +} \ No newline at end of file From fc3cc9ecd7faff27fa96e1c0e96152f804833d11 Mon Sep 17 00:00:00 2001 From: Tomomi Date: Wed, 30 Sep 2026 21:44:15 -0700 Subject: [PATCH 7/9] removed trailing white space --- assets/js/toolkit.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/toolkit.js b/assets/js/toolkit.js index 22b67eaab2..aee2f2f732 100644 --- a/assets/js/toolkit.js +++ b/assets/js/toolkit.js @@ -527,5 +527,5 @@ function toggleNoResultMsgIfNoMatch(filtersParams, querySelector) { noResultsMessageComponent(filtersParams, 'white') } else { document.querySelector(".no-results-message").innerHTML = "" - } -} \ No newline at end of file + } +} \ No newline at end of file From dbc2192e556bc3214efb620a665c5e95849ee26b Mon Sep 17 00:00:00 2001 From: Tomomi Date: Thu, 8 Oct 2026 21:06:49 -0700 Subject: [PATCH 8/9] added classname to manipulate flex-basis and updated sass file --- _includes/current-guides.html | 2 +- _sass/components/_toolkit.scss | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/_includes/current-guides.html b/_includes/current-guides.html index 86941c2daf..1b82162576 100644 --- a/_includes/current-guides.html +++ b/_includes/current-guides.html @@ -1,7 +1,7 @@
-
+