-
Notifications
You must be signed in to change notification settings - Fork 967
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
Merged
Dhruwang
merged 14 commits into
formbricks:main
from
gupta-piyush19:piyush/for-2026-add-server-side-filtering-to-the-surveys-page
Apr 11, 2024
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
96dee8c
feat: server side filtering for serverlist
gupta-piyush19 19cbeca
filtering logic
gupta-piyush19 2554ba9
Merge branch 'main' of https://github.com/formbricks/formbricks into …
gupta-piyush19 de094c6
refactor
gupta-piyush19 a981fe9
Merge branch 'main' of https://github.com/formbricks/formbricks into …
gupta-piyush19 7b71392
Merge branch 'main' of https://github.com/formbricks/formbricks into …
gupta-piyush19 63ff7cd
Merge branch 'main' of https://github.com/formbricks/formbricks into …
gupta-piyush19 9203696
Merge branch 'main' of https://github.com/formbricks/formbricks into …
gupta-piyush19 918609b
Merge branch 'main' of https://github.com/formbricks/formbricks into …
gupta-piyush19 72b1b23
PR review fixes
gupta-piyush19 cf3fb3f
Merge branch 'main' of github.com:formbricks/formbricks into piyush/f…
mattinannt 244a802
fix scheduled surveys, fix ui bug in list with long names, change SUR…
mattinannt 275c338
increase debouncer time limit to better work with slower typing speed
mattinannt f3ced3d
Merge branch 'main' into piyush/for-2026-add-server-side-filtering-to…
Dhruwang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { TSortOption, TSurveyFilters } from "@formbricks/types/surveys"; | ||
|
||
import { DropdownMenuItem } from "../../DropdownMenu"; | ||
|
||
interface SortOptionProps { | ||
option: TSortOption; | ||
sortBy: TSurveyFilters["sortBy"]; | ||
handleSortChange: (option: TSortOption) => void; | ||
} | ||
|
||
export const SortOption = ({ option, sortBy, handleSortChange }: SortOptionProps) => ( | ||
<DropdownMenuItem | ||
key={option.label} | ||
className="m-0 p-0" | ||
onClick={() => { | ||
handleSortChange(option); | ||
}}> | ||
<div className="flex h-full w-full items-center space-x-2 px-2 py-1 hover:bg-slate-700"> | ||
<span | ||
className={`h-4 w-4 rounded-full border ${sortBy === option.value ? "bg-brand-dark outline-brand-dark border-slate-900 outline" : "border-white"}`}></span> | ||
<p className="font-normal text-white">{option.label}</p> | ||
</div> | ||
</DropdownMenuItem> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
andTSurveyFilterCriteria
, 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.