Skip to content

[DISC-002] Persist discovery filter state in the URL - #59

Merged
chev0004 merged 3 commits into
developfrom
feat/disc-002
Jun 19, 2026
Merged

[DISC-002] Persist discovery filter state in the URL#59
chev0004 merged 3 commits into
developfrom
feat/disc-002

Conversation

@chev0004

Copy link
Copy Markdown
Owner

Outline

Summary

Makes the URL the source of truth for the discovery page's filter, search, sort, tag, and pagination state, so a filtered view survives refresh, deep linking, and locale switches.


Changes & Enhancements

  • Type of Change:
    • Feature
    • Bugfix
    • Refactor
    • Chore
  • Changes:
    • (discovery):
      • Add a URL-state module that serializes filter, search, sort, tag, and page state to query params and parses it back, omitting defaults and preserving unrelated params.
      • Hydrate the discovery controls from the URL on load and write state changes back with history.replaceState, keeping filtering client-side with no server refetch.
    • (navbar):
      • Carry the active query string across locale switches so changing language keeps the current filters.

Page / App Changes

Affected Next.js Routes (Local):

  • /[lang]
Before (Screenshot)
After (Screenshot)

Component / Storybook Changes

Affected Storybook Components (Local):

Before (Screenshot)
After (Screenshot)

Not Doing


Other (Remarks)


Checklists

  • Code is well-documented (comments, JSDoc, etc.).
  • Existing comments were updated as needed.
  • No out-of-scope changes are included.
  • Write TODO comments where future work is required.
  • Removed unnecessary debug code (e.g., console.log, debugger).
  • Self-reviewed and tested locally.

@chev0004 chev0004 self-assigned this Jun 19, 2026
@chev0004
chev0004 merged commit 985a6c6 into develop Jun 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant