Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated-filters #221

Merged
merged 9 commits into from
Aug 31, 2024
Merged

updated-filters #221

merged 9 commits into from
Aug 31, 2024

Conversation

aakash2330
Copy link
Contributor

@aakash2330 aakash2330 commented Aug 18, 2024

Improvements to Filters and Data Fetching Logic

1. Optimized Filter Changing Params and Data Fetching Logic

  • Removed Submit Button Requirement:

    • No longer necessary to use a submit button to apply filters, especially when searching by title or company name (with debouncing).
  • Old Logic:

    • The previous logic to update query params was to call an action that would redirect the user to a page with updated params. Then, the updated data would be fetched.

    Old Logic

    • This approach was suboptimal as it led to unnecessary backend calls.
  • New Logic:

    • Replaced the old approach with a hook (useSetQueryParams) to redirect the user with the correct params from the client side only.
  • Zod Safety Implementation:

    • Added Zod safety to search params, including transformation to the required format. Now there's no need to convert data from URL params to the correct format manually—Zod handles it.

2. Enhanced Filter CSS for Better User Experience

  • Before: Users needed to scroll to see even the expanded filters.

    Earlier Filters

  • Now: The filter section will adjust its size accordingly for better visibility.

    Improved Filters

@VineeTagarwaL-code
Copy link
Collaborator

damm this is nice pr, fix conflict , good bounty for this

@aakash2330
Copy link
Contributor Author

done

damm this is nice pr, fix conflict , good bounty for this

.gitignore Outdated Show resolved Hide resolved
@VineeTagarwaL-code VineeTagarwaL-code merged commit 0401a3b into code100x:main Aug 31, 2024
@aakash2330 aakash2330 deleted the updated-filters branch September 1, 2024 06:30
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.

2 participants