Fix issues with basic visibility filters#928
Draft
adhityamamallan wants to merge 5 commits intocadence-workflow:masterfrom
Draft
Fix issues with basic visibility filters#928adhityamamallan wants to merge 5 commits intocadence-workflow:masterfrom
adhityamamallan wants to merge 5 commits intocadence-workflow:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes filter visibility logic in the basic workflows view and corrects time-range parameters in the advanced workflows view.
- In the advanced view, use the correct
timeRangeStart/timeRangeEndquery keys and update the effect dependencies. - In the basic view, integrate the shared
usePageFiltershook to combine manual search filters with page filters, pass anareAnyFiltersActiveflag to the table, and update error-panel logic/tests accordingly.
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/views/domain-workflows-advanced/domain-workflows-advanced.tsx | Switched from timeRangeStartBasic/timeRangeEndBasic to generic query keys and updated dependencies. |
| src/views/domain-workflows-basic/domain-workflows-basic.tsx | Added usePageFilters hook, wired props into filters and table. |
| src/views/domain-workflows-basic/domain-workflows-basic-table/helpers/get-workflows-basic-error-panel-props.ts | Renamed parameter to areAnyFiltersActive and adjusted logic. |
| src/views/domain-workflows-basic/domain-workflows-basic-table/domain-workflows-basic-table.types.ts | Added new areAnyFiltersActive prop. |
| src/views/domain-workflows-basic/domain-workflows-basic-table/domain-workflows-basic-table.tsx | Removed old query-param hook, now uses the passed-in filters flag. |
| src/views/domain-workflows-basic/domain-workflows-basic-filters/domain-workflows-basic-filters.types.ts | Introduced a Props type based on usePageFilters return value. |
| src/views/domain-workflows-basic/domain-workflows-basic-filters/domain-workflows-basic-filters.tsx | Switched the filters component to accept injected usePageFilters props. |
| Multiple test files | Updated tests to pass the new flag and renamed parameter in tests. |
Comments suppressed due to low confidence (3)
src/views/domain-workflows-basic/domain-workflows-basic-table/domain-workflows-basic-table.types.ts:7
- [nitpick] Consider renaming
areAnyFiltersActivetohasActiveFiltersorisFilterActivefor improved readability and consistency with boolean naming conventions.
areAnyFiltersActive: boolean;
src/views/domain-workflows-basic/domain-workflows-basic-filters/domain-workflows-basic-filters.tsx:5
- The component uses
domainPageQueryParamsConfiginPageFiltersSearchbut there’s no import for it; addimport domainPageQueryParamsConfig from '../domain-page/config/domain-page-query-params.config';.
import PageFiltersSearch from '@/components/page-filters/page-filters-search/page-filters-search';
src/views/domain-workflows-basic/domain-workflows-basic-filters/domain-workflows-basic-filters.types.ts:1
- You cannot use
typeof usePageFilterson a type-only import; either import the hook as a value (import usePageFilters from ...) or change the Props type toReturnType<usePageFilters>withouttypeof.
import type usePageFilters from '@/components/page-filters/hooks/use-page-filters';
|
nice Catch |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
areSearchParamsAbsentforgetWorkflowsBasicErrorPanelPropstohasActiveSearchParamsTest plan
Updated unit tests + ran locally.
Before
After