From c28d802f6388861ac24b7a46c06679e5ef4bd955 Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Thu, 21 Jul 2022 09:18:38 -0700 Subject: [PATCH 01/20] Upgrade to v62.0.3 --- package.json | 2 +- src/dev/license_checker/config.ts | 2 +- yarn.lock | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 6ba3c8023e4c1..fded60ec73d32 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,7 @@ "@elastic/datemath": "5.0.3", "@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@8.3.0-canary.1", "@elastic/ems-client": "8.3.3", - "@elastic/eui": "60.3.0", + "@elastic/eui": "62.0.3", "@elastic/filesaver": "1.1.2", "@elastic/node-crypto": "1.2.1", "@elastic/numeral": "^2.5.1", diff --git a/src/dev/license_checker/config.ts b/src/dev/license_checker/config.ts index 6e26bf1f2af63..02649c2fc5b88 100644 --- a/src/dev/license_checker/config.ts +++ b/src/dev/license_checker/config.ts @@ -83,6 +83,6 @@ export const LICENSE_OVERRIDES = { 'jsts@1.6.2': ['Eclipse Distribution License - v 1.0'], // cf. https://github.com/bjornharrtell/jsts '@mapbox/jsonlint-lines-primitives@2.0.2': ['MIT'], // license in readme https://github.com/tmcw/jsonlint '@elastic/ems-client@8.3.3': ['Elastic License 2.0'], - '@elastic/eui@60.3.0': ['SSPL-1.0 OR Elastic License 2.0'], + '@elastic/eui@62.0.3': ['SSPL-1.0 OR Elastic License 2.0'], 'language-subtag-registry@0.3.21': ['CC-BY-4.0'], // retired ODC‑By license https://github.com/mattcg/language-subtag-registry }; diff --git a/yarn.lock b/yarn.lock index 1d8d2f8529d5b..f1aa95ae79111 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1518,10 +1518,10 @@ resolved "https://registry.yarnpkg.com/@elastic/eslint-plugin-eui/-/eslint-plugin-eui-0.0.2.tgz#56b9ef03984a05cc213772ae3713ea8ef47b0314" integrity sha512-IoxURM5zraoQ7C8f+mJb9HYSENiZGgRVcG4tLQxE61yHNNRDXtGDWTZh8N1KIHcsqN1CEPETjuzBXkJYF/fDiQ== -"@elastic/eui@60.3.0": - version "60.3.0" - resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-60.3.0.tgz#4f37da941c70ede09801cd855e157aeb8a1d60bd" - integrity sha512-0cZUwhZzJ+NRkQv8Clw239GIQYs5/r//P4ocOK48cgGXAs4ZzS+EQq8Csc/ZY0FNsIyRHo9zlnIfmhS2Ck+/5w== +"@elastic/eui@62.0.3": + version "62.0.3" + resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-62.0.3.tgz#502f031e20bb67f544965c69d22532aa5ec273c2" + integrity sha512-CAAM73oRpkVAv/BVvgu4eTQOPZJCTOYu+omLG3OxhPLCSLlcxnESvlbKueMEBztOEipBbAEfjcydALLcGCmMmw== dependencies: "@types/chroma-js" "^2.0.0" "@types/lodash" "^4.14.160" From 622e76f30f2d9ee29ac77adede0c8e16b8be535e Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Wed, 27 Jul 2022 08:53:06 -0700 Subject: [PATCH 02/20] Update EUI i18n tokens --- .../__snapshots__/i18n_service.test.tsx.snap | 12 +++-- .../src/i18n_eui_mapping.tsx | 50 +++++++++++++++---- .../translations/translations/fr-FR.json | 2 - .../translations/translations/ja-JP.json | 2 - .../translations/translations/zh-CN.json | 2 - 5 files changed, 48 insertions(+), 20 deletions(-) diff --git a/packages/core/i18n/core-i18n-browser-internal/src/__snapshots__/i18n_service.test.tsx.snap b/packages/core/i18n/core-i18n-browser-internal/src/__snapshots__/i18n_service.test.tsx.snap index 58ef0d67aa8a2..a75ef5540fd89 100644 --- a/packages/core/i18n/core-i18n-browser-internal/src/__snapshots__/i18n_service.test.tsx.snap +++ b/packages/core/i18n/core-i18n-browser-internal/src/__snapshots__/i18n_service.test.tsx.snap @@ -88,7 +88,13 @@ exports[`#start() returns \`Context\` component 1`] = ` "euiDataGridCell.position": [Function], "euiDataGridCellActions.expandButtonTitle": "Click or hit enter to interact with cell content", "euiDataGridHeaderCell.actionsPopoverScreenReaderText": "To navigate through the list of column actions, press the Tab or Up and Down arrow keys.", - "euiDataGridHeaderCell.headerActions": "Header actions", + "euiDataGridHeaderCell.headerActions": "Click to view column header actions", + "euiDataGridHeaderCell.sortedByAscendingFirst": [Function], + "euiDataGridHeaderCell.sortedByAscendingMultiple": [Function], + "euiDataGridHeaderCell.sortedByAscendingSingle": "Sorted ascending", + "euiDataGridHeaderCell.sortedByDescendingFirst": [Function], + "euiDataGridHeaderCell.sortedByDescendingMultiple": [Function], + "euiDataGridHeaderCell.sortedByDescendingSingle": "Sorted descending", "euiDataGridPagination.detailedPaginationLabel": [Function], "euiDataGridPagination.paginationLabel": "Pagination for preceding grid", "euiDataGridSchema.booleanSortTextAsc": "False-True", @@ -139,8 +145,8 @@ exports[`#start() returns \`Context\` component 1`] = ` "euiHeaderLinks.appNavigation": "App menu", "euiHeaderLinks.openNavigationMenu": "Open menu", "euiHue.label": "Select the HSV color mode \\"hue\\" value", - "euiImage.closeImage": [Function], - "euiImage.openImage": [Function], + "euiImageButton.closeFullScreen": "Press Escape or click to close image fullscreen mode", + "euiImageButton.openFullScreen": "Click to open this image in fullscreen mode", "euiLink.external.ariaLabel": "External link", "euiLink.newTarget.screenReaderOnlyText": "(opens in a new tab or window)", "euiLoadingChart.ariaLabel": "Loading", diff --git a/packages/core/i18n/core-i18n-browser-internal/src/i18n_eui_mapping.tsx b/packages/core/i18n/core-i18n-browser-internal/src/i18n_eui_mapping.tsx index f4e3c2b2d7202..93e73d5272d5d 100644 --- a/packages/core/i18n/core-i18n-browser-internal/src/i18n_eui_mapping.tsx +++ b/packages/core/i18n/core-i18n-browser-internal/src/i18n_eui_mapping.tsx @@ -415,9 +415,41 @@ export const getEuiContextMapping = (): EuiTokensObject => { 'euiDataGridHeaderCell.headerActions': i18n.translate( 'core.euiDataGridHeaderCell.headerActions', { - defaultMessage: 'Header actions', + defaultMessage: 'Click to view column header actions', } ), + 'euiDataGridHeaderCell.sortedByAscendingSingle': i18n.translate( + 'core.euiDataGridHeaderCell.sortedByAscendingSingle', + { + defaultMessage: 'Sorted ascending', + } + ), + 'euiDataGridHeaderCell.sortedByDescendingSingle': i18n.translate( + 'core.euiDataGridHeaderCell.sortedByDescendingSingle', + { + defaultMessage: 'Sorted descending', + } + ), + 'euiDataGridHeaderCell.sortedByAscendingFirst': ({ columnId }: EuiValues) => + i18n.translate('core.euiDataGridHeaderCell.sortedByAscendingFirst', { + defaultMessage: 'Sorted by {columnId}, ascending', + values: { columnId }, + }), + 'euiDataGridHeaderCell.sortedByDescendingFirst': ({ columnId }: EuiValues) => + i18n.translate('core.euiDataGridHeaderCell.sortedByDescendingFirst', { + defaultMessage: 'Sorted by {columnId}, descending', + values: { columnId }, + }), + 'euiDataGridHeaderCell.sortedByAscendingMultiple': ({ columnId }: EuiValues) => + i18n.translate('core.euiDataGridHeaderCell.sortedByAscendingMultiple', { + defaultMessage: ', then sorted by {columnId}, ascending', + values: { columnId }, + }), + 'euiDataGridHeaderCell.sortedByDescendingMultiple': ({ columnId }: EuiValues) => + i18n.translate('core.euiDataGridHeaderCell.sortedByDescendingMultiple', { + defaultMessage: ', then sorted by {columnId}, descending', + values: { columnId }, + }), 'euiDataGridHeaderCell.actionsPopoverScreenReaderText': i18n.translate( 'core.euiDataGridHeaderCell.actionsPopoverScreenReaderText', { @@ -612,16 +644,12 @@ export const getEuiContextMapping = (): EuiTokensObject => { 'euiHue.label': i18n.translate('core.euiHue.label', { defaultMessage: 'Select the HSV color mode "hue" value', }), - 'euiImage.closeImage': ({ alt }: EuiValues) => - i18n.translate('core.euiImage.closeImage', { - defaultMessage: 'Close fullscreen {alt} image', - values: { alt }, - }), - 'euiImage.openImage': ({ alt }: EuiValues) => - i18n.translate('core.euiImage.openImage', { - defaultMessage: 'Open fullscreen {alt} image', - values: { alt }, - }), + 'euiImageButton.openFullScreen': i18n.translate('core.euiImageButton.openFullScreen', { + defaultMessage: 'Click to open this image in fullscreen mode', + }), + 'euiImageButton.closeFullScreen': i18n.translate('core.euiImageButton.closeFullScreen', { + defaultMessage: 'Press Escape or click to close image fullscreen mode', + }), 'euiLink.external.ariaLabel': i18n.translate('core.euiLink.external.ariaLabel', { defaultMessage: 'External link', }), diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 0c0ad52fb5098..dea9ea05379a2 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -1497,8 +1497,6 @@ "core.euiHeaderLinks.appNavigation": "Menu de l'application", "core.euiHeaderLinks.openNavigationMenu": "Ouvrir le menu", "core.euiHue.label": "Sélectionner la valeur \"hue\" du mode de couleur HSV", - "core.euiImage.closeImage": "Fermer l'image {alt} en plein écran", - "core.euiImage.openImage": "Ouvrir l'image {alt} en plein écran", "core.euiLink.external.ariaLabel": "Lien externe", "core.euiLink.newTarget.screenReaderOnlyText": "(s’ouvre dans un nouvel onglet ou une nouvelle fenêtre)", "core.euiLoadingChart.ariaLabel": "Chargement", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 36f3600229e5e..c0293ce34371a 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -1498,8 +1498,6 @@ "core.euiHeaderLinks.appNavigation": "アプリメニュー", "core.euiHeaderLinks.openNavigationMenu": "メニューを開く", "core.euiHue.label": "HSV カラーモードの「色相」値を選択", - "core.euiImage.closeImage": "全画面 {alt} 画像を閉じる", - "core.euiImage.openImage": "全画面 {alt} 画像を開く", "core.euiLink.external.ariaLabel": "外部リンク", "core.euiLink.newTarget.screenReaderOnlyText": "(新しいタブまたはウィンドウで開く)", "core.euiLoadingChart.ariaLabel": "読み込み中", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 504cf9541c7ce..5e07acddc7a59 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -1498,8 +1498,6 @@ "core.euiHeaderLinks.appNavigation": "应用菜单", "core.euiHeaderLinks.openNavigationMenu": "打开菜单", "core.euiHue.label": "选择 HSV 颜色模式“色调”值", - "core.euiImage.closeImage": "关闭全屏 {alt} 图像", - "core.euiImage.openImage": "打开全屏 {alt} 图像", "core.euiLink.external.ariaLabel": "外部链接", "core.euiLink.newTarget.screenReaderOnlyText": "(在新选项卡或窗口中打开)", "core.euiLoadingChart.ariaLabel": "正在加载", From 85d605e5f94d53a32cadc556a64a443380f13e14 Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Wed, 27 Jul 2022 09:09:42 -0700 Subject: [PATCH 03/20] Update html string snapshots - Emotion CSS hash changed --- .../components/legend/__snapshots__/legend.test.tsx.snap | 2 +- .../security/server/__snapshots__/prompt_page.test.tsx.snap | 4 ++-- .../__snapshots__/unauthenticated_page.test.tsx.snap | 2 +- .../__snapshots__/reset_session_page.test.tsx.snap | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/plugins/vis_types/vislib/public/vislib/components/legend/__snapshots__/legend.test.tsx.snap b/src/plugins/vis_types/vislib/public/vislib/components/legend/__snapshots__/legend.test.tsx.snap index cf397d408f1bc..b3c03c71e77d0 100644 --- a/src/plugins/vis_types/vislib/public/vislib/components/legend/__snapshots__/legend.test.tsx.snap +++ b/src/plugins/vis_types/vislib/public/vislib/components/legend/__snapshots__/legend.test.tsx.snap @@ -2,4 +2,4 @@ exports[`VisLegend Component Legend closed should match the snapshot 1`] = `"
"`; -exports[`VisLegend Component Legend open should match the snapshot 1`] = `"
"`; +exports[`VisLegend Component Legend open should match the snapshot 1`] = `"
"`; diff --git a/x-pack/plugins/security/server/__snapshots__/prompt_page.test.tsx.snap b/x-pack/plugins/security/server/__snapshots__/prompt_page.test.tsx.snap index 555ebf370b898..5d47c29bbfe31 100644 --- a/x-pack/plugins/security/server/__snapshots__/prompt_page.test.tsx.snap +++ b/x-pack/plugins/security/server/__snapshots__/prompt_page.test.tsx.snap @@ -1,5 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`PromptPage renders as expected with additional scripts 1`] = `"ElasticMockedFonts

Some Title

Some Body
Action#1
Action#2
"`; +exports[`PromptPage renders as expected with additional scripts 1`] = `"ElasticMockedFonts

Some Title

Some Body
Action#1
Action#2
"`; -exports[`PromptPage renders as expected without additional scripts 1`] = `"ElasticMockedFonts

Some Title

Some Body
Action#1
Action#2
"`; +exports[`PromptPage renders as expected without additional scripts 1`] = `"ElasticMockedFonts

Some Title

Some Body
Action#1
Action#2
"`; diff --git a/x-pack/plugins/security/server/authentication/__snapshots__/unauthenticated_page.test.tsx.snap b/x-pack/plugins/security/server/authentication/__snapshots__/unauthenticated_page.test.tsx.snap index 332491b1977aa..0613e241a6577 100644 --- a/x-pack/plugins/security/server/authentication/__snapshots__/unauthenticated_page.test.tsx.snap +++ b/x-pack/plugins/security/server/authentication/__snapshots__/unauthenticated_page.test.tsx.snap @@ -1,3 +1,3 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`UnauthenticatedPage renders as expected 1`] = `"ElasticMockedFonts

We couldn't log you in

We hit an authentication error. Please check your credentials and try again. If you still can't log in, contact your system administrator.

"`; +exports[`UnauthenticatedPage renders as expected 1`] = `"ElasticMockedFonts

We couldn't log you in

We hit an authentication error. Please check your credentials and try again. If you still can't log in, contact your system administrator.

"`; diff --git a/x-pack/plugins/security/server/authorization/__snapshots__/reset_session_page.test.tsx.snap b/x-pack/plugins/security/server/authorization/__snapshots__/reset_session_page.test.tsx.snap index 6d5b5e40d592c..b92fc6f68a20f 100644 --- a/x-pack/plugins/security/server/authorization/__snapshots__/reset_session_page.test.tsx.snap +++ b/x-pack/plugins/security/server/authorization/__snapshots__/reset_session_page.test.tsx.snap @@ -1,3 +1,3 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`ResetSessionPage renders as expected 1`] = `"ElasticMockedFonts

You do not have permission to access the requested page

Either go back to the previous page or log in as a different user.

"`; +exports[`ResetSessionPage renders as expected 1`] = `"ElasticMockedFonts

You do not have permission to access the requested page

Either go back to the previous page or log in as a different user.

"`; From 23a192295e06e7fadca8954b7b6299f0d1583091 Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Thu, 21 Jul 2022 09:23:52 -0700 Subject: [PATCH 04/20] [EuiIcon] Update instances of `keyboardShortcut` icons to `keyboard` --- .../vis_default_editor/public/components/sidebar/controls.tsx | 2 +- .../canvas/public/components/help_menu/help_menu.component.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/vis_default_editor/public/components/sidebar/controls.tsx b/src/plugins/vis_default_editor/public/components/sidebar/controls.tsx index abf88e665019f..3ae15ed24832d 100644 --- a/src/plugins/vis_default_editor/public/components/sidebar/controls.tsx +++ b/src/plugins/vis_default_editor/public/components/sidebar/controls.tsx @@ -97,7 +97,7 @@ function DefaultEditorControls({ content={i18n.translate('visDefaultEditor.sidebar.updateInfoTooltip', { defaultMessage: 'CTRL + Enter is a shortcut for Update.', })} - type="keyboardShortcut" + type="keyboard" color="subdued" /> diff --git a/x-pack/plugins/canvas/public/components/help_menu/help_menu.component.tsx b/x-pack/plugins/canvas/public/components/help_menu/help_menu.component.tsx index 96f63da6f4f7c..12ea40317d525 100644 --- a/x-pack/plugins/canvas/public/components/help_menu/help_menu.component.tsx +++ b/x-pack/plugins/canvas/public/components/help_menu/help_menu.component.tsx @@ -33,7 +33,7 @@ export const HelpMenu: FC = ({ hideHelpMenu, showKeyboardShortcutsDocFlyo {strings.getKeyboardShortcutsLinkLabel()} From 8c9639faa5bb823b9562d28bbdf552dc251168c0 Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Wed, 27 Jul 2022 17:50:42 -0700 Subject: [PATCH 05/20] [EuiErrorBoundary] Update snapshots from Emotion conversion --- .../charts/__snapshots__/chart_wrapper.test.tsx.snap | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x-pack/plugins/synthetics/public/legacy_uptime/components/common/charts/__snapshots__/chart_wrapper.test.tsx.snap b/x-pack/plugins/synthetics/public/legacy_uptime/components/common/charts/__snapshots__/chart_wrapper.test.tsx.snap index d8235765bda2d..0a690f5cd4284 100644 --- a/x-pack/plugins/synthetics/public/legacy_uptime/components/common/charts/__snapshots__/chart_wrapper.test.tsx.snap +++ b/x-pack/plugins/synthetics/public/legacy_uptime/components/common/charts/__snapshots__/chart_wrapper.test.tsx.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`ChartWrapper component renders the component with loading false 1`] = ` - +<_EuiErrorBoundary>
-
+ `; exports[`ChartWrapper component renders the component with loading true 1`] = ` - +<_EuiErrorBoundary>
- + `; From bfc763e383b06c8d7cf833c2a7f94e7e51b9030c Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Wed, 27 Jul 2022 13:05:41 -0700 Subject: [PATCH 06/20] [EuiImage] Update snapshots, tests, and CSS to account for Emotion conversion --- .../__snapshots__/no_data_card.test.tsx.snap | 20 +++++++++---------- .../dashboard_empty_screen.test.tsx.snap | 8 ++++---- .../__snapshots__/asset.stories.storyshot | 10 ++++------ .../asset_manager.stories.storyshot | 10 ++++------ .../plugins/canvas/public/style/hackery.scss | 2 +- .../step_image_popover.test.tsx | 2 +- .../ping_timestamp/step_image_popover.tsx | 2 +- 7 files changed, 25 insertions(+), 29 deletions(-) diff --git a/packages/shared-ux/card/no_data/impl/src/__snapshots__/no_data_card.test.tsx.snap b/packages/shared-ux/card/no_data/impl/src/__snapshots__/no_data_card.test.tsx.snap index a9f42dbf15296..949570f3e8b5a 100644 --- a/packages/shared-ux/card/no_data/impl/src/__snapshots__/no_data_card.test.tsx.snap +++ b/packages/shared-ux/card/no_data/impl/src/__snapshots__/no_data_card.test.tsx.snap @@ -12,11 +12,11 @@ exports[`NoDataCard props button 1`] = ` class="euiCard__image" >
@@ -86,11 +86,11 @@ exports[`NoDataCard props extends EuiCardProps 1`] = ` class="euiCard__image" >
@@ -160,11 +160,11 @@ exports[`NoDataCard props href 1`] = ` class="euiCard__image" >
@@ -234,11 +234,11 @@ exports[`NoDataCard props no access to Fleet 1`] = ` class="euiCard__image" >
@@ -293,11 +293,11 @@ exports[`NoDataCard renders 1`] = ` class="euiCard__image" >
diff --git a/src/plugins/dashboard/public/application/embeddable/empty_screen/__snapshots__/dashboard_empty_screen.test.tsx.snap b/src/plugins/dashboard/public/application/embeddable/empty_screen/__snapshots__/dashboard_empty_screen.test.tsx.snap index 544cdb7ae9bfb..b075e079466be 100644 --- a/src/plugins/dashboard/public/application/embeddable/empty_screen/__snapshots__/dashboard_empty_screen.test.tsx.snap +++ b/src/plugins/dashboard/public/application/embeddable/empty_screen/__snapshots__/dashboard_empty_screen.test.tsx.snap @@ -44,11 +44,11 @@ exports[`DashboardEmptyScreen renders correctly with readonly mode 1`] = ` role="main" >
@@ -85,11 +85,11 @@ exports[`DashboardEmptyScreen renders correctly with view mode 1`] = ` role="main" >
diff --git a/x-pack/plugins/canvas/public/components/asset_manager/__stories__/__snapshots__/asset.stories.storyshot b/x-pack/plugins/canvas/public/components/asset_manager/__stories__/__snapshots__/asset.stories.storyshot index b2bbe3ce5f0b4..1fc41ea8c0c33 100644 --- a/x-pack/plugins/canvas/public/components/asset_manager/__stories__/__snapshots__/asset.stories.storyshot +++ b/x-pack/plugins/canvas/public/components/asset_manager/__stories__/__snapshots__/asset.stories.storyshot @@ -18,13 +18,12 @@ exports[`Storyshots components/Assets/Asset airplane 1`] = ` className="canvasAsset__thumb canvasCheckered" >
Asset thumbnail
@@ -205,13 +204,12 @@ exports[`Storyshots components/Assets/Asset marker 1`] = ` className="canvasAsset__thumb canvasCheckered" >
Asset thumbnail
diff --git a/x-pack/plugins/canvas/public/components/asset_manager/__stories__/__snapshots__/asset_manager.stories.storyshot b/x-pack/plugins/canvas/public/components/asset_manager/__stories__/__snapshots__/asset_manager.stories.storyshot index eff6eb18580f0..841f5de8f2a9f 100644 --- a/x-pack/plugins/canvas/public/components/asset_manager/__stories__/__snapshots__/asset_manager.stories.storyshot +++ b/x-pack/plugins/canvas/public/components/asset_manager/__stories__/__snapshots__/asset_manager.stories.storyshot @@ -319,13 +319,12 @@ exports[`Storyshots components/Assets/AssetManager two assets 1`] = ` className="canvasAsset__thumb canvasCheckered" >
Asset thumbnail
@@ -495,13 +494,12 @@ exports[`Storyshots components/Assets/AssetManager two assets 1`] = ` className="canvasAsset__thumb canvasCheckered" >
Asset thumbnail
diff --git a/x-pack/plugins/canvas/public/style/hackery.scss b/x-pack/plugins/canvas/public/style/hackery.scss index a29e9846f8d43..706c5addf5273 100644 --- a/x-pack/plugins/canvas/public/style/hackery.scss +++ b/x-pack/plugins/canvas/public/style/hackery.scss @@ -24,7 +24,7 @@ // TODO: remove if fix is provided for https://github.com/elastic/eui/issues/833 // temp fix for SVGs not appearing in the EuiImage fullscreen view - .euiImageFullScreen { + .euiImageFullScreenWrapper { min-width: 100px; } } diff --git a/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor/ping_list/columns/ping_timestamp/step_image_popover.test.tsx b/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor/ping_list/columns/ping_timestamp/step_image_popover.test.tsx index ba38dc5782cf9..909e167cb15b8 100644 --- a/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor/ping_list/columns/ping_timestamp/step_image_popover.test.tsx +++ b/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor/ping_list/columns/ping_timestamp/step_image_popover.test.tsx @@ -27,7 +27,7 @@ describe('StepImagePopover', () => { ); - const closeFullScreenButton = 'Close fullscreen test caption image'; + const closeFullScreenButton = 'Press Escape or click to close image fullscreen mode'; expect(queryByLabelText(closeFullScreenButton)).toBeNull(); diff --git a/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor/ping_list/columns/ping_timestamp/step_image_popover.tsx b/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor/ping_list/columns/ping_timestamp/step_image_popover.tsx index 1bba981496b13..39b1a40570db2 100644 --- a/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor/ping_list/columns/ping_timestamp/step_image_popover.tsx +++ b/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor/ping_list/columns/ping_timestamp/step_image_popover.tsx @@ -19,7 +19,7 @@ const POPOVER_IMG_WIDTH = 640; const StepImage = styled(EuiImage)` &&& { display: flex; - figure.euiImage-isFullScreen { + figure.euiImageFullScreenWrapper { display: flex; div.stepArrowsFullScreen { display: flex; From 7bb1ea85e1801cc1dd40e8899663484194c8312b Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Tue, 2 Aug 2022 17:23:37 -0700 Subject: [PATCH 07/20] [EuiImage][RTL] Fix test failures caused by EuiImage changes --- .../ping_timestamp/step_image_popover.test.tsx | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor/ping_list/columns/ping_timestamp/step_image_popover.test.tsx b/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor/ping_list/columns/ping_timestamp/step_image_popover.test.tsx index 909e167cb15b8..2528b4fdd95b5 100644 --- a/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor/ping_list/columns/ping_timestamp/step_image_popover.test.tsx +++ b/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor/ping_list/columns/ping_timestamp/step_image_popover.test.tsx @@ -6,6 +6,7 @@ */ import { fireEvent, waitFor } from '@testing-library/react'; +import { screen } from '@elastic/eui/lib/test/rtl'; import React from 'react'; import { StepImagePopover, StepImagePopoverProps } from './step_image_popover'; import { render } from '../../../../../lib/helper/rtl_helpers'; @@ -23,24 +24,19 @@ describe('StepImagePopover', () => { }); it('opens displays full-size image on click, hides after close is closed', async () => { - const { getByAltText, getByLabelText, queryByLabelText } = render( - - ); - - const closeFullScreenButton = 'Press Escape or click to close image fullscreen mode'; + const { getByAltText } = render(); - expect(queryByLabelText(closeFullScreenButton)).toBeNull(); + expect(screen.queryByTestSubject('deactivateFullScreenButton')).toBeNull(); const caption = getByAltText('test caption'); fireEvent.click(caption); await waitFor(() => { - const closeButton = getByLabelText(closeFullScreenButton); - fireEvent.click(closeButton); + fireEvent.click(screen.getByTestSubject('deactivateFullScreenButton')); }); await waitFor(() => { - expect(queryByLabelText(closeFullScreenButton)).toBeNull(); + expect(screen.queryByTestSubject('deactivateFullScreenButton')).toBeNull(); }); }); From 00a790410f19e8ddcc265c7b96d240501bccef7b Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Thu, 21 Jul 2022 11:19:42 -0700 Subject: [PATCH 08/20] [EuiCommentList] Deprecate EuiCommentProps.type --- .../cases/public/client/attachment_framework/types.ts | 3 ++- .../public/components/user_actions/comment/alert.tsx | 2 -- .../components/user_actions/comment/comment.test.tsx | 10 ++-------- .../cases/public/components/user_actions/common.tsx | 1 - .../cases/public/components/user_actions/pushed.tsx | 2 -- x-pack/plugins/cases/public/containers/mock.ts | 2 -- .../cases/public/attachments/external_reference.tsx | 1 - .../cases/public/attachments/persistable_state.tsx | 1 - 8 files changed, 4 insertions(+), 18 deletions(-) diff --git a/x-pack/plugins/cases/public/client/attachment_framework/types.ts b/x-pack/plugins/cases/public/client/attachment_framework/types.ts index 9e62a00957aef..ac48c3ad6102f 100644 --- a/x-pack/plugins/cases/public/client/attachment_framework/types.ts +++ b/x-pack/plugins/cases/public/client/attachment_framework/types.ts @@ -12,9 +12,10 @@ import { CommentRequestPersistableStateType, } from '../../../common/api'; import { Case } from '../../containers/types'; +import { SupportedUserActionTypes } from '../../components/user_actions/types'; export interface AttachmentViewObject { - type?: EuiCommentProps['type']; + type?: SupportedUserActionTypes; timelineIcon?: EuiCommentProps['timelineIcon']; actions?: EuiCommentProps['actions']; event?: EuiCommentProps['event']; diff --git a/x-pack/plugins/cases/public/components/user_actions/comment/alert.tsx b/x-pack/plugins/cases/public/components/user_actions/comment/alert.tsx index 2c9689960322a..6c97224c9c84f 100644 --- a/x-pack/plugins/cases/public/components/user_actions/comment/alert.tsx +++ b/x-pack/plugins/cases/public/components/user_actions/comment/alert.tsx @@ -59,7 +59,6 @@ const getSingleAlertUserAction = ({ /> ), className: 'comment-alert', - type: 'update', event: ( ), className: 'comment-alert', - type: 'update', event: ( { it('renders correctly an external reference', async () => { const externalReferenceAttachmentTypeRegistry = new ExternalReferenceAttachmentTypeRegistry(); - externalReferenceAttachmentTypeRegistry.register( - getExternalReferenceAttachment({ type: 'regular' }) - ); + externalReferenceAttachmentTypeRegistry.register(getExternalReferenceAttachment()); const userAction = getExternalReferenceUserAction(); const builder = createCommentUserActionBuilder({ @@ -242,7 +240,6 @@ describe('createCommentUserActionBuilder', () => { }; const attachment = getExternalReferenceAttachment({ - type: 'regular', actions: , }); @@ -277,9 +274,7 @@ describe('createCommentUserActionBuilder', () => { it('renders correctly a persistable state attachment', async () => { const persistableStateAttachmentTypeRegistry = new PersistableStateAttachmentTypeRegistry(); - persistableStateAttachmentTypeRegistry.register( - getPersistableStateAttachment({ type: 'regular' }) - ); + persistableStateAttachmentTypeRegistry.register(getPersistableStateAttachment()); const userAction = getPersistableStateUserAction(); const builder = createCommentUserActionBuilder({ @@ -329,7 +324,6 @@ describe('createCommentUserActionBuilder', () => { }; const attachment = getPersistableStateAttachment({ - type: 'regular', actions: , }); diff --git a/x-pack/plugins/cases/public/components/user_actions/common.tsx b/x-pack/plugins/cases/public/components/user_actions/common.tsx index ba7ccabffb9c6..8cc450332af36 100644 --- a/x-pack/plugins/cases/public/components/user_actions/common.tsx +++ b/x-pack/plugins/cases/public/components/user_actions/common.tsx @@ -62,7 +62,6 @@ export const createCommonUpdateUserActionBuilder = ({ fullName={userAction.createdBy.fullName} /> ), - type: 'update' as const, event: label, 'data-test-subj': `${userAction.type}-${userAction.action}-action-${userAction.actionId}`, timestamp: , diff --git a/x-pack/plugins/cases/public/components/user_actions/pushed.tsx b/x-pack/plugins/cases/public/components/user_actions/pushed.tsx index e02bde992b651..4cf48a690f686 100644 --- a/x-pack/plugins/cases/public/components/user_actions/pushed.tsx +++ b/x-pack/plugins/cases/public/components/user_actions/pushed.tsx @@ -85,7 +85,6 @@ const getFooters = ({ ...footers, { username: '', - type: 'update', event: i18n.ALREADY_PUSHED_TO_SERVICE(`${connectorName}`), timelineIcon: 'sortUp', 'data-test-subj': 'top-footer', @@ -98,7 +97,6 @@ const getFooters = ({ ...footers, { username: '', - type: 'update', event: i18n.REQUIRED_UPDATE_TO_SERVICE(`${connectorName}`), timelineIcon: 'sortDown', 'data-test-subj': 'bottom-footer', diff --git a/x-pack/plugins/cases/public/containers/mock.ts b/x-pack/plugins/cases/public/containers/mock.ts index 0236175557adb..8f505dcf7dc29 100644 --- a/x-pack/plugins/cases/public/containers/mock.ts +++ b/x-pack/plugins/cases/public/containers/mock.ts @@ -861,7 +861,6 @@ export const getExternalReferenceAttachment = ( icon: 'casesApp', displayName: 'Test', getAttachmentViewObject: () => ({ - type: 'update', event: 'added a chart', timelineIcon: 'casesApp', ...viewObject, @@ -892,7 +891,6 @@ export const getPersistableStateAttachment = ( icon: 'casesApp', displayName: 'Test', getAttachmentViewObject: () => ({ - type: 'update', event: 'added an embeddable', timelineIcon: 'casesApp', ...viewObject, diff --git a/x-pack/test/functional_with_es_ssl/fixtures/plugins/cases/public/attachments/external_reference.tsx b/x-pack/test/functional_with_es_ssl/fixtures/plugins/cases/public/attachments/external_reference.tsx index c0db98bfdf1a3..417a5a1b9b0f2 100644 --- a/x-pack/test/functional_with_es_ssl/fixtures/plugins/cases/public/attachments/external_reference.tsx +++ b/x-pack/test/functional_with_es_ssl/fixtures/plugins/cases/public/attachments/external_reference.tsx @@ -27,7 +27,6 @@ export const getExternalReferenceAttachmentRegular = (): ExternalReferenceAttach icon: 'casesApp', displayName: 'Test', getAttachmentViewObject: () => ({ - type: 'regular', event: 'added a chart', timelineIcon: 'casesApp', actions: , diff --git a/x-pack/test/functional_with_es_ssl/fixtures/plugins/cases/public/attachments/persistable_state.tsx b/x-pack/test/functional_with_es_ssl/fixtures/plugins/cases/public/attachments/persistable_state.tsx index f669406a2795a..b9c79a44a86c4 100644 --- a/x-pack/test/functional_with_es_ssl/fixtures/plugins/cases/public/attachments/persistable_state.tsx +++ b/x-pack/test/functional_with_es_ssl/fixtures/plugins/cases/public/attachments/persistable_state.tsx @@ -59,7 +59,6 @@ export const getPersistableStateAttachmentRegular = ( icon: 'casesApp', displayName: 'Test', getAttachmentViewObject: () => ({ - type: 'regular', event: 'added an embeddable', timelineIcon: 'casesApp', actions: , From 0f5fe1302711e7c2034a56509a593e4ee8343250 Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Wed, 27 Jul 2022 08:57:04 -0700 Subject: [PATCH 09/20] [EuiCommentList] Rename `timelineIcon` prop to `timelineAvatar` - see https://github.com/elastic/eui/pull/6071 --- .../plugins/cases/public/client/attachment_framework/types.ts | 2 +- .../cases/public/components/user_actions/comment/actions.tsx | 2 +- .../cases/public/components/user_actions/comment/alert.tsx | 4 ++-- .../user_actions/comment/registered_attachments.tsx | 2 +- .../cases/public/components/user_actions/comment/user.tsx | 2 +- .../plugins/cases/public/components/user_actions/common.tsx | 4 ++-- .../cases/public/components/user_actions/description.tsx | 2 +- x-pack/plugins/cases/public/components/user_actions/index.tsx | 2 +- .../plugins/cases/public/components/user_actions/pushed.tsx | 4 ++-- x-pack/plugins/cases/public/containers/mock.ts | 4 ++-- .../public/common/components/exceptions/helpers.test.tsx | 2 +- .../public/common/components/exceptions/helpers.tsx | 2 +- .../artifact_entry_card/utils/get_formatted_comments.tsx | 2 +- .../components/open_timeline/note_previews/index.tsx | 4 ++-- .../plugins/cases/public/attachments/external_reference.tsx | 2 +- .../plugins/cases/public/attachments/persistable_state.tsx | 2 +- 16 files changed, 21 insertions(+), 21 deletions(-) diff --git a/x-pack/plugins/cases/public/client/attachment_framework/types.ts b/x-pack/plugins/cases/public/client/attachment_framework/types.ts index ac48c3ad6102f..1f974d09c887f 100644 --- a/x-pack/plugins/cases/public/client/attachment_framework/types.ts +++ b/x-pack/plugins/cases/public/client/attachment_framework/types.ts @@ -16,7 +16,7 @@ import { SupportedUserActionTypes } from '../../components/user_actions/types'; export interface AttachmentViewObject { type?: SupportedUserActionTypes; - timelineIcon?: EuiCommentProps['timelineIcon']; + timelineAvatar?: EuiCommentProps['timelineAvatar']; actions?: EuiCommentProps['actions']; event?: EuiCommentProps['event']; children?: React.LazyExoticComponent>; diff --git a/x-pack/plugins/cases/public/components/user_actions/comment/actions.tsx b/x-pack/plugins/cases/public/components/user_actions/comment/actions.tsx index e397e85d23ae7..9f11bf2bbb8a4 100644 --- a/x-pack/plugins/cases/public/components/user_actions/comment/actions.tsx +++ b/x-pack/plugins/cases/public/components/user_actions/comment/actions.tsx @@ -53,7 +53,7 @@ export const createActionAttachmentUserActionBuilder = ({ ), 'data-test-subj': 'endpoint-action', timestamp: , - timelineIcon: , + timelineAvatar: , actions: , children: comment.comment.trim().length > 0 && ( diff --git a/x-pack/plugins/cases/public/components/user_actions/comment/alert.tsx b/x-pack/plugins/cases/public/components/user_actions/comment/alert.tsx index 6c97224c9c84f..0a3cbe8f5dc17 100644 --- a/x-pack/plugins/cases/public/components/user_actions/comment/alert.tsx +++ b/x-pack/plugins/cases/public/components/user_actions/comment/alert.tsx @@ -71,7 +71,7 @@ const getSingleAlertUserAction = ({ ), 'data-test-subj': `user-action-alert-${userAction.type}-${userAction.action}-action-${userAction.actionId}`, timestamp: , - timelineIcon: 'bell', + timelineAvatar: 'bell', actions: ( @@ -128,7 +128,7 @@ const getMultipleAlertsUserAction = ({ ), 'data-test-subj': `user-action-alert-${userAction.type}-${userAction.action}-action-${userAction.actionId}`, timestamp: , - timelineIcon: 'bell', + timelineAvatar: 'bell', actions: ( diff --git a/x-pack/plugins/cases/public/components/user_actions/comment/registered_attachments.tsx b/x-pack/plugins/cases/public/components/user_actions/comment/registered_attachments.tsx index 6a05f3c64a491..cd91d75b4062d 100644 --- a/x-pack/plugins/cases/public/components/user_actions/comment/registered_attachments.tsx +++ b/x-pack/plugins/cases/public/components/user_actions/comment/registered_attachments.tsx @@ -95,7 +95,7 @@ export const createRegisteredAttachmentUserActionBuilder = < event: attachmentViewObject.event, 'data-test-subj': `comment-${comment.type}-${attachmentTypeId}`, timestamp: , - timelineIcon: attachmentViewObject.timelineIcon, + timelineAvatar: attachmentViewObject.timelineAvatar, actions: ( <> diff --git a/x-pack/plugins/cases/public/components/user_actions/comment/user.tsx b/x-pack/plugins/cases/public/components/user_actions/comment/user.tsx index 398f58da97b9c..cbdcf63962337 100644 --- a/x-pack/plugins/cases/public/components/user_actions/comment/user.tsx +++ b/x-pack/plugins/cases/public/components/user_actions/comment/user.tsx @@ -75,7 +75,7 @@ export const createUserAttachmentUserActionBuilder = ({ })} /> ), - timelineIcon: ( + timelineAvatar: ( & { label: EuiCommentProps['event']; - icon: EuiCommentProps['timelineIcon']; + icon: EuiCommentProps['timelineAvatar']; }; export const createCommonUpdateUserActionBuilder = ({ @@ -65,7 +65,7 @@ export const createCommonUpdateUserActionBuilder = ({ event: label, 'data-test-subj': `${userAction.type}-${userAction.action}-action-${userAction.actionId}`, timestamp: , - timelineIcon: icon, + timelineAvatar: icon, actions: ( diff --git a/x-pack/plugins/cases/public/components/user_actions/description.tsx b/x-pack/plugins/cases/public/components/user_actions/description.tsx index ef8f26bd0e87b..7aad1c7742506 100644 --- a/x-pack/plugins/cases/public/components/user_actions/description.tsx +++ b/x-pack/plugins/cases/public/components/user_actions/description.tsx @@ -65,7 +65,7 @@ export const getDescriptionUserAction = ({ onChangeEditable={handleManageMarkdownEditId} /> ), - timelineIcon: ( + timelineAvatar: ( ), 'data-test-subj': 'add-comment', - timelineIcon: ( + timelineAvatar: ( ), className: 'isEdit', diff --git a/x-pack/plugins/cases/public/components/user_actions/pushed.tsx b/x-pack/plugins/cases/public/components/user_actions/pushed.tsx index 4cf48a690f686..f01c8662b63ec 100644 --- a/x-pack/plugins/cases/public/components/user_actions/pushed.tsx +++ b/x-pack/plugins/cases/public/components/user_actions/pushed.tsx @@ -86,7 +86,7 @@ const getFooters = ({ { username: '', event: i18n.ALREADY_PUSHED_TO_SERVICE(`${connectorName}`), - timelineIcon: 'sortUp', + timelineAvatar: 'sortUp', 'data-test-subj': 'top-footer', }, ]; @@ -98,7 +98,7 @@ const getFooters = ({ { username: '', event: i18n.REQUIRED_UPDATE_TO_SERVICE(`${connectorName}`), - timelineIcon: 'sortDown', + timelineAvatar: 'sortDown', 'data-test-subj': 'bottom-footer', }, ]; diff --git a/x-pack/plugins/cases/public/containers/mock.ts b/x-pack/plugins/cases/public/containers/mock.ts index 8f505dcf7dc29..92e601dd0c9e9 100644 --- a/x-pack/plugins/cases/public/containers/mock.ts +++ b/x-pack/plugins/cases/public/containers/mock.ts @@ -862,7 +862,7 @@ export const getExternalReferenceAttachment = ( displayName: 'Test', getAttachmentViewObject: () => ({ event: 'added a chart', - timelineIcon: 'casesApp', + timelineAvatar: 'casesApp', ...viewObject, }), }); @@ -892,7 +892,7 @@ export const getPersistableStateAttachment = ( displayName: 'Test', getAttachmentViewObject: () => ({ event: 'added an embeddable', - timelineIcon: 'casesApp', + timelineAvatar: 'casesApp', ...viewObject, }), }); diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/helpers.test.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/helpers.test.tsx index 399ad2e9e8348..c88a7d16b6c4d 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/helpers.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/helpers.test.tsx @@ -158,7 +158,7 @@ describe('Exception helpers', () => { const payload = getCommentsArrayMock(); const result = getFormattedComments(payload); - const wrapper = mount(result[0].timelineIcon as React.ReactElement); + const wrapper = mount(result[0].timelineAvatar as React.ReactElement); expect(wrapper.text()).toEqual('SU'); }); diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/helpers.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/helpers.tsx index 5dd2f4b2b7363..c7890f99dc44b 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/helpers.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/helpers.tsx @@ -104,7 +104,7 @@ export const getFormattedComments = (comments: CommentsArray): EuiCommentProps[] username: commentItem.created_by, timestamp: moment(commentItem.created_at).format('on MMM Do YYYY @ HH:mm:ss'), event: i18n.COMMENT_EVENT, - timelineIcon: , + timelineAvatar: , children: {commentItem.comment}, actions: ( ), event: COMMENT_EVENT, - timelineIcon: , + timelineAvatar: , children: {commentItem.comment}, })); }; diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/note_previews/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/note_previews/index.tsx index 3f07397e1ac6d..b0d97f03fd750 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/note_previews/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/note_previews/index.tsx @@ -107,7 +107,7 @@ export const NotePreviews = React.memo( getEmptyValue() ), children: {timeline.description}, - timelineIcon: ( + timelineAvatar: ( ( eventId && timelineId ? ( ) : null, - timelineIcon: ( + timelineAvatar: ( ({ event: 'added a chart', - timelineIcon: 'casesApp', + timelineAvatar: 'casesApp', actions: , children: AttachmentContentLazy, }), diff --git a/x-pack/test/functional_with_es_ssl/fixtures/plugins/cases/public/attachments/persistable_state.tsx b/x-pack/test/functional_with_es_ssl/fixtures/plugins/cases/public/attachments/persistable_state.tsx index b9c79a44a86c4..e67c8c4c269fc 100644 --- a/x-pack/test/functional_with_es_ssl/fixtures/plugins/cases/public/attachments/persistable_state.tsx +++ b/x-pack/test/functional_with_es_ssl/fixtures/plugins/cases/public/attachments/persistable_state.tsx @@ -60,7 +60,7 @@ export const getPersistableStateAttachmentRegular = ( displayName: 'Test', getAttachmentViewObject: () => ({ event: 'added an embeddable', - timelineIcon: 'casesApp', + timelineAvatar: 'casesApp', actions: , children: getLazyComponent(EmbeddableComponent), }), From f5d923c4ce701207a655defa6d83f50ef9e953eb Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Tue, 2 Aug 2022 10:29:33 -0700 Subject: [PATCH 10/20] [EuiCommentList] Fix selectors deprecated by Emotion conversion --- x-pack/plugins/cases/public/components/user_actions/index.tsx | 2 +- .../plugins/security_solution/cypress/screens/case_details.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/cases/public/components/user_actions/index.tsx b/x-pack/plugins/cases/public/components/user_actions/index.tsx index 19a1ef73ce2c6..4a6bc85c7cbd7 100644 --- a/x-pack/plugins/cases/public/components/user_actions/index.tsx +++ b/x-pack/plugins/cases/public/components/user_actions/index.tsx @@ -67,7 +67,7 @@ const MyEuiCommentList = styled(EuiCommentList)` flex-grow: 1; } - & .comment-action.empty-comment .euiCommentEvent--regular { + & .comment-action.empty-comment [class*="euiCommentEvent-regular] { box-shadow: none; .euiCommentEvent__header { padding: ${theme.eui.euiSizeM} ${theme.eui.euiSizeS}; diff --git a/x-pack/plugins/security_solution/cypress/screens/case_details.ts b/x-pack/plugins/security_solution/cypress/screens/case_details.ts index 8e785cdc10ef7..84224ac4b64df 100644 --- a/x-pack/plugins/security_solution/cypress/screens/case_details.ts +++ b/x-pack/plugins/security_solution/cypress/screens/case_details.ts @@ -31,7 +31,7 @@ export const CASE_DETAILS_USER_ACTION_DESCRIPTION_USERNAME = export const CASE_DETAILS_USERNAMES = '[data-test-subj="case-view-username"]'; -export const CASE_EVENT_UPDATE = '.euiCommentEvent--update'; +export const CASE_EVENT_UPDATE = '.euiCommentEvent[data-type="update"]'; export const CASE_IN_PROGRESS_STATUS = '[data-test-subj="status-badge-in-progress"]'; From 169f8c98c1fd536dfae9b1e9a3b4a4881613a419 Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Tue, 2 Aug 2022 17:22:06 -0700 Subject: [PATCH 11/20] [EuiPopover][EuiCommentEvent][Enzyme] Fix mounted test failures caused by Emotion conversions - Mounting displays the Emotion wrapper with the data-test-subj on them - we need to specify the output div renders in order for text assertions to be correct --- .../operations/definitions/filters/filters.test.tsx | 6 +++--- .../components/open_timeline/note_previews/index.test.tsx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/filters/filters.test.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/filters/filters.test.tsx index bde3dd05f2e1e..1401cc1fcde79 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/filters/filters.test.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/filters/filters.test.tsx @@ -372,14 +372,14 @@ describe('filters', () => { ); expect( instance - .find('[data-test-subj="indexPattern-filters-existingFilterContainer"]') + .find('div[data-test-subj="indexPattern-filters-existingFilterContainer"]') .at(0) .text() ).toEqual('More than one'); expect( instance - .find('[data-test-subj="indexPattern-filters-existingFilterContainer"]') - .at(3) + .find('div[data-test-subj="indexPattern-filters-existingFilterContainer"]') + .at(1) .text() ).toEqual('src : 2'); }); diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/note_previews/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/note_previews/index.test.tsx index 139aeb40fddad..616cdc501e149 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/note_previews/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/note_previews/index.test.tsx @@ -83,7 +83,7 @@ describe('NotePreviews', () => { const wrapper = mountWithIntl(); - expect(wrapper.find('.euiCommentEvent__headerUsername').at(1).text()).toEqual('bob'); + expect(wrapper.find('div.euiCommentEvent__headerUsername').at(1).text()).toEqual('bob'); }); test('it filters-out null savedObjectIds', () => { @@ -110,7 +110,7 @@ describe('NotePreviews', () => { const wrapper = mountWithIntl(); - expect(wrapper.find(`.euiCommentEvent__headerUsername`).at(2).text()).toEqual('bob'); + expect(wrapper.find('div.euiCommentEvent__headerUsername').at(2).text()).toEqual('bob'); }); test('it filters-out undefined savedObjectIds', () => { @@ -136,7 +136,7 @@ describe('NotePreviews', () => { const wrapper = mountWithIntl(); - expect(wrapper.find(`.euiCommentEvent__headerUsername`).at(2).text()).toEqual('bob'); + expect(wrapper.find('div.euiCommentEvent__headerUsername').at(2).text()).toEqual('bob'); }); test('it renders timeline description as a note when showTimelineDescription is true and timelineId is defined', () => { From 3f7d5564e6a7f6d1fafe1ba5a1d2fff8020cda29 Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Wed, 27 Jul 2022 08:53:40 -0700 Subject: [PATCH 12/20] [EuiPopover] Deprecate `initialFocus={false}` as an option see https://github.com/elastic/eui/pull/6044 --- .../public/dataview_picker/change_dataview.tsx | 2 +- .../lib/index_pattern_select/switch_mode_popover.tsx | 1 - .../public/components/app/service_map/popover/index.tsx | 1 - x-pack/plugins/osquery/public/packs/packs_table.tsx | 7 +------ .../monitor_management/action_bar/action_bar.tsx | 1 - 5 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx b/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx index 39ccfb44e7def..629e7b499a5f0 100644 --- a/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx +++ b/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx @@ -380,7 +380,7 @@ export function ChangeDataView({ isOpen={isPopoverOpen} closePopover={() => setPopoverIsOpen(false)} panelPaddingSize="none" - initialFocus={!isTextBasedLangSelected ? `#${searchListInputId}` : false} + initialFocus={!isTextBasedLangSelected ? `#${searchListInputId}` : undefined} display="block" buffer={8} > diff --git a/src/plugins/vis_types/timeseries/public/application/components/lib/index_pattern_select/switch_mode_popover.tsx b/src/plugins/vis_types/timeseries/public/application/components/lib/index_pattern_select/switch_mode_popover.tsx index ccd80d51cb756..e5e0f3daa23a4 100644 --- a/src/plugins/vis_types/timeseries/public/application/components/lib/index_pattern_select/switch_mode_popover.tsx +++ b/src/plugins/vis_types/timeseries/public/application/components/lib/index_pattern_select/switch_mode_popover.tsx @@ -89,7 +89,6 @@ export const SwitchModePopover = ({ onModeChange, useKibanaIndices }: PopoverPro isOpen={isPopoverOpen} closePopover={closePopover} style={{ height: 'auto' }} - initialFocus={false} >
+ {agentPolicyIds?.map((policyId) => (
diff --git a/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/action_bar/action_bar.tsx b/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/action_bar/action_bar.tsx index 11e673aa425e0..f0e69395f6075 100644 --- a/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/action_bar/action_bar.tsx +++ b/x-pack/plugins/synthetics/public/legacy_uptime/components/monitor_management/action_bar/action_bar.tsx @@ -144,7 +144,6 @@ export const ActionBar = ({ {/* Popover is used instead of EuiTooltip until the resolution of https://github.com/elastic/eui/issues/5604 */} Date: Wed, 27 Jul 2022 09:06:58 -0700 Subject: [PATCH 13/20] [EuiPopover] Rename `display=inlineBlock` to `inline-block` - see https://github.com/elastic/eui/pull/5977 --- .../src/user_profiles_popover.test.tsx | 2 +- .../__snapshots__/indices_list.test.tsx.snap | 10 +++++----- .../components/__snapshots__/table.test.tsx.snap | 4 ++-- .../add_tooltip_field_popover.test.tsx.snap | 4 ++-- .../__snapshots__/metrics_expression.test.tsx.snap | 4 ++-- .../__snapshots__/tooltip_popover.test.tsx.snap | 4 ++-- .../toc_entry_actions_popover.test.tsx.snap | 12 ++++++------ .../__snapshots__/tools_control.test.tsx.snap | 4 ++-- .../full_time_range_selector.test.tsx.snap | 2 +- .../__snapshots__/condition_expression.test.js.snap | 8 ++++---- .../__snapshots__/scope_expression.test.js.snap | 6 +++--- .../__snapshots__/add_item_popover.test.js.snap | 6 +++--- .../edit_description_popover.test.js.snap | 6 +++--- .../filter_list_usage_popover.test.js.snap | 6 +++--- .../score/__snapshots__/anomaly_score.test.tsx.snap | 2 +- .../groups_filter_popover.test.tsx.snap | 2 +- .../__snapshots__/index.test.tsx.snap | 2 +- .../__snapshots__/index.test.tsx.snap | 2 +- .../components/resolve_all_conflicts.test.tsx | 2 +- .../__snapshots__/nav_control_popover.test.tsx.snap | 2 +- .../monitor_status_alert/add_filter_btn.test.tsx | 6 +++--- .../__snapshots__/agg_label_form.test.tsx.snap | 2 +- .../__snapshots__/group_by_label_form.test.tsx.snap | 6 +++--- .../public/common/expression_items/for_the_last.tsx | 2 +- .../public/common/expression_items/group_by_over.tsx | 2 +- .../public/common/expression_items/of.tsx | 2 +- .../public/common/expression_items/threshold.tsx | 2 +- .../public/common/expression_items/value.tsx | 2 +- .../public/common/expression_items/when.tsx | 2 +- 29 files changed, 58 insertions(+), 58 deletions(-) diff --git a/packages/kbn-user-profile-components/src/user_profiles_popover.test.tsx b/packages/kbn-user-profile-components/src/user_profiles_popover.test.tsx index 608ea32f7caa6..501d2697e4f10 100644 --- a/packages/kbn-user-profile-components/src/user_profiles_popover.test.tsx +++ b/packages/kbn-user-profile-components/src/user_profiles_popover.test.tsx @@ -73,7 +73,7 @@ describe('UserProfilesPopover', () => { } closePopover={[MockFunction]} - display="inlineBlock" + display="inline-block" hasArrow={true} isOpen={false} ownFocus={true} diff --git a/src/plugins/data_view_editor/public/components/preview_panel/indices_list/__snapshots__/indices_list.test.tsx.snap b/src/plugins/data_view_editor/public/components/preview_panel/indices_list/__snapshots__/indices_list.test.tsx.snap index b495cf52657d6..609d88fac17b6 100644 --- a/src/plugins/data_view_editor/public/components/preview_panel/indices_list/__snapshots__/indices_list.test.tsx.snap +++ b/src/plugins/data_view_editor/public/components/preview_panel/indices_list/__snapshots__/indices_list.test.tsx.snap @@ -57,7 +57,7 @@ exports[`IndicesList should change pages 1`] = ` } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="customizablePagination" isOpen={false} @@ -149,7 +149,7 @@ exports[`IndicesList should change per page 1`] = ` } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="customizablePagination" isOpen={false} @@ -263,7 +263,7 @@ exports[`IndicesList should highlight the query in the matches 1`] = ` } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="customizablePagination" isOpen={false} @@ -363,7 +363,7 @@ exports[`IndicesList should render normally 1`] = ` } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="customizablePagination" isOpen={false} @@ -527,7 +527,7 @@ exports[`IndicesList updating props should render all new indices 1`] = ` } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="customizablePagination" isOpen={false} diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/table.test.tsx.snap b/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/table.test.tsx.snap index 4b3bc4f5bd0cf..a0358c58e564e 100644 --- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/table.test.tsx.snap +++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/table.test.tsx.snap @@ -57,7 +57,7 @@ exports[`Table prevents saved objects from being deleted 1`] = ` } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} isOpen={false} ownFocus={true} @@ -292,7 +292,7 @@ exports[`Table should render normally 1`] = ` } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} isOpen={false} ownFocus={true} diff --git a/x-pack/plugins/maps/public/components/tooltip_selector/__snapshots__/add_tooltip_field_popover.test.tsx.snap b/x-pack/plugins/maps/public/components/tooltip_selector/__snapshots__/add_tooltip_field_popover.test.tsx.snap index 875f5df72b1be..f53bfbce06514 100644 --- a/x-pack/plugins/maps/public/components/tooltip_selector/__snapshots__/add_tooltip_field_popover.test.tsx.snap +++ b/x-pack/plugins/maps/public/components/tooltip_selector/__snapshots__/add_tooltip_field_popover.test.tsx.snap @@ -18,7 +18,7 @@ exports[`Should remove selected fields from selectable 1`] = ` } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="addTooltipFieldPopover" isOpen={false} @@ -91,7 +91,7 @@ exports[`Should render 1`] = ` } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="addTooltipFieldPopover" isOpen={false} diff --git a/x-pack/plugins/maps/public/connected_components/edit_layer_panel/join_editor/resources/__snapshots__/metrics_expression.test.tsx.snap b/x-pack/plugins/maps/public/connected_components/edit_layer_panel/join_editor/resources/__snapshots__/metrics_expression.test.tsx.snap index 91eec4d8aac29..1b6dff1c3396f 100644 --- a/x-pack/plugins/maps/public/connected_components/edit_layer_panel/join_editor/resources/__snapshots__/metrics_expression.test.tsx.snap +++ b/x-pack/plugins/maps/public/connected_components/edit_layer_panel/join_editor/resources/__snapshots__/metrics_expression.test.tsx.snap @@ -12,7 +12,7 @@ exports[`Should render default props 1`] = ` /> } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="metricsPopover" initialFocus="body" @@ -71,7 +71,7 @@ exports[`Should render metrics expression for metrics 1`] = ` /> } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="metricsPopover" initialFocus="body" diff --git a/x-pack/plugins/maps/public/connected_components/mb_map/tooltip_control/__snapshots__/tooltip_popover.test.tsx.snap b/x-pack/plugins/maps/public/connected_components/mb_map/tooltip_control/__snapshots__/tooltip_popover.test.tsx.snap index 5cf2cca4dfd80..ff7baacf4e35c 100644 --- a/x-pack/plugins/maps/public/connected_components/mb_map/tooltip_control/__snapshots__/tooltip_popover.test.tsx.snap +++ b/x-pack/plugins/maps/public/connected_components/mb_map/tooltip_control/__snapshots__/tooltip_popover.test.tsx.snap @@ -15,7 +15,7 @@ exports[`TooltipPopover render should render tooltip popover 1`] = ` /> } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="mapTooltip" isOpen={true} @@ -74,7 +74,7 @@ exports[`TooltipPopover render should render tooltip popover with custom tooltip /> } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="mapTooltip" isOpen={true} diff --git a/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/toc_entry/toc_entry_actions_popover/__snapshots__/toc_entry_actions_popover.test.tsx.snap b/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/toc_entry/toc_entry_actions_popover/__snapshots__/toc_entry_actions_popover.test.tsx.snap index a619aff4da284..d2a7b4c260bd2 100644 --- a/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/toc_entry/toc_entry_actions_popover/__snapshots__/toc_entry_actions_popover.test.tsx.snap +++ b/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/toc_entry/toc_entry_actions_popover/__snapshots__/toc_entry_actions_popover.test.tsx.snap @@ -37,7 +37,7 @@ exports[`TOCEntryActionsPopover is rendered 1`] = ` } className="mapLayTocActions" closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="testLayer" isOpen={false} @@ -151,7 +151,7 @@ exports[`TOCEntryActionsPopover should disable Edit features when edit mode acti } className="mapLayTocActions" closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="testLayer" isOpen={false} @@ -265,7 +265,7 @@ exports[`TOCEntryActionsPopover should disable fit to data when supportsFitToBou } className="mapLayTocActions" closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="testLayer" isOpen={false} @@ -380,7 +380,7 @@ exports[`TOCEntryActionsPopover should have "show layer" action when layer is no } className="mapLayTocActions" closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="testLayer" isOpen={false} @@ -494,7 +494,7 @@ exports[`TOCEntryActionsPopover should not show edit actions in read only mode 1 } className="mapLayTocActions" closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="testLayer" isOpen={false} @@ -577,7 +577,7 @@ exports[`TOCEntryActionsPopover should show "show this layer only" action when t } className="mapLayTocActions" closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="testLayer" isOpen={false} diff --git a/x-pack/plugins/maps/public/connected_components/toolbar_overlay/tools_control/__snapshots__/tools_control.test.tsx.snap b/x-pack/plugins/maps/public/connected_components/toolbar_overlay/tools_control/__snapshots__/tools_control.test.tsx.snap index 20e7f7dcf11df..2ddfe6b7758f3 100644 --- a/x-pack/plugins/maps/public/connected_components/toolbar_overlay/tools_control/__snapshots__/tools_control.test.tsx.snap +++ b/x-pack/plugins/maps/public/connected_components/toolbar_overlay/tools_control/__snapshots__/tools_control.test.tsx.snap @@ -25,7 +25,7 @@ exports[`Should render cancel button when drawing 1`] = ` } closePopover={[Function]} data-test-subj="mapToolsControlPopover" - display="inlineBlock" + display="inline-block" hasArrow={true} id="toolsControlPopover" isOpen={false} @@ -126,7 +126,7 @@ exports[`renders 1`] = ` } closePopover={[Function]} data-test-subj="mapToolsControlPopover" - display="inlineBlock" + display="inline-block" hasArrow={true} id="toolsControlPopover" isOpen={false} diff --git a/x-pack/plugins/ml/public/application/components/full_time_range_selector/__snapshots__/full_time_range_selector.test.tsx.snap b/x-pack/plugins/ml/public/application/components/full_time_range_selector/__snapshots__/full_time_range_selector.test.tsx.snap index 9a3fb9b29d09b..a3a61f2d6db03 100644 --- a/x-pack/plugins/ml/public/application/components/full_time_range_selector/__snapshots__/full_time_range_selector.test.tsx.snap +++ b/x-pack/plugins/ml/public/application/components/full_time_range_selector/__snapshots__/full_time_range_selector.test.tsx.snap @@ -45,7 +45,7 @@ exports[`FullTimeRangeSelector renders the selector 1`] = ` /> } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="mlFullTimeRangeSelectorOption" isOpen={false} diff --git a/x-pack/plugins/ml/public/application/components/rule_editor/__snapshots__/condition_expression.test.js.snap b/x-pack/plugins/ml/public/application/components/rule_editor/__snapshots__/condition_expression.test.js.snap index 4ea930d74d3d6..82bcfd36d14a1 100644 --- a/x-pack/plugins/ml/public/application/components/rule_editor/__snapshots__/condition_expression.test.js.snap +++ b/x-pack/plugins/ml/public/application/components/rule_editor/__snapshots__/condition_expression.test.js.snap @@ -24,7 +24,7 @@ exports[`ConditionExpression renders with appliesTo, operator and value supplied /> } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="appliesToPopover" isOpen={false} @@ -101,7 +101,7 @@ exports[`ConditionExpression renders with appliesTo, operator and value supplied /> } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="operatorValuePopover" isOpen={false} @@ -222,7 +222,7 @@ exports[`ConditionExpression renders with only value supplied 1`] = ` /> } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="appliesToPopover" isOpen={false} @@ -298,7 +298,7 @@ exports[`ConditionExpression renders with only value supplied 1`] = ` /> } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="operatorValuePopover" isOpen={false} diff --git a/x-pack/plugins/ml/public/application/components/rule_editor/__snapshots__/scope_expression.test.js.snap b/x-pack/plugins/ml/public/application/components/rule_editor/__snapshots__/scope_expression.test.js.snap index 1bafbd466ca32..b6e5de0576a4d 100644 --- a/x-pack/plugins/ml/public/application/components/rule_editor/__snapshots__/scope_expression.test.js.snap +++ b/x-pack/plugins/ml/public/application/components/rule_editor/__snapshots__/scope_expression.test.js.snap @@ -95,7 +95,7 @@ exports[`ScopeExpression renders when enabled set to false 1`] = ` /> } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="operatorValuePopover" isOpen={false} @@ -246,7 +246,7 @@ exports[`ScopeExpression renders when filter ID and type supplied 1`] = ` /> } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="operatorValuePopover" isOpen={false} @@ -397,7 +397,7 @@ exports[`ScopeExpression renders when no filter ID or type supplied 1`] = ` /> } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="operatorValuePopover" isOpen={false} diff --git a/x-pack/plugins/ml/public/application/settings/filter_lists/components/add_item_popover/__snapshots__/add_item_popover.test.js.snap b/x-pack/plugins/ml/public/application/settings/filter_lists/components/add_item_popover/__snapshots__/add_item_popover.test.js.snap index 45d9296f1752e..90983d1511b71 100644 --- a/x-pack/plugins/ml/public/application/settings/filter_lists/components/add_item_popover/__snapshots__/add_item_popover.test.js.snap +++ b/x-pack/plugins/ml/public/application/settings/filter_lists/components/add_item_popover/__snapshots__/add_item_popover.test.js.snap @@ -22,7 +22,7 @@ exports[`AddItemPopover calls addItems with multiple items on clicking Add butto } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="add_item_popover" initialFocus="#filter_list_add_item_input_row" @@ -112,7 +112,7 @@ exports[`AddItemPopover opens the popover onButtonClick 1`] = ` } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="add_item_popover" initialFocus="#filter_list_add_item_input_row" @@ -202,7 +202,7 @@ exports[`AddItemPopover renders the popover 1`] = ` } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="add_item_popover" initialFocus="#filter_list_add_item_input_row" diff --git a/x-pack/plugins/ml/public/application/settings/filter_lists/components/edit_description_popover/__snapshots__/edit_description_popover.test.js.snap b/x-pack/plugins/ml/public/application/settings/filter_lists/components/edit_description_popover/__snapshots__/edit_description_popover.test.js.snap index 9cb7ca279f1cd..ba7492ad3bf60 100644 --- a/x-pack/plugins/ml/public/application/settings/filter_lists/components/edit_description_popover/__snapshots__/edit_description_popover.test.js.snap +++ b/x-pack/plugins/ml/public/application/settings/filter_lists/components/edit_description_popover/__snapshots__/edit_description_popover.test.js.snap @@ -16,7 +16,7 @@ exports[`FilterListUsagePopover opens the popover onButtonClick 1`] = ` /> } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="filter_list_description_popover" initialFocus="#filter_list_edit_description_row" @@ -77,7 +77,7 @@ exports[`FilterListUsagePopover renders the popover with a description 1`] = ` /> } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="filter_list_description_popover" initialFocus="#filter_list_edit_description_row" @@ -138,7 +138,7 @@ exports[`FilterListUsagePopover renders the popover with no description 1`] = ` /> } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="filter_list_description_popover" initialFocus="#filter_list_edit_description_row" diff --git a/x-pack/plugins/ml/public/application/settings/filter_lists/components/filter_list_usage_popover/__snapshots__/filter_list_usage_popover.test.js.snap b/x-pack/plugins/ml/public/application/settings/filter_lists/components/filter_list_usage_popover/__snapshots__/filter_list_usage_popover.test.js.snap index 8757eedb6289a..ee55eb7ba01a9 100644 --- a/x-pack/plugins/ml/public/application/settings/filter_lists/components/filter_list_usage_popover/__snapshots__/filter_list_usage_popover.test.js.snap +++ b/x-pack/plugins/ml/public/application/settings/filter_lists/components/filter_list_usage_popover/__snapshots__/filter_list_usage_popover.test.js.snap @@ -14,7 +14,7 @@ exports[`FilterListUsagePopover opens the popover onButtonClick 1`] = ` } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="detector_filter_list_usage" isOpen={true} @@ -57,7 +57,7 @@ exports[`FilterListUsagePopover renders the popover for 1 job 1`] = ` } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="job_filter_list_usage" isOpen={false} @@ -90,7 +90,7 @@ exports[`FilterListUsagePopover renders the popover for 2 detectors 1`] = ` } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="detector_filter_list_usage" isOpen={false} diff --git a/x-pack/plugins/security_solution/public/common/components/ml/score/__snapshots__/anomaly_score.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/ml/score/__snapshots__/anomaly_score.test.tsx.snap index 19f65b8d287e4..dbdb6eec840fa 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/score/__snapshots__/anomaly_score.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/common/components/ml/score/__snapshots__/anomaly_score.test.tsx.snap @@ -88,7 +88,7 @@ exports[`anomaly_scores renders correctly against snapshot 1`] = ` } closePopover={[Function]} data-test-subj="anomaly-score-popover" - display="inlineBlock" + display="inline-block" hasArrow={true} id="anomaly-score-popover" isOpen={false} diff --git a/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/filters/__snapshots__/groups_filter_popover.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/filters/__snapshots__/groups_filter_popover.test.tsx.snap index 410fb7f3ae793..fd5fd490a5f51 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/filters/__snapshots__/groups_filter_popover.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/filters/__snapshots__/groups_filter_popover.test.tsx.snap @@ -17,7 +17,7 @@ exports[`GroupsFilterPopover renders correctly against snapshot 1`] = ` } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} isOpen={false} ownFocus={true} diff --git a/x-pack/plugins/security_solution/public/common/components/paginated_table/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/paginated_table/__snapshots__/index.test.tsx.snap index 52995a8929621..ab30b15ad236d 100644 --- a/x-pack/plugins/security_solution/public/common/components/paginated_table/__snapshots__/index.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/common/components/paginated_table/__snapshots__/index.test.tsx.snap @@ -108,7 +108,7 @@ exports[`Paginated Table Component rendering it renders the default load more ta } closePopover={[Function]} data-test-subj="loadingMoreSizeRowPopover" - display="inlineBlock" + display="inline-block" hasArrow={true} id="customizablePagination" isOpen={false} diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_actions_overflow/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/detections/components/rules/rule_actions_overflow/__snapshots__/index.test.tsx.snap index e87b05a0cc8f8..2cbd090e87733 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_actions_overflow/__snapshots__/index.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/detections/components/rules/rule_actions_overflow/__snapshots__/index.test.tsx.snap @@ -22,7 +22,7 @@ exports[`RuleActionsOverflow snapshots renders correctly against snapshot 1`] = } closePopover={[Function]} data-test-subj="rules-details-popover" - display="inlineBlock" + display="inline-block" hasArrow={true} id="ruleActionsOverflow" isOpen={false} diff --git a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/resolve_all_conflicts.test.tsx b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/resolve_all_conflicts.test.tsx index 639323fb5467c..f824b9c9c3338 100644 --- a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/resolve_all_conflicts.test.tsx +++ b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/resolve_all_conflicts.test.tsx @@ -101,7 +101,7 @@ describe('ResolveAllConflicts', () => { } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="resolveAllConflictsVisibilityPopover" isOpen={false} diff --git a/x-pack/plugins/spaces/public/nav_control/__snapshots__/nav_control_popover.test.tsx.snap b/x-pack/plugins/spaces/public/nav_control/__snapshots__/nav_control_popover.test.tsx.snap index 6d99a3526fc7b..38a36d5b3657b 100644 --- a/x-pack/plugins/spaces/public/nav_control/__snapshots__/nav_control_popover.test.tsx.snap +++ b/x-pack/plugins/spaces/public/nav_control/__snapshots__/nav_control_popover.test.tsx.snap @@ -26,7 +26,7 @@ exports[`NavControlPopover renders without crashing 1`] = ` } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="spcMenuPopover" isOpen={false} diff --git a/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/alerts/monitor_status_alert/add_filter_btn.test.tsx b/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/alerts/monitor_status_alert/add_filter_btn.test.tsx index a929489e6b715..d7e2b1d09afa1 100644 --- a/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/alerts/monitor_status_alert/add_filter_btn.test.tsx +++ b/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/alerts/monitor_status_alert/add_filter_btn.test.tsx @@ -32,7 +32,7 @@ describe('AddFilterButton component', () => { } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="singlePanel" isOpen={false} @@ -98,7 +98,7 @@ describe('AddFilterButton component', () => { } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="singlePanel" isOpen={false} @@ -151,7 +151,7 @@ describe('AddFilterButton component', () => { } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="singlePanel" isOpen={false} diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/aggregation_list/__snapshots__/agg_label_form.test.tsx.snap b/x-pack/plugins/transform/public/app/sections/create_transform/components/aggregation_list/__snapshots__/agg_label_form.test.tsx.snap index 10258f53aa25b..0a89548c5e81f 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/aggregation_list/__snapshots__/agg_label_form.test.tsx.snap +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/aggregation_list/__snapshots__/agg_label_form.test.tsx.snap @@ -33,7 +33,7 @@ exports[`Transform: Date histogram aggregation 1`] = ` /> } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="transformFormPopover" isOpen={false} diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/group_by_list/__snapshots__/group_by_label_form.test.tsx.snap b/x-pack/plugins/transform/public/app/sections/create_transform/components/group_by_list/__snapshots__/group_by_label_form.test.tsx.snap index 6309879eec403..0bb11827655e0 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/group_by_list/__snapshots__/group_by_label_form.test.tsx.snap +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/group_by_list/__snapshots__/group_by_label_form.test.tsx.snap @@ -44,7 +44,7 @@ exports[`Transform: Date histogram aggregation 1`] = ` /> } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="transformIntervalFormPopover" isOpen={false} @@ -126,7 +126,7 @@ exports[`Transform: Histogram aggregation 1`] = ` /> } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="transformIntervalFormPopover" isOpen={false} @@ -196,7 +196,7 @@ exports[`Transform: Terms aggregation 1`] = ` /> } closePopover={[Function]} - display="inlineBlock" + display="inline-block" hasArrow={true} id="transformIntervalFormPopover" isOpen={false} diff --git a/x-pack/plugins/triggers_actions_ui/public/common/expression_items/for_the_last.tsx b/x-pack/plugins/triggers_actions_ui/public/common/expression_items/for_the_last.tsx index 9f287f5f066f2..e843b7e4b764e 100644 --- a/x-pack/plugins/triggers_actions_ui/public/common/expression_items/for_the_last.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/common/expression_items/for_the_last.tsx @@ -84,7 +84,7 @@ export const ForLastExpression = ({ setAlertDurationPopoverOpen(false); }} ownFocus - display={display === 'fullWidth' ? 'block' : 'inlineBlock'} + display={display === 'fullWidth' ? 'block' : 'inline-block'} anchorPosition={popupPosition ?? 'downLeft'} repositionOnScroll > diff --git a/x-pack/plugins/triggers_actions_ui/public/common/expression_items/group_by_over.tsx b/x-pack/plugins/triggers_actions_ui/public/common/expression_items/group_by_over.tsx index 738990f89f906..18c3bf5c1d5f2 100644 --- a/x-pack/plugins/triggers_actions_ui/public/common/expression_items/group_by_over.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/common/expression_items/group_by_over.tsx @@ -115,7 +115,7 @@ export const GroupByExpression = ({ setGroupByPopoverOpen(false); }} ownFocus - display={display === 'fullWidth' ? 'block' : 'inlineBlock'} + display={display === 'fullWidth' ? 'block' : 'inline-block'} anchorPosition={popupPosition ?? 'downRight'} repositionOnScroll > diff --git a/x-pack/plugins/triggers_actions_ui/public/common/expression_items/of.tsx b/x-pack/plugins/triggers_actions_ui/public/common/expression_items/of.tsx index ca249e4ed2e1a..291375ebbc073 100644 --- a/x-pack/plugins/triggers_actions_ui/public/common/expression_items/of.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/common/expression_items/of.tsx @@ -105,7 +105,7 @@ export const OfExpression = ({ closePopover={() => { setAggFieldPopoverOpen(false); }} - display={display === 'fullWidth' ? 'block' : 'inlineBlock'} + display={display === 'fullWidth' ? 'block' : 'inline-block'} anchorPosition={popupPosition ?? 'downRight'} zIndex={8000} repositionOnScroll diff --git a/x-pack/plugins/triggers_actions_ui/public/common/expression_items/threshold.tsx b/x-pack/plugins/triggers_actions_ui/public/common/expression_items/threshold.tsx index 5c44b6f29178b..d40d210cb7e3c 100644 --- a/x-pack/plugins/triggers_actions_ui/public/common/expression_items/threshold.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/common/expression_items/threshold.tsx @@ -110,7 +110,7 @@ export const ThresholdExpression = ({ setAlertThresholdPopoverOpen(false); }} ownFocus - display={display === 'fullWidth' ? 'block' : 'inlineBlock'} + display={display === 'fullWidth' ? 'block' : 'inline-block'} anchorPosition={popupPosition ?? 'downLeft'} repositionOnScroll > diff --git a/x-pack/plugins/triggers_actions_ui/public/common/expression_items/value.tsx b/x-pack/plugins/triggers_actions_ui/public/common/expression_items/value.tsx index 5259fdf0b5d82..0277bfa49d9c1 100644 --- a/x-pack/plugins/triggers_actions_ui/public/common/expression_items/value.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/common/expression_items/value.tsx @@ -67,7 +67,7 @@ export const ValueExpression = ({ setValuePopoverOpen(false); }} ownFocus - display={display === 'fullWidth' ? 'block' : 'inlineBlock'} + display={display === 'fullWidth' ? 'block' : 'inline-block'} anchorPosition={popupPosition ?? 'downLeft'} repositionOnScroll > diff --git a/x-pack/plugins/triggers_actions_ui/public/common/expression_items/when.tsx b/x-pack/plugins/triggers_actions_ui/public/common/expression_items/when.tsx index a49fa95de0cc8..c4b050ab9550a 100644 --- a/x-pack/plugins/triggers_actions_ui/public/common/expression_items/when.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/common/expression_items/when.tsx @@ -66,7 +66,7 @@ export const WhenExpression = ({ setAggTypePopoverOpen(false); }} ownFocus - display={display === 'fullWidth' ? 'block' : 'inlineBlock'} + display={display === 'fullWidth' ? 'block' : 'inline-block'} anchorPosition={popupPosition ?? 'downLeft'} repositionOnScroll > From 7a27c58375a91c14f419b5ea76debf9cd16b21f9 Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Wed, 27 Jul 2022 12:30:19 -0700 Subject: [PATCH 14/20] [EuiPopover] Update snapshots from Emotion conversion --- .../sample_data_card.test.tsx.snap | 4 +- .../__snapshots__/view_button.test.tsx.snap | 8 +- .../__snapshots__/popover.test.tsx.snap | 404 +-- .../src/popover/popover.test.tsx | 2 +- .../header/__snapshots__/header.test.tsx.snap | 2883 +---------------- .../public/chrome/ui/header/header.test.tsx | 2 +- .../__snapshots__/data_view.test.tsx.snap | 28 +- .../lib/embeddables/error_embeddable.test.tsx | 4 +- .../inspector_panel.test.tsx.snap | 4 +- .../transaction_action_menu.test.tsx.snap | 4 +- .../time_filter.stories.storyshot | 56 +- .../__snapshots__/palette.stories.storyshot | 4 +- .../color_picker_popover.stories.storyshot | 16 +- .../font_picker.stories.storyshot | 8 +- .../workpad_table.stories.storyshot | 8 +- .../palette_picker.stories.storyshot | 12 +- .../shape_picker_popover.stories.storyshot | 12 +- .../text_style_picker.stories.storyshot | 16 +- .../__snapshots__/edit_var.stories.storyshot | 16 +- .../__snapshots__/edit_menu.stories.storyshot | 24 +- .../editor_menu.stories.storyshot | 8 +- .../element_menu.stories.storyshot | 4 +- .../share_menu.stories.storyshot | 8 +- .../__snapshots__/view_menu.stories.storyshot | 16 +- .../extended_template.stories.storyshot | 24 +- .../simple_template.stories.storyshot | 8 +- .../api/__snapshots__/shareable.test.tsx.snap | 20 +- .../__snapshots__/canvas.stories.storyshot | 12 +- .../__snapshots__/footer.stories.storyshot | 8 +- .../__snapshots__/settings.test.tsx.snap | 27 +- .../__snapshots__/settings.stories.storyshot | 8 +- .../extend_index_management.test.tsx.snap | 4 +- .../nodes/__snapshots__/cells.test.js.snap | 8 +- .../nav_control/nav_control_service.test.ts | 4 +- .../authentications_host_table.test.tsx.snap | 4 +- .../authentications_user_table.test.tsx.snap | 4 +- .../__snapshots__/index.test.tsx.snap | 4 +- .../field_renderers.test.tsx.snap | 24 +- .../flyout/__snapshots__/index.test.tsx.snap | 8 +- .../netflow/__snapshots__/index.test.tsx.snap | 120 +- .../netflow_row_renderer.test.tsx.snap | 128 +- .../entity_by_expression.test.tsx.snap | 4 +- .../ml_integerations.test.tsx.snap | 4 +- .../down_number_select.test.tsx.snap | 4 +- .../time_expression_select.test.tsx.snap | 8 +- .../__snapshots__/map_tooltip.test.tsx.snap | 2 +- 46 files changed, 518 insertions(+), 3470 deletions(-) diff --git a/packages/home/sample_data_card/src/__snapshots__/sample_data_card.test.tsx.snap b/packages/home/sample_data_card/src/__snapshots__/sample_data_card.test.tsx.snap index 460e7a7961866..0e1f5bc5b45f1 100644 --- a/packages/home/sample_data_card/src/__snapshots__/sample_data_card.test.tsx.snap +++ b/packages/home/sample_data_card/src/__snapshots__/sample_data_card.test.tsx.snap @@ -76,12 +76,12 @@ exports[`SampleDataCard installed renders with app links 1`] = ` class="euiFlexItem euiFlexItem--flexGrowZero" >
- - - -
-
-
- + test + + + +
+
`; diff --git a/packages/shared-ux/button_toolbar/src/popover/popover.test.tsx b/packages/shared-ux/button_toolbar/src/popover/popover.test.tsx index 022ab3fe56f51..afdf0007f8883 100644 --- a/packages/shared-ux/button_toolbar/src/popover/popover.test.tsx +++ b/packages/shared-ux/button_toolbar/src/popover/popover.test.tsx @@ -16,7 +16,7 @@ describe('', () => { const isOpen = true; const component = mountWithIntl( !isOpen} />); - expect(component).toMatchSnapshot(); + expect(component.render()).toMatchSnapshot(); }); test('accepts an onClick handler', () => { diff --git a/src/core/public/chrome/ui/header/__snapshots__/header.test.tsx.snap b/src/core/public/chrome/ui/header/__snapshots__/header.test.tsx.snap index 98b117c17bb2a..ac0743939d75a 100644 --- a/src/core/public/chrome/ui/header/__snapshots__/header.test.tsx.snap +++ b/src/core/public/chrome/ui/header/__snapshots__/header.test.tsx.snap @@ -1,2773 +1,182 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Header renders 1`] = ` -
- -
- , - ], - }, - Object { - "borders": "none", - "items": Array [ - - - , - ], - }, - Object { - "borders": "none", - "items": Array [ - - - , - , - , - ], - }, - ] - } - theme="dark" +
- - -
+
- - - -
- -
-
- + + + +
+
+
+
+
+
+
+
+
- - -
- - - - - } - closePopover={[Function]} - data-test-subj="helpMenuButton" - display="inlineBlock" - hasArrow={true} - id="headerHelpMenu" - isOpen={false} - ownFocus={true} - panelPaddingSize="m" - repositionOnScroll={true} + -
-
- - - - - - - - - - , - } - } - className="euiHeaderSectionItemButton" - color="text" - onClick={[Function]} - > - - - -
-
-
-
-
-
- -
- -
-
+ + + + +
- +
- - +
+
+
+
- - + + + + +
+
+ +
+
+
- -
- -
- -
- -
- -
-
- +
-
-
+ + `; diff --git a/src/core/public/chrome/ui/header/header.test.tsx b/src/core/public/chrome/ui/header/header.test.tsx index 682cadf1e5172..10cca7ad9cd9a 100644 --- a/src/core/public/chrome/ui/header/header.test.tsx +++ b/src/core/public/chrome/ui/header/header.test.tsx @@ -96,7 +96,7 @@ describe('Header', () => { act(() => isLocked$.next(true)); component.update(); expect(component.find('[data-test-subj="collapsibleNav"]').exists()).toBeTruthy(); - expect(component).toMatchSnapshot(); + expect(component.render()).toMatchSnapshot(); act(() => breadcrumbsAppendExtension$.next({ diff --git a/src/plugins/data/public/utils/table_inspector_view/components/__snapshots__/data_view.test.tsx.snap b/src/plugins/data/public/utils/table_inspector_view/components/__snapshots__/data_view.test.tsx.snap index 803d7de517752..4f40db7c07141 100644 --- a/src/plugins/data/public/utils/table_inspector_view/components/__snapshots__/data_view.test.tsx.snap +++ b/src/plugins/data/public/utils/table_inspector_view/components/__snapshots__/data_view.test.tsx.snap @@ -176,11 +176,11 @@ Array [ class="euiFlexItem euiFlexItem--flexGrowZero" >