Commit Graph
2 Commits
Author SHA1 Message Date
spaghet fb8e42f632 refactor: consolidate blog and project filtering into shared component
The /blog and /projects listings previously used byte-identical copies of the same
filtering island, which meant bugs like inconsistent AND-vs-OR tag semantics,
duplicate-case tags, and a missing empty state were duplicated across both.

This commit introduces `FilteredList`, a single shared Solid component that:

- Unifies tag, keyword, and sort filtering for both collections
- Seeds initial filter state from the SSR request URL to avoid hydration mismatches
- Syncs active filters into the address bar via `history.replaceState` so filtered
  views survive refreshes and can be shared
- Restores filters on browser back/forward navigation (`popstate`)
- Case-folds and dedupes tags when parsing URL params

Filter logic (collectTags, filterEntries, sortKeys, URL param encoding) is extracted
into `src/lib/filters.ts` with full unit test coverage.
2026-11-12 22:38:58 -05:00
spaghet ab6cd7c162 Refactor components and add tests for improved functionality and coverage 2026-11-04 22:16:17 -05:00