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

[Cases] Enhance Multi Select Component Interface for Custom Fields #171102

Merged
merged 5 commits into from
Nov 14, 2023

Conversation

jcger
Copy link
Contributor

@jcger jcger commented Nov 13, 2023

Meta issue: #167651

Summary

We need to make a small update to our multi select component. Right now, it only allows options with labels, but for custom fields, we might have situations where different fields have the same label. So, we're going to adjust it to work with options that have both {key, label}.

For our system filters (status, category, severity, ...) we'll keep using the label as the key. This is important because it helps us maintain our current way of handling the global state of our filters without any issues

QA

An exhaustive QA is not required for this PR, as it's only going into a feature branch. The filters should continue working

@jcger jcger added release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.12.0 labels Nov 13, 2023
@jcger jcger marked this pull request as ready for review November 13, 2023 14:56
@jcger jcger requested a review from a team as a code owner November 13, 2023 14:56
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@jcger jcger changed the title [Cases] Enhance Multi Select Component Interafce for Custom Fields [Cases] Enhance Multi Select Component Interface for Custom Fields Nov 13, 2023
@jcger jcger added the Feature:Cases Cases feature label Nov 13, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops-cases (Feature:Cases)

const fromRawOptionsToEuiSelectableOptions = (options: string[], selectedOptions: string[]) => {
type FilterOption<T extends string> = EuiSelectableOption<{
key: string;
label: T;
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible for the label to be something else from a string?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

CaseStatuses and CaseSeverities

@jcger jcger merged commit 120c0bd into elastic:cases/167651 Nov 14, 2023
@kibana-ci
Copy link
Collaborator

kibana-ci commented Nov 14, 2023

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] Serverless Osquery Cypress Tests #3 / App Features for Security Essentials PLI response actions should not be available response actions should not be available
  • [job] [logs] FTR Configs #33 / management index management index templates get all should list all the index templates with the expected parameters
  • [job] [logs] FTR Configs #33 / management index management index templates get all should list all the index templates with the expected parameters

Metrics [docs]

‼️ ERROR: no builds found for mergeBase sha [ac0bdb3]

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

jcger added a commit that referenced this pull request Dec 4, 2023
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Cases Cases feature release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants