From 173bb89b9e62988a0a02dac7fb4c52e552bb2e01 Mon Sep 17 00:00:00 2001 From: Dave Snider Date: Tue, 19 Apr 2022 10:38:22 -0400 Subject: [PATCH 01/12] Converts spacer to Emotion --- src/components/index.scss | 3 +-- src/components/spacer/_index.scss | 1 - src/components/spacer/_spacer.scss | 18 ------------- src/components/spacer/spacer.styles.ts | 36 ++++++++++++++++++++++++++ src/components/spacer/spacer.tsx | 9 ++++++- 5 files changed, 45 insertions(+), 22 deletions(-) delete mode 100644 src/components/spacer/_index.scss delete mode 100644 src/components/spacer/_spacer.scss create mode 100644 src/components/spacer/spacer.styles.ts diff --git a/src/components/index.scss b/src/components/index.scss index 5e9817ddd34..27b94f1e41c 100644 --- a/src/components/index.scss +++ b/src/components/index.scss @@ -52,7 +52,6 @@ @import 'tree_view/index'; @import 'resizable_container/index'; @import 'side_nav/index'; -@import 'spacer/index'; @import 'search_bar/index'; @import 'selectable/index'; @import 'stat/index'; @@ -66,4 +65,4 @@ @import 'token/index'; @import 'tool_tip/index'; @import 'tour/index'; -@import 'text/index'; \ No newline at end of file +@import 'text/index'; diff --git a/src/components/spacer/_index.scss b/src/components/spacer/_index.scss deleted file mode 100644 index d772c23b64b..00000000000 --- a/src/components/spacer/_index.scss +++ /dev/null @@ -1 +0,0 @@ -@import 'spacer'; diff --git a/src/components/spacer/_spacer.scss b/src/components/spacer/_spacer.scss deleted file mode 100644 index 89ebc3be265..00000000000 --- a/src/components/spacer/_spacer.scss +++ /dev/null @@ -1,18 +0,0 @@ -$spacerSizes: ( - xs: $euiSizeXS, - s: $euiSizeS, - m: $euiSize, - l: $euiSizeL, - xl: $euiSizeXL, - xxl: $euiSizeXXL, -); - -.euiSpacer { - flex-shrink: 0; // don't ever let this shrink in height if direct descendent of flex -} - -@each $name, $size in $spacerSizes { - .euiSpacer--#{$name} { - height: $size; - } -} diff --git a/src/components/spacer/spacer.styles.ts b/src/components/spacer/spacer.styles.ts new file mode 100644 index 00000000000..3f1559e6cb1 --- /dev/null +++ b/src/components/spacer/spacer.styles.ts @@ -0,0 +1,36 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { css } from '@emotion/react'; +import { UseEuiTheme } from '../../services'; + +export const euiSpacerStyles = ({ euiTheme }: UseEuiTheme) => ({ + // base + euiSpacer: css` + flex-shrink: 0; // don't ever let this shrink in height if direct descendent of flex; + `, + // variants + xs: css` + height: ${euiTheme.size.xs}; + `, + s: css` + height: ${euiTheme.size.s}; + `, + m: css` + height: ${euiTheme.size.m}; + `, + l: css` + height: ${euiTheme.size.l}; + `, + xl: css` + height: ${euiTheme.size.xl}; + `, + xxl: css` + height: ${euiTheme.size.xxl}; + `, +}); diff --git a/src/components/spacer/spacer.tsx b/src/components/spacer/spacer.tsx index 8d700ca94ff..c66f644131c 100644 --- a/src/components/spacer/spacer.tsx +++ b/src/components/spacer/spacer.tsx @@ -10,6 +10,9 @@ import React, { FunctionComponent, HTMLAttributes } from 'react'; import classNames from 'classnames'; import { CommonProps } from '../common'; +import { useEuiTheme } from '../../services'; + +import { euiSpacerStyles } from './spacer.styles'; const sizeToClassNameMap = { xs: 'euiSpacer--xs', @@ -34,7 +37,11 @@ export const EuiSpacer: FunctionComponent = ({ size = 'l', ...rest }) => { + const euiTheme = useEuiTheme(); + const styles = euiSpacerStyles(euiTheme); const classes = classNames('euiSpacer', sizeToClassNameMap[size], className); - return
; + const cssStyles = [styles.euiSpacer, styles[size]]; + + return
; }; From 3ee337584a8bc76c3fc9dc62e8c121e07c02c07d Mon Sep 17 00:00:00 2001 From: Dave Snider Date: Tue, 19 Apr 2022 10:58:17 -0400 Subject: [PATCH 02/12] fix medium size to base size, add cl --- src/components/spacer/spacer.styles.ts | 2 +- upcoming_changelogs/5812.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 upcoming_changelogs/5812.md diff --git a/src/components/spacer/spacer.styles.ts b/src/components/spacer/spacer.styles.ts index 3f1559e6cb1..86ff154f10c 100644 --- a/src/components/spacer/spacer.styles.ts +++ b/src/components/spacer/spacer.styles.ts @@ -22,7 +22,7 @@ export const euiSpacerStyles = ({ euiTheme }: UseEuiTheme) => ({ height: ${euiTheme.size.s}; `, m: css` - height: ${euiTheme.size.m}; + height: ${euiTheme.size.base}; `, l: css` height: ${euiTheme.size.l}; diff --git a/upcoming_changelogs/5812.md b/upcoming_changelogs/5812.md new file mode 100644 index 00000000000..fd819bc81b5 --- /dev/null +++ b/upcoming_changelogs/5812.md @@ -0,0 +1,2 @@ +- Converted `EuiSpacer` to Emotion + From 01f59b9c5b0ed4399624592d03b295c00215b6f7 Mon Sep 17 00:00:00 2001 From: Dave Snider Date: Tue, 19 Apr 2022 11:37:39 -0400 Subject: [PATCH 03/12] snap snap --- src/components/spacer/__snapshots__/spacer.test.tsx.snap | 2 +- upcoming_changelogs/5812.md | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/spacer/__snapshots__/spacer.test.tsx.snap b/src/components/spacer/__snapshots__/spacer.test.tsx.snap index 3da7698af96..cd1175e67a8 100644 --- a/src/components/spacer/__snapshots__/spacer.test.tsx.snap +++ b/src/components/spacer/__snapshots__/spacer.test.tsx.snap @@ -3,7 +3,7 @@ exports[`EuiSpacer is rendered 1`] = `
`; diff --git a/upcoming_changelogs/5812.md b/upcoming_changelogs/5812.md index fd819bc81b5..d7f306848b1 100644 --- a/upcoming_changelogs/5812.md +++ b/upcoming_changelogs/5812.md @@ -1,2 +1,3 @@ -- Converted `EuiSpacer` to Emotion +**CSS-in-JS conversions** +- Converted `EuiSpacer` to Emotion From 8f3a14db5e2aeb54edc986328ae79bda965fc239 Mon Sep 17 00:00:00 2001 From: Dave Snider Date: Tue, 19 Apr 2022 12:26:09 -0400 Subject: [PATCH 04/12] snap snap --- .../in_memory_table.test.tsx.snap | 77 ++++++- .../__snapshots__/empty_prompt.test.tsx.snap | 8 +- .../markdown_editor.test.tsx.snap | 188 ++++++++++++++++-- .../__snapshots__/page_header.test.tsx.snap | 8 +- .../page_header_content.test.tsx.snap | 10 +- 5 files changed, 261 insertions(+), 30 deletions(-) diff --git a/src/components/basic_table/__snapshots__/in_memory_table.test.tsx.snap b/src/components/basic_table/__snapshots__/in_memory_table.test.tsx.snap index 9e6781fe72e..b1791e48420 100644 --- a/src/components/basic_table/__snapshots__/in_memory_table.test.tsx.snap +++ b/src/components/basic_table/__snapshots__/in_memory_table.test.tsx.snap @@ -340,8 +340,79 @@ exports[`EuiInMemoryTable behavior pagination 1`] = ` size="m" >
+ css="unknown styles" + > + + + + , + "ctr": 2, + "insertionPoint": undefined, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "prepend": undefined, + "tags": Array [ + , + , + ], + }, + } + } + isStringTag={true} + serialized={ + Object { + "map": "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNwYWNlci5zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBdUJRIiwiZmlsZSI6InNwYWNlci5zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuICogQ29weXJpZ2h0IEVsYXN0aWNzZWFyY2ggQi5WLiBhbmQvb3IgbGljZW5zZWQgdG8gRWxhc3RpY3NlYXJjaCBCLlYuIHVuZGVyIG9uZVxuICogb3IgbW9yZSBjb250cmlidXRvciBsaWNlbnNlIGFncmVlbWVudHMuIExpY2Vuc2VkIHVuZGVyIHRoZSBFbGFzdGljIExpY2Vuc2VcbiAqIDIuMCBhbmQgdGhlIFNlcnZlciBTaWRlIFB1YmxpYyBMaWNlbnNlLCB2IDE7IHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0XG4gKiBpbiBjb21wbGlhbmNlIHdpdGgsIGF0IHlvdXIgZWxlY3Rpb24sIHRoZSBFbGFzdGljIExpY2Vuc2UgMi4wIG9yIHRoZSBTZXJ2ZXJcbiAqIFNpZGUgUHVibGljIExpY2Vuc2UsIHYgMS5cbiAqL1xuXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBVc2VFdWlUaGVtZSB9IGZyb20gJy4uLy4uL3NlcnZpY2VzJztcblxuZXhwb3J0IGNvbnN0IGV1aVNwYWNlclN0eWxlcyA9ICh7IGV1aVRoZW1lIH06IFVzZUV1aVRoZW1lKSA9PiAoe1xuICAvLyBiYXNlXG4gIGV1aVNwYWNlcjogY3NzYFxuICAgIGZsZXgtc2hyaW5rOiAwOyAvLyBkb24ndCBldmVyIGxldCB0aGlzIHNocmluayBpbiBoZWlnaHQgaWYgZGlyZWN0IGRlc2NlbmRlbnQgb2YgZmxleDtcbiAgYCxcbiAgLy8gdmFyaWFudHNcbiAgeHM6IGNzc2BcbiAgICBoZWlnaHQ6ICR7ZXVpVGhlbWUuc2l6ZS54c307XG4gIGAsXG4gIHM6IGNzc2BcbiAgICBoZWlnaHQ6ICR7ZXVpVGhlbWUuc2l6ZS5zfTtcbiAgYCxcbiAgbTogY3NzYFxuICAgIGhlaWdodDogJHtldWlUaGVtZS5zaXplLmJhc2V9O1xuICBgLFxuICBsOiBjc3NgXG4gICAgaGVpZ2h0OiAke2V1aVRoZW1lLnNpemUubH07XG4gIGAsXG4gIHhsOiBjc3NgXG4gICAgaGVpZ2h0OiAke2V1aVRoZW1lLnNpemUueGx9O1xuICBgLFxuICB4eGw6IGNzc2BcbiAgICBoZWlnaHQ6ICR7ZXVpVGhlbWUuc2l6ZS54eGx9O1xuICBgLFxufSk7XG4iXX0= */", + "name": "hg1jdf-euiSpacer-m", + "next": undefined, + "styles": "flex-shrink:0;label:euiSpacer;;;height:16px;;label:m;;;", + "toString": [Function], + } + } + /> +
+
Actions @@ -68,7 +68,7 @@ exports[`EuiEmptyPrompt props actions renders alone 1`] = ` class="euiEmptyPrompt__contentInner" >
actions
@@ -91,7 +91,7 @@ exports[`EuiEmptyPrompt props actions renders an array 1`] = ` class="euiEmptyPrompt__contentInner" >






+ css="unknown styles" + > + + + + + , + "ctr": 2, + "insertionPoint": undefined, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "prepend": undefined, + "tags": Array [ + , + , + ], + }, + } + } + isStringTag={true} + serialized={ + Object { + "map": "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNwYWNlci5zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBb0JRIiwiZmlsZSI6InNwYWNlci5zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuICogQ29weXJpZ2h0IEVsYXN0aWNzZWFyY2ggQi5WLiBhbmQvb3IgbGljZW5zZWQgdG8gRWxhc3RpY3NlYXJjaCBCLlYuIHVuZGVyIG9uZVxuICogb3IgbW9yZSBjb250cmlidXRvciBsaWNlbnNlIGFncmVlbWVudHMuIExpY2Vuc2VkIHVuZGVyIHRoZSBFbGFzdGljIExpY2Vuc2VcbiAqIDIuMCBhbmQgdGhlIFNlcnZlciBTaWRlIFB1YmxpYyBMaWNlbnNlLCB2IDE7IHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0XG4gKiBpbiBjb21wbGlhbmNlIHdpdGgsIGF0IHlvdXIgZWxlY3Rpb24sIHRoZSBFbGFzdGljIExpY2Vuc2UgMi4wIG9yIHRoZSBTZXJ2ZXJcbiAqIFNpZGUgUHVibGljIExpY2Vuc2UsIHYgMS5cbiAqL1xuXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBVc2VFdWlUaGVtZSB9IGZyb20gJy4uLy4uL3NlcnZpY2VzJztcblxuZXhwb3J0IGNvbnN0IGV1aVNwYWNlclN0eWxlcyA9ICh7IGV1aVRoZW1lIH06IFVzZUV1aVRoZW1lKSA9PiAoe1xuICAvLyBiYXNlXG4gIGV1aVNwYWNlcjogY3NzYFxuICAgIGZsZXgtc2hyaW5rOiAwOyAvLyBkb24ndCBldmVyIGxldCB0aGlzIHNocmluayBpbiBoZWlnaHQgaWYgZGlyZWN0IGRlc2NlbmRlbnQgb2YgZmxleDtcbiAgYCxcbiAgLy8gdmFyaWFudHNcbiAgeHM6IGNzc2BcbiAgICBoZWlnaHQ6ICR7ZXVpVGhlbWUuc2l6ZS54c307XG4gIGAsXG4gIHM6IGNzc2BcbiAgICBoZWlnaHQ6ICR7ZXVpVGhlbWUuc2l6ZS5zfTtcbiAgYCxcbiAgbTogY3NzYFxuICAgIGhlaWdodDogJHtldWlUaGVtZS5zaXplLmJhc2V9O1xuICBgLFxuICBsOiBjc3NgXG4gICAgaGVpZ2h0OiAke2V1aVRoZW1lLnNpemUubH07XG4gIGAsXG4gIHhsOiBjc3NgXG4gICAgaGVpZ2h0OiAke2V1aVRoZW1lLnNpemUueGx9O1xuICBgLFxuICB4eGw6IGNzc2BcbiAgICBoZWlnaHQ6ICR7ZXVpVGhlbWUuc2l6ZS54eGx9O1xuICBgLFxufSk7XG4iXX0= */", + "name": "i2qclb-euiSpacer-s", + "next": undefined, + "styles": "flex-shrink:0;label:euiSpacer;;;height:8px;;label:s;;;", + "toString": [Function], + } + } + /> +
+
+ css="unknown styles" + > + + + + + , + "ctr": 2, + "insertionPoint": undefined, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "prepend": undefined, + "tags": Array [ + , + , + ], + }, + } + } + isStringTag={true} + serialized={ + Object { + "map": "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNwYWNlci5zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBMEJRIiwiZmlsZSI6InNwYWNlci5zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuICogQ29weXJpZ2h0IEVsYXN0aWNzZWFyY2ggQi5WLiBhbmQvb3IgbGljZW5zZWQgdG8gRWxhc3RpY3NlYXJjaCBCLlYuIHVuZGVyIG9uZVxuICogb3IgbW9yZSBjb250cmlidXRvciBsaWNlbnNlIGFncmVlbWVudHMuIExpY2Vuc2VkIHVuZGVyIHRoZSBFbGFzdGljIExpY2Vuc2VcbiAqIDIuMCBhbmQgdGhlIFNlcnZlciBTaWRlIFB1YmxpYyBMaWNlbnNlLCB2IDE7IHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0XG4gKiBpbiBjb21wbGlhbmNlIHdpdGgsIGF0IHlvdXIgZWxlY3Rpb24sIHRoZSBFbGFzdGljIExpY2Vuc2UgMi4wIG9yIHRoZSBTZXJ2ZXJcbiAqIFNpZGUgUHVibGljIExpY2Vuc2UsIHYgMS5cbiAqL1xuXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBVc2VFdWlUaGVtZSB9IGZyb20gJy4uLy4uL3NlcnZpY2VzJztcblxuZXhwb3J0IGNvbnN0IGV1aVNwYWNlclN0eWxlcyA9ICh7IGV1aVRoZW1lIH06IFVzZUV1aVRoZW1lKSA9PiAoe1xuICAvLyBiYXNlXG4gIGV1aVNwYWNlcjogY3NzYFxuICAgIGZsZXgtc2hyaW5rOiAwOyAvLyBkb24ndCBldmVyIGxldCB0aGlzIHNocmluayBpbiBoZWlnaHQgaWYgZGlyZWN0IGRlc2NlbmRlbnQgb2YgZmxleDtcbiAgYCxcbiAgLy8gdmFyaWFudHNcbiAgeHM6IGNzc2BcbiAgICBoZWlnaHQ6ICR7ZXVpVGhlbWUuc2l6ZS54c307XG4gIGAsXG4gIHM6IGNzc2BcbiAgICBoZWlnaHQ6ICR7ZXVpVGhlbWUuc2l6ZS5zfTtcbiAgYCxcbiAgbTogY3NzYFxuICAgIGhlaWdodDogJHtldWlUaGVtZS5zaXplLmJhc2V9O1xuICBgLFxuICBsOiBjc3NgXG4gICAgaGVpZ2h0OiAke2V1aVRoZW1lLnNpemUubH07XG4gIGAsXG4gIHhsOiBjc3NgXG4gICAgaGVpZ2h0OiAke2V1aVRoZW1lLnNpemUueGx9O1xuICBgLFxuICB4eGw6IGNzc2BcbiAgICBoZWlnaHQ6ICR7ZXVpVGhlbWUuc2l6ZS54eGx9O1xuICBgLFxufSk7XG4iXX0= */", + "name": "jz428s-euiSpacer-l", + "next": undefined, + "styles": "flex-shrink:0;label:euiSpacer;;;height:24px;;label:l;;;", + "toString": [Function], + } + } + /> +
+

Anything

Anything @@ -272,7 +272,7 @@ exports[`EuiPageHeaderContent props children is rendered 2`] = ` class="euiPageHeaderContent__bottom" >

Child
@@ -322,11 +322,11 @@ exports[`EuiPageHeaderContent props children is rendered even if content props a class="euiPageHeaderContent__bottom" >
Child
Date: Tue, 19 Apr 2022 12:34:06 -0700 Subject: [PATCH 05/12] Remove downstream mounted snapshots --- .../in_memory_table.test.tsx.snap | 1038 ++------ .../basic_table/in_memory_table.test.tsx | 2 +- .../markdown_editor.test.tsx.snap | 2217 ----------------- .../markdown_editor/markdown_editor.test.tsx | 4 +- 4 files changed, 221 insertions(+), 3040 deletions(-) diff --git a/src/components/basic_table/__snapshots__/in_memory_table.test.tsx.snap b/src/components/basic_table/__snapshots__/in_memory_table.test.tsx.snap index b1791e48420..2b268c5f3c5 100644 --- a/src/components/basic_table/__snapshots__/in_memory_table.test.tsx.snap +++ b/src/components/basic_table/__snapshots__/in_memory_table.test.tsx.snap @@ -1,851 +1,247 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`EuiInMemoryTable behavior pagination 1`] = ` - - - } - onChange={[Function]} - pagination={ - Object { - "pageIndex": 1, - "pageSize": 2, - "pageSizeOptions": Array [ - 2, - 4, - 6, - ], - "showPerPageOptions": undefined, - "totalItemCount": 4, - } - } - responsive={true} - tableLayout="fixed" - > +
-
- -
+
+
+
+
+ + + + + + + + -
+
- -
- -
- - -
- -
- -
- - + + description + + +
- - - - - - - - - - - - - + + + + + - - - - - - - - +
+ + name4 + +
+ + +
+
+ Name + +
+ - -
- - - - - - Name - - - - - - description - - - - -
+
-
-
- Name -
-
- - name3 - -
-
+
+
+
+
+
+
+
+ +
+
- - -
- + Page 2 of 2 + + + +
    +
  • -
    - - - - , - "ctr": 2, - "insertionPoint": undefined, - "isSpeedy": false, - "key": "css", - "nonce": undefined, - "prepend": undefined, - "tags": Array [ - , - , - ], - }, - } - } - isStringTag={true} - serialized={ - Object { - "map": "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNwYWNlci5zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBdUJRIiwiZmlsZSI6InNwYWNlci5zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuICogQ29weXJpZ2h0IEVsYXN0aWNzZWFyY2ggQi5WLiBhbmQvb3IgbGljZW5zZWQgdG8gRWxhc3RpY3NlYXJjaCBCLlYuIHVuZGVyIG9uZVxuICogb3IgbW9yZSBjb250cmlidXRvciBsaWNlbnNlIGFncmVlbWVudHMuIExpY2Vuc2VkIHVuZGVyIHRoZSBFbGFzdGljIExpY2Vuc2VcbiAqIDIuMCBhbmQgdGhlIFNlcnZlciBTaWRlIFB1YmxpYyBMaWNlbnNlLCB2IDE7IHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0XG4gKiBpbiBjb21wbGlhbmNlIHdpdGgsIGF0IHlvdXIgZWxlY3Rpb24sIHRoZSBFbGFzdGljIExpY2Vuc2UgMi4wIG9yIHRoZSBTZXJ2ZXJcbiAqIFNpZGUgUHVibGljIExpY2Vuc2UsIHYgMS5cbiAqL1xuXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBVc2VFdWlUaGVtZSB9IGZyb20gJy4uLy4uL3NlcnZpY2VzJztcblxuZXhwb3J0IGNvbnN0IGV1aVNwYWNlclN0eWxlcyA9ICh7IGV1aVRoZW1lIH06IFVzZUV1aVRoZW1lKSA9PiAoe1xuICAvLyBiYXNlXG4gIGV1aVNwYWNlcjogY3NzYFxuICAgIGZsZXgtc2hyaW5rOiAwOyAvLyBkb24ndCBldmVyIGxldCB0aGlzIHNocmluayBpbiBoZWlnaHQgaWYgZGlyZWN0IGRlc2NlbmRlbnQgb2YgZmxleDtcbiAgYCxcbiAgLy8gdmFyaWFudHNcbiAgeHM6IGNzc2BcbiAgICBoZWlnaHQ6ICR7ZXVpVGhlbWUuc2l6ZS54c307XG4gIGAsXG4gIHM6IGNzc2BcbiAgICBoZWlnaHQ6ICR7ZXVpVGhlbWUuc2l6ZS5zfTtcbiAgYCxcbiAgbTogY3NzYFxuICAgIGhlaWdodDogJHtldWlUaGVtZS5zaXplLmJhc2V9O1xuICBgLFxuICBsOiBjc3NgXG4gICAgaGVpZ2h0OiAke2V1aVRoZW1lLnNpemUubH07XG4gIGAsXG4gIHhsOiBjc3NgXG4gICAgaGVpZ2h0OiAke2V1aVRoZW1lLnNpemUueGx9O1xuICBgLFxuICB4eGw6IGNzc2BcbiAgICBoZWlnaHQ6ICR7ZXVpVGhlbWUuc2l6ZS54eGx9O1xuICBgLFxufSk7XG4iXX0= */", - "name": "hg1jdf-euiSpacer-m", - "next": undefined, - "styles": "flex-shrink:0;label:euiSpacer;;;height:16px;;label:m;;;", - "toString": [Function], - } - } - /> -
    -
    - - + + 1 + + + +
  • +
  • - -
    - -
    - - - - : - 2 - - - } - closePopover={[Function]} - display="inlineBlock" - hasArrow={true} - isOpen={false} - ownFocus={true} - panelPaddingSize="none" - > -
    -
    - - - -
    -
    -
    -
    -
    - -
    - - - -
    -
    -
    -
    - -
-
-
+ 2 + + + + + + + +
- - +
+
`; exports[`EuiInMemoryTable empty array 1`] = ` diff --git a/src/components/basic_table/in_memory_table.test.tsx b/src/components/basic_table/in_memory_table.test.tsx index 0830df32c7a..5c9c7012314 100644 --- a/src/components/basic_table/in_memory_table.test.tsx +++ b/src/components/basic_table/in_memory_table.test.tsx @@ -985,7 +985,7 @@ describe('EuiInMemoryTable', () => { // this is specifically testing regression against https://github.com/elastic/eui/issues/1007 component.setProps({}); - expect(component).toMatchSnapshot(); + expect(component.render()).toMatchSnapshot(); }); test('pagination with actions column and sorting set to true', async () => { diff --git a/src/components/markdown_editor/__snapshots__/markdown_editor.test.tsx.snap b/src/components/markdown_editor/__snapshots__/markdown_editor.test.tsx.snap index 4385da755ac..86bf351244a 100644 --- a/src/components/markdown_editor/__snapshots__/markdown_editor.test.tsx.snap +++ b/src/components/markdown_editor/__snapshots__/markdown_editor.test.tsx.snap @@ -1381,2223 +1381,6 @@ exports[`EuiMarkdownEditor is rendered 1`] = `
`; -exports[`EuiMarkdownEditor modal with help syntax is rendered 1`] = ` - -
- ", - "surroundWithNewlines": true, - }, - "name": "mdQuote", - }, - "mdTl": Object { - "button": Object { - "iconType": "", - "label": "", - }, - "formatting": Object { - "multiline": true, - "prefix": "- [ ] ", - "surroundWithNewlines": true, - }, - "name": "mdTl", - }, - "mdUl": Object { - "button": Object { - "iconType": "", - "label": "", - }, - "formatting": Object { - "multiline": true, - "prefix": "- ", - "surroundWithNewlines": true, - }, - "name": "mdUl", - }, - "tooltipPlugin": Object { - "button": Object { - "iconType": "editorComment", - "label": "Tooltip", - }, - "formatting": Object { - "prefix": "!{tooltip[", - "suffix": "]()}", - "trimFirst": true, - }, - "helpText": - !{tooltip[anchor text](helpful description)} - , - "name": "tooltipPlugin", - }, - }, - } - } - onClickPreview={[Function]} - uiPlugins={ - Array [ - Object { - "button": Object { - "iconType": "editorComment", - "label": "Tooltip", - }, - "formatting": Object { - "prefix": "!{tooltip[", - "suffix": "]()}", - "trimFirst": true, - }, - "helpText": - !{tooltip[anchor text](helpful description)} - , - "name": "tooltipPlugin", - }, - ] - } - viewMode="editing" - > -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
-
-
- - !{tooltip[anchor text](helpful description)} - , - "name": "tooltipPlugin", - }, - ] - } - > -
- - -