Skip to content

Commit

Permalink
Upgrade EUI to v60.3.0 (#136405)
Browse files Browse the repository at this point in the history
* Upgrade EUI to version 60.3.0

* Updated i18n translation mappings

* Updated snapshot for i18n test file

* Updated the regex pattern responsible for checking datagrid row and column names to match the updated pattern in the latest version of EUI

* update regex catpure group order

* update regex capture groups to ignore categorical info for text

Co-authored-by: Greg Thompson <thompson.glowe@gmail.com>
  • Loading branch information
breehall and thompsongl authored Jul 21, 2022
1 parent f7d9705 commit 44f7338
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 14 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/elasticsearch-canary@8.3.0-canary.1",
"@elastic/ems-client": "8.3.3",
"@elastic/eui": "60.1.2",
"@elastic/eui": "60.3.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 @@ -401,10 +401,10 @@ export const getEuiContextMapping = (): EuiTokensObject => {
values: { page, pageCount },
description: 'Screen reader text to describe the size of the data grid',
}),
'euiDataGridCell.position': ({ row, col }: EuiValues) =>
'euiDataGridCell.position': ({ columnId, row, col }: EuiValues) =>
i18n.translate('core.euiDataGridCell.position', {
defaultMessage: 'Row: {row}; Column: {col}',
values: { row, col },
defaultMessage: '{columnId}, column {col}, row {row}',
values: { columnId, row, col },
}),
'euiDataGridCellActions.expandButtonTitle': i18n.translate(
'core.euiDataGridCellActions.expandButtonTitle',
Expand All @@ -418,6 +418,13 @@ export const getEuiContextMapping = (): EuiTokensObject => {
defaultMessage: 'Header actions',
}
),
'euiDataGridHeaderCell.actionsPopoverScreenReaderText': i18n.translate(
'core.euiDataGridHeaderCell.actionsPopoverScreenReaderText',
{
defaultMessage:
'To navigate through the list of column actions, press the Tab or Up and Down arrow keys.',
}
),
'euiDataGridPagination.detailedPaginationLabel': ({ label }: EuiValues) =>
i18n.translate('core.euiDataGridPagination.detailedPaginationLabel', {
defaultMessage: 'Pagination for preceding grid: {label}',
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 @@ -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.1.2': ['SSPL-1.0 OR Elastic License 2.0'],
'@elastic/eui@60.3.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
};
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -1463,7 +1463,6 @@
"core.euiDataGrid.ariaLabel": "{label} ; page {page} sur {pageCount}.",
"core.euiDataGrid.ariaLabelledBy": "Page {page} sur {pageCount}.",
"core.euiDataGrid.screenReaderNotice": "Cette cellule contient du contenu interactif.",
"core.euiDataGridCell.position": "Ligne : {row} ; colonne : {col}",
"core.euiDataGridCellActions.expandButtonTitle": "Cliquez ou appuyez sur Entrée pour interagir avec le contenu de la cellule.",
"core.euiDataGridHeaderCell.headerActions": "Actions d'en-tête",
"core.euiDataGridPagination.detailedPaginationLabel": "Pagination pour la grille précédente : {label}",
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -1465,7 +1465,6 @@
"core.euiDataGrid.ariaLabel": "{label}; {page}/{pageCount}ページ。",
"core.euiDataGrid.ariaLabelledBy": "{page}/{pageCount}ページ。",
"core.euiDataGrid.screenReaderNotice": "セルにはインタラクティブコンテンツが含まれます。",
"core.euiDataGridCell.position": "行:{row}、列:{col}",
"core.euiDataGridCellActions.expandButtonTitle": "クリックするか enter を押すと、セルのコンテンツとインタラクトできます。",
"core.euiDataGridHeaderCell.headerActions": "ヘッダーアクション",
"core.euiDataGridPagination.detailedPaginationLabel": "前のグリッドのページネーション:{label}",
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -1465,7 +1465,6 @@
"core.euiDataGrid.ariaLabel": "{label};第 {page} 页,共 {pageCount} 页。",
"core.euiDataGrid.ariaLabelledBy": "第 {page} 页,共 {pageCount} 页。",
"core.euiDataGrid.screenReaderNotice": "单元格包含交互内容。",
"core.euiDataGridCell.position": "行:{row};列:{col}",
"core.euiDataGridCellActions.expandButtonTitle": "单击或按 Enter 键以便与单元格内容进行交互",
"core.euiDataGridHeaderCell.headerActions": "标题操作",
"core.euiDataGridPagination.detailedPaginationLabel": "前面网格的分页:{label}",
Expand Down
4 changes: 2 additions & 2 deletions x-pack/test/functional/services/ml/common_data_grid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ export function MachineLearningCommonDataGridProvider({ getService }: FtrProvide
.toArray()
.map((cell) => {
const cellText = $(cell).text();
const pattern = /^(.*)Row: (\d+); Column: (\d+)$/;
const pattern = /^(.*)-(?:.*), column (\d+), row (\d+)$/;
const matches = cellText.match(pattern);
expect(matches).to.not.eql(null, `Cell text should match pattern '${pattern}'`);
return { text: matches![1], row: Number(matches![2]), column: Number(matches![3]) };
return { text: matches![1], column: Number(matches![2]), row: Number(matches![3]) };
})
.filter((cell) =>
maxColumnsToParse !== undefined ? cell?.column <= maxColumnsToParse : false
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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.1.2":
version "60.1.2"
resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-60.1.2.tgz#9a07aab77743866f6df40468a2acf4f39ea38152"
integrity sha512-99RZpuFLbButUUS3JTGyHSsiSkkm4bdraDV0K4hDrbQJ7Wss0l9aUdx2FhUgI4pNQ1v41EHRQYykP37J9nolxg==
"@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==
dependencies:
"@types/chroma-js" "^2.0.0"
"@types/lodash" "^4.14.160"
Expand Down

0 comments on commit 44f7338

Please sign in to comment.