From 80a7cbbf4f02c64393a6d4677bc8075a46cd23c1 Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Tue, 12 Oct 2021 14:43:00 -0700 Subject: [PATCH 01/10] Upversion to EUI 39.1.0 --- package.json | 2 +- src/dev/license_checker/config.ts | 2 +- yarn.lock | 21 +++++++++++++++------ 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index fa03604178e27..0cc2ed88d3fb5 100644 --- a/package.json +++ b/package.json @@ -103,7 +103,7 @@ "@elastic/datemath": "link:bazel-bin/packages/elastic-datemath", "@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@^8.0.0-canary.21", "@elastic/ems-client": "7.15.0", - "@elastic/eui": "39.0.0", + "@elastic/eui": "39.1.0", "@elastic/filesaver": "1.1.2", "@elastic/maki": "6.3.0", "@elastic/node-crypto": "1.2.1", diff --git a/src/dev/license_checker/config.ts b/src/dev/license_checker/config.ts index 818ea3675194e..4ca005ef2ed03 100644 --- a/src/dev/license_checker/config.ts +++ b/src/dev/license_checker/config.ts @@ -75,6 +75,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@7.15.0': ['Elastic License 2.0'], - '@elastic/eui@39.0.0': ['SSPL-1.0 OR Elastic License 2.0'], + '@elastic/eui@39.1.0': ['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 f0fbb4f6addaa..cdd0c96197a3d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2412,10 +2412,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@39.0.0": - version "39.0.0" - resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-39.0.0.tgz#abac19edd466eee13612d5668e5456961dc813b8" - integrity sha512-8sf8sbxjpRxV23dFTwbkaWH6LhWrOlMpdUUMVUC9zd0g5iQLj1IxkxQCeyYM/p++SQFl+1hshAuaH//DCz5Xrw== +"@elastic/eui@39.1.0": + version "39.1.0" + resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-39.1.0.tgz#2585181810eeba0da897b99f1816fbba4b085b14" + integrity sha512-yFgHg/49QddZSo8RoCZxblk338jYIPqlEZwxNUcZPBEsu8ijeN9LuHJX7nIW5UVzPHNzGJXahkR2IExIjxLwZw== dependencies: "@types/chroma-js" "^2.0.0" "@types/lodash" "^4.14.160" @@ -2441,7 +2441,7 @@ react-is "~16.3.0" react-virtualized-auto-sizer "^1.0.2" react-window "^1.8.5" - refractor "^3.4.0" + refractor "^3.5.0" rehype-raw "^5.0.0" rehype-react "^6.0.0" rehype-stringify "^8.0.0" @@ -24750,7 +24750,7 @@ reflect.ownkeys@^0.2.0: resolved "https://registry.yarnpkg.com/reflect.ownkeys/-/reflect.ownkeys-0.2.0.tgz#749aceec7f3fdf8b63f927a04809e90c5c0b3460" integrity sha1-dJrO7H8/34tj+SegSAnpDFwLNGA= -refractor@^3.2.0, refractor@^3.4.0: +refractor@^3.2.0: version "3.4.0" resolved "https://registry.yarnpkg.com/refractor/-/refractor-3.4.0.tgz#62bd274b06c942041f390c371b676eb67cb0a678" integrity sha512-dBeD02lC5eytm9Gld2Mx0cMcnR+zhSnsTfPpWqFaMgUMJfC9A6bcN3Br/NaXrnBJcuxnLFR90k1jrkaSyV8umg== @@ -24759,6 +24759,15 @@ refractor@^3.2.0, refractor@^3.4.0: parse-entities "^2.0.0" prismjs "~1.24.0" +refractor@^3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/refractor/-/refractor-3.5.0.tgz#334586f352dda4beaf354099b48c2d18e0819aec" + integrity sha512-QwPJd3ferTZ4cSPPjdP5bsYHMytwWYnAN5EEnLtGvkqp/FCCnGsBgxrm9EuIDnjUC3Uc/kETtvVi7fSIVC74Dg== + dependencies: + hastscript "^6.0.0" + parse-entities "^2.0.0" + prismjs "~1.25.0" + regedit@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/regedit/-/regedit-3.0.3.tgz#0c2188e15f670de7d5740c5cea9bbebe99497749" From 49426450d4de9c375104ae7887e9c5e1946a89bc Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Tue, 12 Oct 2021 14:48:56 -0700 Subject: [PATCH 02/10] Update i18n_eui_mapping tokens @see https://github.com/elastic/eui/blob/master/i18ntokens_changelog.json --- src/core/public/i18n/i18n_eui_mapping.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/public/i18n/i18n_eui_mapping.tsx b/src/core/public/i18n/i18n_eui_mapping.tsx index 7585ada886c05..dffbca95def4f 100644 --- a/src/core/public/i18n/i18n_eui_mapping.tsx +++ b/src/core/public/i18n/i18n_eui_mapping.tsx @@ -64,7 +64,7 @@ export const getEuiContextMapping = (): EuiTokensObject => { }), 'euiBasicTable.tablePagination': ({ tableCaption }: EuiValues) => i18n.translate('core.euiBasicTable.tablePagination', { - defaultMessage: 'Pagination for preceding table: {tableCaption}', + defaultMessage: 'Pagination for table: {tableCaption}', values: { tableCaption }, description: 'Screen reader text to describe the pagination controls', }), From 9fa84bd1df18ac925c9b1b6e2c7b32d0feebde57 Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Wed, 13 Oct 2021 09:26:52 -0700 Subject: [PATCH 03/10] Merge refractor in yarn.lock --- yarn.lock | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/yarn.lock b/yarn.lock index cdd0c96197a3d..64a17a1594cfe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -23198,7 +23198,7 @@ printj@~1.1.0: resolved "https://registry.yarnpkg.com/printj/-/printj-1.1.2.tgz#d90deb2975a8b9f600fb3a1c94e3f4c53c78a222" integrity sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ== -prismjs@^1.22.0, prismjs@~1.24.0, prismjs@~1.25.0: +prismjs@^1.22.0, prismjs@~1.25.0: version "1.25.0" resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.25.0.tgz#6f822df1bdad965734b310b315a23315cf999756" integrity sha512-WCjJHl1KEWbnkQom1+SzftbtXMKQoezOCYs5rECqMN+jP+apI7ftoflyqigqzopSO3hMhTEb0mFClA8lkolgEg== @@ -24750,16 +24750,7 @@ reflect.ownkeys@^0.2.0: resolved "https://registry.yarnpkg.com/reflect.ownkeys/-/reflect.ownkeys-0.2.0.tgz#749aceec7f3fdf8b63f927a04809e90c5c0b3460" integrity sha1-dJrO7H8/34tj+SegSAnpDFwLNGA= -refractor@^3.2.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/refractor/-/refractor-3.4.0.tgz#62bd274b06c942041f390c371b676eb67cb0a678" - integrity sha512-dBeD02lC5eytm9Gld2Mx0cMcnR+zhSnsTfPpWqFaMgUMJfC9A6bcN3Br/NaXrnBJcuxnLFR90k1jrkaSyV8umg== - dependencies: - hastscript "^6.0.0" - parse-entities "^2.0.0" - prismjs "~1.24.0" - -refractor@^3.5.0: +refractor@^3.2.0, refractor@^3.5.0: version "3.5.0" resolved "https://registry.yarnpkg.com/refractor/-/refractor-3.5.0.tgz#334586f352dda4beaf354099b48c2d18e0819aec" integrity sha512-QwPJd3ferTZ4cSPPjdP5bsYHMytwWYnAN5EEnLtGvkqp/FCCnGsBgxrm9EuIDnjUC3Uc/kETtvVi7fSIVC74Dg== From 93407dba9afc58fce8586acc0327bcd42c2cab51 Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Wed, 13 Oct 2021 13:23:23 -0700 Subject: [PATCH 04/10] Fix functional table filter selector - Popover ID was removed in recent EUI a11y fix, so we're using child-position selection to target the Tags filter now --- .../saved_object_tagging/functional/tests/som_integration.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/x-pack/test/saved_object_tagging/functional/tests/som_integration.ts b/x-pack/test/saved_object_tagging/functional/tests/som_integration.ts index 4688cfba4b864..e35b33b3b4475 100644 --- a/x-pack/test/saved_object_tagging/functional/tests/som_integration.ts +++ b/x-pack/test/saved_object_tagging/functional/tests/som_integration.ts @@ -21,10 +21,9 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { */ const selectTagsInFilter = async (...tagNames: string[]) => { // open the filter dropdown - // the first class selector before the id is of course useless. Only here to help cleaning that once we got - // testSubjects in EUI filters. + // This CSS selector should be cleaned up once we have testSubjects in EUI filters. const filterButton = await find.byCssSelector( - '.euiFilterGroup #field_value_selection_1 .euiFilterButton' + '.euiFilterGroup > *:last-child .euiFilterButton' ); await filterButton.click(); // select the tags From 76e9068987e94cd38d7715594386a19db417df2e Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Wed, 13 Oct 2021 13:23:31 -0700 Subject: [PATCH 05/10] Update snaphots --- .../__snapshots__/data_view.test.tsx.snap | 1114 +++++++++-------- .../List/__snapshots__/List.test.tsx.snap | 4 +- .../workpad_table.stories.storyshot | 8 +- .../report_listing.test.tsx.snap | 584 ++++----- .../alert_summary_view.test.tsx.snap | 4 - .../__snapshots__/donut_chart.test.tsx.snap | 2 - 6 files changed, 873 insertions(+), 843 deletions(-) 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 eae2032748396..7773f2209bf96 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 @@ -1220,93 +1220,75 @@ exports[`Inspector Data View component should render single table without select - -
- -
- - - +
+
+ + + - -
- - - : - 20 - - } - closePopover={[Function]} - display="inlineBlock" - hasArrow={true} - isOpen={false} - ownFocus={true} - panelPaddingSize="none" +
-
-
+ - - + + + +
-
-
-
-
- -
+
+
+ - - - -
- -
-
-
-
- + + +
+ + + + + +
+ @@ -2791,93 +2806,75 @@ exports[`Inspector Data View component should support multiple datatables 1`] = - -
- -
- - - +
+
+ + + - -
- - - : - 20 - - } - closePopover={[Function]} - display="inlineBlock" - hasArrow={true} - isOpen={false} - ownFocus={true} - panelPaddingSize="none" +
-
-
+ - - + + + +
-
-
-
-
- -
+
+
+ - - - -
- -
-
-
-
- + + +
+ + + + + +
+ diff --git a/x-pack/plugins/apm/public/components/app/error_group_overview/List/__snapshots__/List.test.tsx.snap b/x-pack/plugins/apm/public/components/app/error_group_overview/List/__snapshots__/List.test.tsx.snap index c8c7bf82dff04..ee68630daa469 100644 --- a/x-pack/plugins/apm/public/components/app/error_group_overview/List/__snapshots__/List.test.tsx.snap +++ b/x-pack/plugins/apm/public/components/app/error_group_overview/List/__snapshots__/List.test.tsx.snap @@ -151,7 +151,6 @@ exports[`ErrorGroupOverview -> List should render empty state 1`] = ` className="euiTableHeaderCell" data-test-subj="tableHeaderCell_handled_3" role="columnheader" - scope="col" style={ Object { "width": undefined, @@ -447,7 +446,6 @@ exports[`ErrorGroupOverview -> List should render with data 1`] = ` className="euiTableHeaderCell" data-test-subj="tableHeaderCell_handled_3" role="columnheader" - scope="col" style={ Object { "width": undefined, @@ -1265,6 +1263,7 @@ exports[`ErrorGroupOverview -> List should render with data 1`] = ` className="euiFlexItem euiFlexItem--flexGrowZero" > + + + + + + + + + `; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/__snapshots__/alert_summary_view.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/event_details/__snapshots__/alert_summary_view.test.tsx.snap index 2904d8184261e..fc6f34f486bc0 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/__snapshots__/alert_summary_view.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/common/components/event_details/__snapshots__/alert_summary_view.test.tsx.snap @@ -86,7 +86,6 @@ exports[`AlertSummaryView Behavior event code renders additional summary rows 1` class="euiTableHeaderCell" data-test-subj="tableHeaderCell_title_0" role="columnheader" - scope="col" style="width: 220px;" > Date: Wed, 13 Oct 2021 16:58:30 -0700 Subject: [PATCH 06/10] Upgrade to 39.1.1 for extra bugfixes --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index dedab127af3b1..55f3d8fd9e155 100644 --- a/package.json +++ b/package.json @@ -102,7 +102,7 @@ "@elastic/datemath": "link:bazel-bin/packages/elastic-datemath", "@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@^8.0.0-canary.21", "@elastic/ems-client": "7.15.0", - "@elastic/eui": "39.1.0", + "@elastic/eui": "39.1.1", "@elastic/filesaver": "1.1.2", "@elastic/maki": "6.3.0", "@elastic/node-crypto": "1.2.1", diff --git a/yarn.lock b/yarn.lock index fa6623934d414..9df930df39b49 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2412,10 +2412,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@39.1.0": - version "39.1.0" - resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-39.1.0.tgz#2585181810eeba0da897b99f1816fbba4b085b14" - integrity sha512-yFgHg/49QddZSo8RoCZxblk338jYIPqlEZwxNUcZPBEsu8ijeN9LuHJX7nIW5UVzPHNzGJXahkR2IExIjxLwZw== +"@elastic/eui@39.1.1": + version "39.1.1" + resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-39.1.1.tgz#52e59f1dd6448b2e80047259ca60c6c87e9873f0" + integrity sha512-zYCNitpp6Ds7U6eaa9QkJqc20ZMo2wjpZokNtd1WalFV22vdfiVizFg7DMtDjJrCDLmoXcLOOCMasKlmmJ1cRg== dependencies: "@types/chroma-js" "^2.0.0" "@types/lodash" "^4.14.160" From 29a59e06edb01577d43c8c513b47c0419c288388 Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Wed, 13 Oct 2021 16:58:39 -0700 Subject: [PATCH 07/10] Update i18n mappings --- src/core/public/i18n/i18n_eui_mapping.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/public/i18n/i18n_eui_mapping.tsx b/src/core/public/i18n/i18n_eui_mapping.tsx index dffbca95def4f..f28add25056ee 100644 --- a/src/core/public/i18n/i18n_eui_mapping.tsx +++ b/src/core/public/i18n/i18n_eui_mapping.tsx @@ -861,6 +861,9 @@ export const getEuiContextMapping = (): EuiTokensObject => { 'euiRelativeTab.numberInputLabel': i18n.translate('core.euiRelativeTab.numberInputLabel', { defaultMessage: 'Time span amount', }), + 'euiRelativeTab.dateInputError': i18n.translate('core.euiRelativeTab.dateInputError', { + defaultMessage: 'Must be a valid range', + }), 'euiResizableButton.horizontalResizerAriaLabel': i18n.translate( 'core.euiResizableButton.horizontalResizerAriaLabel', { From bcad676dbba2825b2556472b177681a783c0a79b Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Wed, 13 Oct 2021 19:32:50 -0700 Subject: [PATCH 08/10] Fix i18n snapshot --- src/core/public/i18n/__snapshots__/i18n_service.test.tsx.snap | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/public/i18n/__snapshots__/i18n_service.test.tsx.snap b/src/core/public/i18n/__snapshots__/i18n_service.test.tsx.snap index d714f2159d1a2..197714df7f207 100644 --- a/src/core/public/i18n/__snapshots__/i18n_service.test.tsx.snap +++ b/src/core/public/i18n/__snapshots__/i18n_service.test.tsx.snap @@ -175,6 +175,7 @@ exports[`#start() returns \`Context\` component 1`] = ` "euiRefreshInterval.legend": "Refresh every", "euiRefreshInterval.start": "Start", "euiRefreshInterval.stop": "Stop", + "euiRelativeTab.dateInputError": "Must be a valid range", "euiRelativeTab.fullDescription": [Function], "euiRelativeTab.numberInputError": "Must be >= 0", "euiRelativeTab.numberInputLabel": "Time span amount", From 0af60289370c693d0a69666c27b5f410c5dbeb18 Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Thu, 14 Oct 2021 12:11:18 -0700 Subject: [PATCH 09/10] Attempt to harden flaky Security Cypress test --- .../plugins/security_solution/cypress/screens/timeline.ts | 2 ++ x-pack/plugins/security_solution/cypress/tasks/timeline.ts | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/security_solution/cypress/screens/timeline.ts b/x-pack/plugins/security_solution/cypress/screens/timeline.ts index 2e412bbed6fdc..bc3a4282df1c9 100644 --- a/x-pack/plugins/security_solution/cypress/screens/timeline.ts +++ b/x-pack/plugins/security_solution/cypress/screens/timeline.ts @@ -28,6 +28,8 @@ export const CLOSE_TIMELINE_BTN = '[data-test-subj="close-timeline"]'; export const COMBO_BOX = '.euiComboBoxOption__content'; +export const COMBO_BOX_INPUT = '[data-test-subj="comboBoxInput"]'; + export const CREATE_NEW_TIMELINE = '[data-test-subj="timeline-new"]'; export const CREATE_NEW_TIMELINE_TEMPLATE = '[data-test-subj="template-timeline-new"]'; diff --git a/x-pack/plugins/security_solution/cypress/tasks/timeline.ts b/x-pack/plugins/security_solution/cypress/tasks/timeline.ts index 4c6b73de80940..056cb62b12488 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/timeline.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/timeline.ts @@ -20,6 +20,7 @@ import { CASE, CLOSE_TIMELINE_BTN, COMBO_BOX, + COMBO_BOX_INPUT, CREATE_NEW_TIMELINE, FIELD_BROWSER, ID_HEADER_FIELD, @@ -164,8 +165,10 @@ export const addDataProvider = (filter: TimelineFilter): Cypress.Chainable Date: Thu, 14 Oct 2021 12:30:33 -0700 Subject: [PATCH 10/10] More combobox entry hardening - Got a flake on clicking the combobox dropdown on run 17/20 locally --- x-pack/plugins/security_solution/cypress/tasks/timeline.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/security_solution/cypress/tasks/timeline.ts b/x-pack/plugins/security_solution/cypress/tasks/timeline.ts index 056cb62b12488..c7cb56c89e9df 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/timeline.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/timeline.ts @@ -168,8 +168,9 @@ export const addDataProvider = (filter: TimelineFilter): Cypress.Chainable