-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Cases] Refactor Cases List Filters #169371
[Cases] Refactor Cases List Filters #169371
Conversation
…67651-filters-refactor
…na into issue-167651-filters-refactor
x-pack/plugins/cases/public/components/all_cases/all_cases_list.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/cases/public/components/all_cases/multi_select_filter.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/cases/public/components/all_cases/multi_select_filter.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/cases/public/components/all_cases/multi_select_filter.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/cases/public/components/all_cases/multi_select_filter.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/cases/public/components/all_cases/multi_select_filter.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/cases/public/components/all_cases/severity_filter.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/cases/public/components/all_cases/status_filter.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/cases/public/components/all_cases/translations.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/cases/public/components/all_cases/utils/sanitize_filter_options.tsx
Outdated
Show resolved
Hide resolved
…na into issue-167651-filters-refactor
expect(onFilterChanged).toBeCalledWith({ status: [CaseStatuses.closed] }); | ||
}); | ||
|
||
it('should remove tag from selected tags when tag no longer exists', () => { |
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.
this tests removed here are tested in the multi select filter component now
Pinging @elastic/response-ops (Team:ResponseOps) |
Pinging @elastic/response-ops-cases (Feature:Cases) |
x-pack/plugins/cases/public/components/all_cases/multi_select_filter.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/cases/public/components/all_cases/utils/sanitize_filter_options.tsx
Show resolved
Hide resolved
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.
Working fine!
I tested the following:
- Multiple filter selection
- Max filter selection
- Having old values in the localstorage
- URL
- Selector view
Left some small comments 👍
x-pack/plugins/cases/public/components/all_cases/multi_select_filter.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/cases/public/components/all_cases/multi_select_filter.test.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/cases/public/components/all_cases/multi_select_filter.test.tsx
Show resolved
Hide resolved
x-pack/plugins/cases/public/components/all_cases/use_all_cases_state.test.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/cases/public/components/all_cases/utils/serialize_url_params.tsx
Outdated
Show resolved
Hide resolved
@@ -222,23 +158,23 @@ const CasesTableFiltersComponent = ({ | |||
onSelectionChange={handleSelectedAssignees} | |||
/> | |||
) : null} | |||
<FilterPopover | |||
<MultiSelectFilter |
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.
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.
Yes, we decided that a couple of releases ago to reduce the space. The same occurs with the Solution filter. @jcger That reminded me that we did not convert the filter to the new component. Should we do it? (on another PR)
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.
I tested with legacy filters (URL and local storage) and is working as expected. I left some minor comments.
x-pack/plugins/cases/public/components/all_cases/multi_select_filter.test.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/cases/public/components/all_cases/multi_select_filter.tsx
Show resolved
Hide resolved
x-pack/plugins/cases/public/components/all_cases/multi_select_filter.test.tsx
Show resolved
Hide resolved
x-pack/plugins/cases/public/components/all_cases/utils/sanitize_filter_options.tsx
Show resolved
Hide resolved
x-pack/plugins/cases/public/components/all_cases/utils/serialize_url_params.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/cases/public/components/all_cases/utils/serialize_url_params.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/cases/public/components/all_cases/utils/sanitize_filter_options.test.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/cases/public/components/all_cases/utils/sanitize_filter_options.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/cases/public/components/all_cases/utils/sanitize_filter_options.tsx
Outdated
Show resolved
Hide resolved
…filter.tsx Co-authored-by: Antonio <[email protected]>
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.
Verified locally, works as expected 👍 Nice work!! 🎉
…na into issue-167651-filters-refactor
💔 Build FailedFailed CI StepsMetrics [docs]
History
To update your PR or re-run it, just comment with: |
…lds (#172276) Meta issue #167651 Fixes: #167651 ## Summary Previous PRs merged into this feature branch: - #169356 - #169371 - #170851 - #171102 - #171176 ## Release notes Case list filter bar can now be customised. Filters can be removed and custom fields can be used as filters ## Pending issues - Table in modal shouldn’t load in local storage saved filter options of status/severity - Status & Severity filters in url. Filters must be activated if the user has them deactivated - UI overflow when to much filters are active - Race condition: When a user has a custom field active with an option selected and this custom field gets removed in settings, it includes the removed custom field when refreshing. This request will fail, triggering a second one which won't include the removed custom field - Found during QA. In the modal, when trying to select all options in the solutions filter, when checking the last unchecked option, it resets and there is no checked option anymore ## Flaky test runner link https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4128 --------- Co-authored-by: Antonio <[email protected]> Co-authored-by: kibanamachine <[email protected]>
Meta #167651
Description
This PR refactors the filters to be multi select
QA