Skip to content

Commit

Permalink
Upgrade EUI to v74.1.0 (#150235)
Browse files Browse the repository at this point in the history
## Summary

`[email protected]` ⏩ `[email protected]`

___

## [`74.1.0`](https://github.com/elastic/eui/releases/tag/v74.1.0)

- Added new `EuiSkeletonText`, `EuiSkeletonTitle`, `EuiSkeletonCircle`,
and `EuiSkeletonRectangle` components
([#6502](elastic/eui#6502))
- Updated `EuiSuperSelect` screen reader instructions to be more
specific ([#6549](elastic/eui#6549))
- Added `error` and updated `alert` glyphs to `EuiIcon`
([#6550](elastic/eui#6550))
- All `EuiSkeleton` components now accept an `isLoading` flag and
`children`, which automatically handles conditionally rendering loading
skeletons vs. loaded content (`children`)
([#6562](elastic/eui#6562))
- All `EuiSkeleton` components now accept a `contentAriaLabel` prop,
which more meaningfully describes the loaded content to screen readers
([#6562](elastic/eui#6562))
- Updated `EuiPopover` screen reader instructions for mobile and click
behaviors ([#6567](elastic/eui#6567))

**Bug fixes**

- Fixed `EuiCard` to ensure `onClick` method only runs once when `title`
contains a React node
([#6551](elastic/eui#6551))

**Deprecations**

- Deprecated `EuiLoadingContent` - use `EuiSkeletonText` instead
([#6557](elastic/eui#6557))

---------

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
JasonStoltz and kibanamachine authored Feb 9, 2023
1 parent 09be2ba commit 20a9a01
Show file tree
Hide file tree
Showing 14 changed files with 122 additions and 93 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"@elastic/datemath": "5.0.3",
"@elastic/elasticsearch": "npm:@elastic/[email protected]",
"@elastic/ems-client": "8.4.0",
"@elastic/eui": "74.0.1",
"@elastic/eui": "74.1.0",
"@elastic/filesaver": "1.1.2",
"@elastic/node-crypto": "1.2.1",
"@elastic/numeral": "^2.5.1",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,8 @@ export const getEuiContextMapping = (): EuiTokensObject => {
'euiPopover.screenReaderAnnouncement': i18n.translate(
'core.euiPopover.screenReaderAnnouncement',
{
defaultMessage: 'You are in a dialog. To close this dialog, hit escape.',
defaultMessage:
'You are in a dialog. Press Escape, or tap/click outside the dialog to close.',
}
),
'euiProgress.valueText': ({ value }: EuiValues) =>
Expand Down Expand Up @@ -1636,7 +1637,7 @@ export const getEuiContextMapping = (): EuiTokensObject => {
'core.euiSuperSelect.screenReaderAnnouncement',
{
defaultMessage:
'You are in a form selector and must select a single option. Use the up and down keys to navigate or escape to close.',
'You are in a form selector and must select a single option. Use the Up and Down arrow keys to navigate or Escape to close.',
}
),
'euiSuperSelectControl.selectAnOption': ({ selectedValue }: EuiValues) =>
Expand Down Expand Up @@ -1777,5 +1778,15 @@ export const getEuiContextMapping = (): EuiTokensObject => {
defaultMessage: '{eventName} is unread',
values: { eventName },
}),
'euiSkeletonLoading.loadingAriaText': ({ contentAriaLabel }: EuiValues) =>
i18n.translate('core.euiSkeletonLoading.loadingAriaText', {
defaultMessage: 'Loading {contentAriaLabel}',
values: { contentAriaLabel },
}),
'euiSkeletonLoading.loadedAriaText': ({ contentAriaLabel }: EuiValues) =>
i18n.translate('core.euiSkeletonLoading.loadedAriaText', {
defaultMessage: 'Loaded {contentAriaLabel}',
values: { contentAriaLabel },
}),
};
};

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/dev/license_checker/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,6 @@ export const LICENSE_OVERRIDES = {
'[email protected]': ['Eclipse Distribution License - v 1.0'], // cf. https://github.com/bjornharrtell/jsts
'@mapbox/[email protected]': ['MIT'], // license in readme https://github.com/tmcw/jsonlint
'@elastic/[email protected]': ['Elastic License 2.0'],
'@elastic/eui@74.0.1': ['SSPL-1.0 OR Elastic License 2.0'],
'@elastic/eui@74.1.0': ['SSPL-1.0 OR Elastic License 2.0'],
'[email protected]': ['CC-BY-4.0'], // retired ODC‑By license https://github.com/mattcg/language-subtag-registry
};

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@
*/

import React, { FC } from 'react';
import { EuiLoadingContent } from '@elastic/eui';
import { LineRange } from '@elastic/eui/src/components/loading/loading_content';
import { EuiLoadingContent, EuiLoadingContentProps } from '@elastic/eui';

export const OutputLoadingContent: FC<{ text: string }> = ({ text }) => {
const actualLines = text.split(/\r\n|\r|\n/).length + 1;
const lines = actualLines > 4 && actualLines <= 10 ? actualLines : 4;

return (
<EuiLoadingContent data-test-subj={'mlTestModelLoadingContent'} lines={lines as LineRange} />
<EuiLoadingContent
data-test-subj={'mlTestModelLoadingContent'}
lines={lines as EuiLoadingContentProps['lines']}
/>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,9 @@ describe('Field Renderers', () => {
userEvent.click(screen.getByTestId('DefaultFieldRendererOverflow-button'));

expect(
screen.getByText('You are in a dialog. To close this dialog, hit escape.')
screen.getByText(
'You are in a dialog. Press Escape, or tap/click outside the dialog to close.'
)
).toBeInTheDocument();
expect(screen.getByTestId('more-container').textContent).toEqual('item6item7');
});
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ describe('JourneyScreenshotPreview', () => {
);

const img = getByAltText('First step');
const euiPopoverMessage = 'You are in a dialog. To close this dialog, hit escape.'; // Helps to detect if popover is open
const euiPopoverMessage =
'You are in a dialog. Press Escape, or tap/click outside the dialog to close.'; // Helps to detect if popover is open
expect(queryByText(euiPopoverMessage)).toBeNull();
fireEvent.mouseEnter(img);
await waitFor(() => getByText(euiPopoverMessage));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ describe('JourneyStepScreenshotContainer', () => {
);

const img = getByAltText('First step');
const euiPopoverMessage = 'You are in a dialog. To close this dialog, hit escape.';
const euiPopoverMessage =
'You are in a dialog. Press Escape, or tap/click outside the dialog to close.';
expect(queryByText(euiPopoverMessage)).toBeNull();
fireEvent.mouseEnter(img);
await waitFor(() => getByText(euiPopoverMessage));
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1539,10 +1539,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@74.0.1":
version "74.0.1"
resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-74.0.1.tgz#4397d9d5308f9da7abcf66a376bf87fd6f33af7f"
integrity sha512-vaaysWN/CzzMXvt8bGnwHXLPbMgeN7qNUo+mYdqda7aHo2BPvlapmtZmf3L3cIX1m9bxQW/dcuSLLQ5Wcx3fTA==
"@elastic/eui@74.1.0":
version "74.1.0"
resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-74.1.0.tgz#bf60ad199715da3622deb33efb587893a9321073"
integrity sha512-pSoIO7h/T4gR3yZbKcadSt8/pPNb45L6s8mR5nHLDo+otAam6Yo3V1u9Upwc5QOVW82hROPfvao44lY7egIiAw==
dependencies:
"@types/chroma-js" "^2.0.0"
"@types/lodash" "^4.14.160"
Expand Down

0 comments on commit 20a9a01

Please sign in to comment.