Skip to content

Commit

Permalink
Bumping EUI to 39.0.0 (elastic#113633)
Browse files Browse the repository at this point in the history
* Upgraded the version of EUI to 38.2.0 from 38.0.1

* Updated the i18n mappings required for EUI v.38.2.0

* Update i18n snapshots and resolve linting error

* Removed html_id_generator mocks.

Current mock was failing due to missing useGeneratedHtmlId export. This is safe to remove because EUI contains a .testenv that contains an mock for html_id_generator. More info at https://github.com/elastic/eui/blob/master/src/services/accessibility/html_id_generator.testenv.ts

* Resolve linting error in i18n mapping file

* Removed html_id_generator mocks.

Current mock was failing due to missing useGeneratedHtmlId export. This is safe to remove because EUI contains a .testenv that contains a mock for html_id_generator. More info at https://github.com/elastic/eui/blob/master/src/services/accessibility/html_id_generator.testenv.ts

* Update plugin snapshots

* Resolve merge conflict in license_checker config.ts file

* Upgrade EUI to version 39.0.0 from the original target (38.2.0) to handle an issue found with a functional test during the original upgrade

* Updated the i18n mapping for EUI v.39.0.0

* Update various snapshots to account for the an i18n translation token addition in EUI v. 39.0.0

* Updated test cases marked as obsolete by CI

* Update src/dev/license_checker/config.ts

Removing TODO comments from src/dev/license_checker/config.ts as they are no longer needed.

Co-authored-by: Constance <constancecchen@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
  • Loading branch information
3 people committed Oct 12, 2021
1 parent c5a0aaa commit f70bc2e
Show file tree
Hide file tree
Showing 42 changed files with 204 additions and 166 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"@elastic/datemath": "link:bazel-bin/packages/elastic-datemath",
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@^7.16.0-canary.4",
"@elastic/ems-client": "7.15.0",
"@elastic/eui": "38.0.1",
"@elastic/eui": "39.0.0",
"@elastic/filesaver": "1.1.2",
"@elastic/good": "^9.0.1-kibana3",
"@elastic/maki": "6.3.0",
Expand Down

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

7 changes: 5 additions & 2 deletions src/core/public/i18n/__snapshots__/i18n_service.test.tsx.snap

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

23 changes: 19 additions & 4 deletions src/core/public/i18n/i18n_eui_mapping.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ export const getEuiContextMapping = (): EuiTokensObject => {
values: { tableCaption },
description: 'Screen reader text to describe the pagination controls',
}),
'euiBasicTable.noItemsMessage': i18n.translate('core.euiBasicTable.noItemsMessage', {
defaultMessage: 'No items found',
}),
'euiBottomBar.customScreenReaderAnnouncement': ({ landmarkHeading }: EuiValues) =>
i18n.translate('core.euiBottomBar.customScreenReaderAnnouncement', {
defaultMessage:
Expand Down Expand Up @@ -634,19 +637,31 @@ export const getEuiContextMapping = (): EuiTokensObject => {
defaultMessage: 'Syntax help',
}
),
'euiMarkdownEditorFooter.descriptionPrefix': i18n.translate(
'core.euiMarkdownEditorFooter.descriptionPrefix',
'euiMarkdownEditorFooter.mdSyntaxLink': i18n.translate(
'core.euiMarkdownEditorFooter.mdSyntaxLink',
{
defaultMessage: 'GitHub flavored markdown',
}
),
'euiMarkdownEditorFooter.syntaxModalDescriptionPrefix': i18n.translate(
'core.euiMarkdownEditorFooter.syntaxModalDescriptionPrefix',
{
defaultMessage: 'This editor uses',
}
),
'euiMarkdownEditorFooter.descriptionSuffix': i18n.translate(
'core.euiMarkdownEditorFooter.descriptionSuffix',
'euiMarkdownEditorFooter.syntaxModalDescriptionSuffix': i18n.translate(
'core.euiMarkdownEditorFooter.syntaxModalDescriptionSuffix',
{
defaultMessage:
'You can also utilize these additional syntax plugins to add rich content to your text.',
}
),
'euiMarkdownEditorFooter.syntaxPopoverDescription': i18n.translate(
'core.euiMarkdownEditorFooter.syntaxPopoverDescription',
{
defaultMessage: 'This editor uses',
}
),
'euiMarkdownEditorToolbar.editor': i18n.translate('core.euiMarkdownEditorToolbar.editor', {
defaultMessage: 'Editor',
}),
Expand Down
2 changes: 1 addition & 1 deletion src/dev/license_checker/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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@38.0.1': ['SSPL-1.0 OR Elastic License 2.0'],
'@elastic/eui@39.0.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
};

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 @@ -14,12 +14,6 @@ import { mountWithI18nProvider } from '@kbn/test/jest';
import { Frequency } from './types';
import { CronEditor } from './cron_editor';

jest.mock('@elastic/eui/lib/services/accessibility/html_id_generator', () => {
return {
htmlIdGenerator: () => () => `generated-id`,
};
});

describe('CronEditor', () => {
['MINUTE', 'HOUR', 'DAY', 'WEEK', 'MONTH', 'YEAR'].forEach((unit) => {
test(`is rendered with a ${unit} frequency`, () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ import React from 'react';

const EDITOR_ID = 'testEditor';

jest.mock('@elastic/eui/lib/services/accessibility', () => {
return {
htmlIdGenerator: () => () => `generated-id`,
};
});

jest.mock('@elastic/eui', () => {
const original = jest.requireActual('@elastic/eui');

Expand Down

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.

Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ import { createKibanaReactContext } from '../../../../../../kibana_react/public'
import { render } from '@testing-library/react';
import userEvent from '@testing-library/user-event';

jest.mock('@elastic/eui/lib/services/accessibility', () => {
return {
htmlIdGenerator: () => () => `generated-id`,
};
});

const fieldType = 'string';
const format = {
getConverterFor: jest
Expand Down

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.

Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ import props from './__fixtures__/props.json';
import { MemoryRouter } from 'react-router-dom';
import { EuiThemeProvider } from '../../../../../../../../src/plugins/kibana_react/common';

jest.mock('@elastic/eui/lib/services/accessibility/html_id_generator', () => {
return {
htmlIdGenerator: () => () => `generated-id`,
};
});

describe('ErrorGroupOverview -> List', () => {
beforeAll(() => {
mockMoment();
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 @@ -12,12 +12,6 @@ import { mountWithTheme } from '../../../utils/testHelpers';
import { Stackframe as StackframeComponent } from './Stackframe';
import stacktracesMock from './__fixtures__/stacktraces.json';

jest.mock('@elastic/eui/lib/services/accessibility/html_id_generator', () => {
return {
htmlIdGenerator: () => () => `generated-id`,
};
});

describe('Stackframe', () => {
describe('when stackframe has source lines', () => {
let wrapper: ReactWrapper;
Expand Down

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

Loading

0 comments on commit f70bc2e

Please sign in to comment.