From 7ff41c311ed55bf3a15763f1f5640a6b5e29cd3b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Feb 2026 20:38:24 +0000 Subject: [PATCH 1/2] Initial plan From 57f0102994d2f5974bf0751ed9881c98c9ac94a2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Feb 2026 20:44:08 +0000 Subject: [PATCH 2/2] Update URL with filter hash for shareable category views Co-authored-by: brunoborges <129743+brunoborges@users.noreply.github.com> --- site/app.js | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/site/app.js b/site/app.js index fbce08c..7ce11e7 100644 --- a/site/app.js +++ b/site/app.js @@ -180,6 +180,14 @@ } }); + // Update URL hash to reflect active filter + const activeFilter = pill.classList.contains('active') ? category : null; + if (activeFilter && activeFilter !== 'all') { + history.replaceState(null, '', '#' + activeFilter); + } else { + history.replaceState(null, '', window.location.pathname + window.location.search); + } + // Update view toggle button state if (window.updateViewToggleState) { window.updateViewToggleState(); @@ -187,11 +195,26 @@ }); }); - // Auto-click "All" button on page load to show all cards - const allButton = document.querySelector('.filter-pill[data-filter="all"]'); - if (allButton) { - allButton.click(); - } + // Apply filter from a given category string (or "all" / empty for no filter) + const applyHashFilter = (category) => { + const target = category + ? document.querySelector(`.filter-pill[data-filter="${category}"]`) + : null; + if (target) { + target.click(); + } else { + const allButton = document.querySelector('.filter-pill[data-filter="all"]'); + if (allButton) allButton.click(); + } + }; + + // On load, apply filter from URL hash or default to "All" + applyHashFilter(window.location.hash.slice(1)); + + // Also react to browser back/forward hash changes + window.addEventListener('hashchange', () => { + applyHashFilter(window.location.hash.slice(1)); + }); }; /* ==========================================================