kibana/packages/kbn-securitysolution-exception-list-components
Kibana Machine 5fdada7819
[8.6] [Security Solution]: List details page fix Linked Rules max height (#147039) (#147054)
# Backport

This will backport the following commits from `main` to `8.6`:
- [[Security Solution]: List details page fix Linked Rules max height
(#147039)](https://github.com/elastic/kibana/pull/147039)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Wafaa
Nasr","email":"wafaa.nasr@elastic.co"},"sourceCommit":{"committedDate":"2022-12-05T21:02:05Z","message":"[Security
Solution]: List details page fix Linked Rules max height (#147039)\n\n##
Summary\r\n\r\n- Applying a max-height to the `Linked Rules` combobox in
the List\r\nShared details as well as in the Add Exception
Items","sha":"81635fca7300ca81b9fc87c2c3a754e7851a5c30","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:prev-minor","ci:cloud-deploy","v8.7.0"],"number":147039,"url":"https://github.com/elastic/kibana/pull/147039","mergeCommit":{"message":"[Security
Solution]: List details page fix Linked Rules max height (#147039)\n\n##
Summary\r\n\r\n- Applying a max-height to the `Linked Rules` combobox in
the List\r\nShared details as well as in the Add Exception
Items","sha":"81635fca7300ca81b9fc87c2c3a754e7851a5c30"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/147039","number":147039,"mergeCommit":{"message":"[Security
Solution]: List details page fix Linked Rules max height (#147039)\n\n##
Summary\r\n\r\n- Applying a max-height to the `Linked Rules` combobox in
the List\r\nShared details as well as in the Add Exception
Items","sha":"81635fca7300ca81b9fc87c2c3a754e7851a5c30"}}]}] BACKPORT-->

Co-authored-by: Wafaa Nasr <wafaa.nasr@elastic.co>
2022-12-05 15:37:45 -07:00
..
src [8.6] [Security Solution]: List details page fix Linked Rules max height (#147039) (#147054) 2022-12-05 15:37:45 -07:00
BUILD.bazel [auto] migrate existing plugin/package configs 2022-10-28 14:06:46 -05:00
index.ts [8.6] [Security Solution][Exception]: Add to shared lists fixes (#146750) (#146887) 2022-12-02 11:49:00 -07:00
jest.config.js [Security Solution][Exceptions] - Create/ refactor Exception-List common's components in @kbn/securitysolution-exception-list-components (#143363) 2022-10-19 19:33:17 +02:00
kibana.jsonc Exceptions List component (#140985) 2022-09-28 20:36:05 +02:00
package.json [auto] migrate existing plugin/package configs 2022-10-28 14:06:46 -05:00
README.md [Security Solution][Exceptions] - Create/ refactor Exception-List common's components in @kbn/securitysolution-exception-list-components (#143363) 2022-10-19 19:33:17 +02:00
setup_test.ts Exceptions List component (#140985) 2022-09-28 20:36:05 +02:00
tsconfig.json fix(NA): wrongly spread stripInternal and rootDir configs across packages (#144463) 2022-11-03 01:04:55 +00:00

@kbn/securitysolution-exception-list-components

Common exceptions' components

Aim

  • To have most of the Exceptions' components in one place, to be shared accross multiple pages and used for different logic.
  • This package holds the presetational part of the components only as the API or the logic part should reside under the consumer page

Pattern used

component
    index.tsx
    index.styles.ts <-- to hold styles if the component has many custom styles
    use_component.ts <-- for logic if the Presentational Component has logic
    component.test.tsx
    use_component.test.tsx
  

Testing

In order to unify our testing tools, we configured only two libraries, the React-Testing-Library to test the component UI part and the Reat-Testing-Hooks to test the component's UI interactions

Styling

In order to follow the KBN-Packages's recommendations, to define a custom CSS we can only use the @emotion/react or @emotion/css libraries

Next

  • Now the ExceptionItems, ExceptionItemCard and ExceptionItemCardMetaInfo receive securityLinkAnchorComponent, exceptionsUtilityComponent , and exceptionsUtilityComponent as props to avoid moving all the common components under the x-pack at once, later we should move all building blocks to this kbn-package