-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.x] [Security Solution] Display readonly placeholders when field va…
…lue is empty (#203826) (#204279) # Backport This will backport the following commits from `main` to `8.x`: - [[Security Solution] Display readonly placeholders when field value is empty (#203826)](#203826) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Nikita Indik","email":"nikita.indik@elastic.co"},"sourceCommit":{"committedDate":"2024-12-13T20:06:40Z","message":"[Security Solution] Display readonly placeholders when field value is empty (#203826)\n\n**Partially addresses: https://github.com/elastic/kibana/issues/171520**\r\n\r\n## Summary\r\nThis PR updates readonly components of the Rule Upgrade flyout to\r\ndisplay placeholders in cases when a field value is empty.\r\n\r\n## Changes\r\n - Added placeholders to readonly components in the Rule Upgrade flyout\r\n- Simplified Storybook stories to make them more readable and less\r\ndependent on flyout context\r\n- Added stories that showcase empty states. You can run Storybook with\r\n`yarn storybook security_solution`.\r\n\r\n## Screenshots\r\n**Before / After**\r\n<img width=\"2560\" alt=\"Schermafbeelding 2024-12-12 om 00 05 56\"\r\nsrc=\"https://github.com/user-attachments/assets/e85a4514-4861-4be7-b0d2-534f7ad2d8cf\"\r\n/>\r\n\r\nWork started on 11-Dec-2024","sha":"27fe7e49e53807597ab47aca7ecfe40ac8d6e5fd","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rule Management","Feature:Prebuilt Detection Rules","backport:version","v8.18.0"],"title":"[Security Solution] Display readonly placeholders when field value is empty","number":203826,"url":"https://github.com/elastic/kibana/pull/203826","mergeCommit":{"message":"[Security Solution] Display readonly placeholders when field value is empty (#203826)\n\n**Partially addresses: https://github.com/elastic/kibana/issues/171520**\r\n\r\n## Summary\r\nThis PR updates readonly components of the Rule Upgrade flyout to\r\ndisplay placeholders in cases when a field value is empty.\r\n\r\n## Changes\r\n - Added placeholders to readonly components in the Rule Upgrade flyout\r\n- Simplified Storybook stories to make them more readable and less\r\ndependent on flyout context\r\n- Added stories that showcase empty states. You can run Storybook with\r\n`yarn storybook security_solution`.\r\n\r\n## Screenshots\r\n**Before / After**\r\n<img width=\"2560\" alt=\"Schermafbeelding 2024-12-12 om 00 05 56\"\r\nsrc=\"https://github.com/user-attachments/assets/e85a4514-4861-4be7-b0d2-534f7ad2d8cf\"\r\n/>\r\n\r\nWork started on 11-Dec-2024","sha":"27fe7e49e53807597ab47aca7ecfe40ac8d6e5fd"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/203826","number":203826,"mergeCommit":{"message":"[Security Solution] Display readonly placeholders when field value is empty (#203826)\n\n**Partially addresses: https://github.com/elastic/kibana/issues/171520**\r\n\r\n## Summary\r\nThis PR updates readonly components of the Rule Upgrade flyout to\r\ndisplay placeholders in cases when a field value is empty.\r\n\r\n## Changes\r\n - Added placeholders to readonly components in the Rule Upgrade flyout\r\n- Simplified Storybook stories to make them more readable and less\r\ndependent on flyout context\r\n- Added stories that showcase empty states. You can run Storybook with\r\n`yarn storybook security_solution`.\r\n\r\n## Screenshots\r\n**Before / After**\r\n<img width=\"2560\" alt=\"Schermafbeelding 2024-12-12 om 00 05 56\"\r\nsrc=\"https://github.com/user-attachments/assets/e85a4514-4861-4be7-b0d2-534f7ad2d8cf\"\r\n/>\r\n\r\nWork started on 11-Dec-2024","sha":"27fe7e49e53807597ab47aca7ecfe40ac8d6e5fd"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Nikita Indik <nikita.indik@elastic.co>
- Loading branch information
1 parent
12ecdde
commit 4ffca46
Showing
65 changed files
with
568 additions
and
1,236 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
18 changes: 18 additions & 0 deletions
18
...e_way_diff/final_readonly/empty_field_value_placeholder/empty_field_value_placeholder.tsx
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { EuiText } from '@elastic/eui'; | ||
import * as i18n from './translations'; | ||
|
||
export function EmptyFieldValuePlaceholder() { | ||
return ( | ||
<EuiText size="s" color="subdued"> | ||
{`<${i18n.EMPTY_FIELD_VALUE_PLACEHOLDER}>`} | ||
</EuiText> | ||
); | ||
} |
8 changes: 8 additions & 0 deletions
8
...onents/rule_details/three_way_diff/final_readonly/empty_field_value_placeholder/index.tsx
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
export { EmptyFieldValuePlaceholder } from './empty_field_value_placeholder'; |
15 changes: 15 additions & 0 deletions
15
.../rule_details/three_way_diff/final_readonly/empty_field_value_placeholder/translations.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { i18n } from '@kbn/i18n'; | ||
|
||
export const EMPTY_FIELD_VALUE_PLACEHOLDER = i18n.translate( | ||
'xpack.securitySolution.detectionEngine.rules.upgradeRules.emptyFieldValuePlaceholder', | ||
{ | ||
defaultMessage: 'Field value is empty', | ||
} | ||
); |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.