-
Notifications
You must be signed in to change notification settings - Fork 941
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
feat: Add Server-side Filtering to the Surveys Page #2277
feat: Add Server-side Filtering to the Surveys Page #2277
Conversation
@gupta-piyush19 is attempting to deploy a commit to the formbricks Team on Vercel. A member of the Team first needs to authorize it. |
Thank you for following the naming conventions for pull request titles! 🙏 |
…piyush/for-2026-add-server-side-filtering-to-the-surveys-page
…piyush/for-2026-add-server-side-filtering-to-the-surveys-page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @gupta-piyush19 , looks pretty good and works super well 🚀😊
Noticed some minor issues
- Load more button disappears after clearing filters
Screen-Recording-2024-04-03-at-1.37.48.PM.mp4
- When deleting a survey, survey list is not updated with a newer survey (still having more surveys on next page)
Screen-Recording-2024-04-03-at-1.40.07.PM.mp4
- As you can see in the video below, on initial load grid view is selected but I still see the list view and when i click on list view button, it does not respond 🤔
Screen-Recording-2024-04-03-at-1.55.22.PM.mp4
@@ -547,4 +547,27 @@ export interface TSurveyQuestionSummary<T> { | |||
}[]; | |||
} | |||
|
|||
export const ZSurveyFilterCriteria = z.object({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to eliminate one from TSurveyFilter
and TSurveyFilterCriteria
, looks quite similar 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, these two are very similar, but one is being used for client-side filtering types and the other is for server-side filter types. It would be a bit hacky to use one at both places. We can discuss if it needs to be fixed or if we can rename the types to make them more meaningful.
…piyush/for-2026-add-server-side-filtering-to-the-surveys-page
…piyush/for-2026-add-server-side-filtering-to-the-surveys-page
…piyush/for-2026-add-server-side-filtering-to-the-surveys-page
…piyush/for-2026-add-server-side-filtering-to-the-surveys-page
@Dhruwang Thanks for the review 🚀
Should we fetch one more response? The user can still click on |
…or-2026-add-server-side-filtering-to-the-surveys-page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gupta-piyush19 Looks and works great! :-)
I just made smaller bugfixes and increased the debounce limit as well as well as the surveys per page :-) Great job! 👏
You can merge as soon as @Dhruwang gives his approval :-)
…-the-surveys-page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 😊🚀
What does this PR do?
Add Server-side Filtering to the Surveys Page
Fixes
https://linear.app/formbricks/issue/FOR-2026/add-server-side-filtering-to-the-surveys-page
#2377
How should this be tested?
Checklist
Required
pnpm build
console.logs
git pull origin main
Appreciated