Skip to content

feat(resources): sync catalog search and filter tabs with URL query parameters (#664)#681

Merged
Aditya948351 merged 2 commits into
devpathindcommunity-india:masterfrom
shivani11jadhav:fix/query-param-sync
Jun 21, 2026
Merged

feat(resources): sync catalog search and filter tabs with URL query parameters (#664)#681
Aditya948351 merged 2 commits into
devpathindcommunity-india:masterfrom
shivani11jadhav:fix/query-param-sync

Conversation

@shivani11jadhav

Copy link
Copy Markdown
Contributor

🎯 Linked Issue

Closes #664

Related Context / Tracking Reference

Description of Changes

Audited and refactored the catalog view architecture to dynamically synchronize local component states with the browser URL address string. This solves the filter reset bug on hard refresh and allows link sharing with active filters.

Component-Level Enhancements:

  1. src/components/home/ResourcesTabs.tsx: Integrated Next.js navigation primitives to bind active resource categories and sub-tabs directly into matching query tokens.
  2. src/app/resources/page.tsx: Wrapped the <Resources /> element layout inside a robust React <Suspense> boundary block. This layout adjustment explicitly resolves Next.js client-side useSearchParams de-optimization warnings during production builds.

State & Build Integrity:

  • Hydration Safety: Configured an asynchronous useEffect trigger framework to cleanly read parameters ON MOUNT, instantly re-populating the UI state checkboxes/tabs upon a hard reload.
  • Scroll Preservation: Implemented router.push(newUrl, { scroll: false }) to fluidly update the browser address bar dynamically without triggering aggressive document scroll jumping.
  • Validation: Verified via local execution (npm run build). Clean compilation accomplished with 0 build errors or TypeScript lint exceptions.

@github-actions github-actions Bot added gssoc26 This is a official GirlScript Summer of Code label. level:intermediate Intermediate level issues type:bug type:feature labels Jun 21, 2026

@Aditya948351 Aditya948351 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent job Fixing the URL link syncing makes the page much better I am approving this.

Looking towards your great change in this, adding a quality:clean label to this PR.

Appreciable work @shivani11jadhav on this repo, Keep growing and Contributing!

@Aditya948351 Aditya948351 merged commit 66c3ae1 into devpathindcommunity-india:master Jun 21, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved give 50+ base points gssoc26 This is a official GirlScript Summer of Code label. level:intermediate Intermediate level issues quality:clean type:bug type:feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Query Parameters Not Syncing with UI State and Filter Reset Glitch on Page Reload

2 participants