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

Added filter_query to filter builder #355

Merged
merged 6 commits into from
Nov 7, 2024

Conversation

praveen5959
Copy link
Contributor

@praveen5959 praveen5959 commented Nov 4, 2024

Added filter_query to all types of filters.

Testing Scenarios:

  1. When the query is present in the query parameter, and the page is refreshed:
    Current Behavior: The query is applied but it shows filter type as SQL
    Expected Behavior: The query should be applied with appropriate filter type view in the filter section.
  2. When a filter is saved:
    Current Behavior: filter_builder is being sent in the payload.
    Expected Behavior: filter_builder will not be sent, instead filter_query will have the query.
  3. When a filter is saved:
    Current Behavior: filter_builder is being sent in the payload.
    Expected Behavior: filter_builder will not be sent, instead filter_query will have the query.
  4. When a saved filter is applied:
    Current Behavior: The filter query is applied but it always shows the filter view as SQL mode.
    Expected Behavior: The filter should be applied as per the filter type and the respective view should be showed in the filter bar.
  5. Editing a saved filter:
    Current Behavior: filter_builder field is sent as per the filter_type in the PUT call
    Expected Behavior: filter_builder field will not be sent in the PUT call
  6. New URL query parameter on filter application:
    Expected Behavior: A new URL query parameter should be added to represent filter_type when a filter is applied, to track and maintain the filter type within the URL.

Copy link
Contributor

@Koustavd18 Koustavd18 left a comment

Choose a reason for hiding this comment

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

filter_query should not be optional field for createSavedFilterType

src/@types/parseable/api/savedFilters.ts Outdated Show resolved Hide resolved
src/pages/Stream/utils.ts Outdated Show resolved Hide resolved
src/pages/Stream/hooks/useParamsController.ts Outdated Show resolved Hide resolved
src/pages/Stream/utils.ts Outdated Show resolved Hide resolved
src/hooks/useSavedFilters.tsx Outdated Show resolved Hide resolved
src/pages/Stream/components/Querier/FilterQueryBuilder.tsx Outdated Show resolved Hide resolved
@praveen5959 praveen5959 self-assigned this Nov 6, 2024
Koustavd18
Koustavd18 previously approved these changes Nov 6, 2024
Copy link
Contributor

@nikhilsinhaparseable nikhilsinhaparseable left a comment

Choose a reason for hiding this comment

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

good to merge

@nitisht nitisht merged commit 8fa09a8 into parseablehq:main Nov 7, 2024
6 of 7 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants