Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade EUI to v48.1.1 #125023

Merged
merged 36 commits into from
Feb 23, 2022
Merged
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
17a4fd9
Upgraded the version of EUI to 47.0.0 and react-beautiful-dnd (an EUI…
breehall Feb 8, 2022
705bed6
Update i18n mappings with required changes
breehall Feb 8, 2022
87e64a7
Fix all data grid types/tests missing the new `colIndex` prop passed …
cee-chen Feb 9, 2022
c45937f
Fix cellActions closePopover type to indicate conditionality (only pa…
cee-chen Feb 9, 2022
0fc44c9
Fix more datagrid colIndex errors
cee-chen Feb 9, 2022
455cc18
Improve StatefulCell typing
cee-chen Feb 9, 2022
66627e5
Updated i18n_eui_mapping tests to add euiSelectable.searchResults to …
breehall Feb 9, 2022
b0efbf6
Merge branch 'eui-upgrade-47.0.0' of https://github.com/elastic/kiban…
breehall Feb 9, 2022
08cea5e
Fix failing ML datagrid FTR test
cee-chen Feb 9, 2022
279065f
Merge branch 'eui-upgrade-47.0.0' of https://github.com/elastic/kiban…
breehall Feb 9, 2022
4f9ecf6
Revert attempted ML type change
cee-chen Feb 9, 2022
ea83f85
Merge branch 'eui-upgrade-47.0.0' of https://github.com/elastic/kiban…
breehall Feb 10, 2022
62debfc
Update test files to include up to date snapshots of code samples
breehall Feb 10, 2022
6848bec
Updated a test snapshots to match the latest version of code samples
breehall Feb 10, 2022
1d7b7f7
Upgraded the version of EUI from 47.0.0 to 48.0.0 in package.json and…
breehall Feb 10, 2022
6f64333
Update the required i18n translation mapping file with additions and …
breehall Feb 10, 2022
34cee02
Updated three security screen accessibility tests to check for the ar…
breehall Feb 14, 2022
7a22e29
Updated two unit cases to that are responsible for checking strict eq…
breehall Feb 14, 2022
3a52d77
Code clean up and added a missing internationalization token
breehall Feb 15, 2022
1d377a3
Merged in the latest code from the main branch and resolved a merge c…
breehall Feb 15, 2022
6e6fcf9
Ran yarn kbn bootstrap to update the yarn lock file
breehall Feb 15, 2022
9aa59fb
Fix failing ML FTR test
cee-chen Feb 15, 2022
20541de
Fix failing functional tests that click the datagrid cell expand button
cee-chen Feb 15, 2022
37ebfcc
Merge branch 'main' into eui-upgrade-47.0.0
breehall Feb 16, 2022
2ee9f7a
Merge branch 'main' into eui-upgrade-47.0.0
kibanamachine Feb 16, 2022
d12a3bf
Merge branch 'main' into eui-upgrade-47.0.0
kibanamachine Feb 16, 2022
74f4716
Upgrade to 48.1.1
cee-chen Feb 16, 2022
91bb5ee
Switch to data-test-subj for datagrid cell expansion selectors
cee-chen Feb 16, 2022
ef03f0f
Switch to new `data-test-selected` attribute over `aria-checked`
cee-chen Feb 16, 2022
b64405e
Update snapshots/Jest tests to account for EuiSelectable use in EuiFi…
cee-chen Feb 17, 2022
8172e57
Merge branch 'main' into eui-upgrade-47.0.0
kibanamachine Feb 17, 2022
cdf28f3
Merge branch 'main' into eui-upgrade-47.0.0
kibanamachine Feb 17, 2022
8959774
Merge branch 'main' into eui-upgrade-47.0.0
kibanamachine Feb 17, 2022
3d2dbf0
Merge branch 'main' into eui-upgrade-47.0.0
kibanamachine Feb 21, 2022
586b8ea
Updated the eui-upgrade-47.0.0 branch with code from main and ran kbn…
breehall Feb 22, 2022
376c6aa
Merge branch 'main' into eui-upgrade-47.0.0
kibanamachine Feb 23, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
"@elastic/datemath": "link:bazel-bin/packages/elastic-datemath",
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@8.1.0-canary.2",
"@elastic/ems-client": "8.0.0",
"@elastic/eui": "46.1.0",
"@elastic/eui": "48.1.1",
"@elastic/filesaver": "1.1.2",
"@elastic/node-crypto": "1.2.1",
"@elastic/numeral": "^2.5.1",
Expand Down Expand Up @@ -336,7 +336,7 @@
"re2": "^1.16.0",
"react": "^16.12.0",
"react-ace": "^7.0.5",
"react-beautiful-dnd": "^13.0.0",
"react-beautiful-dnd": "^13.1.0",
"react-color": "^2.13.8",
"react-dom": "^16.12.0",
"react-dropzone": "^4.2.9",
Expand Down
17 changes: 14 additions & 3 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.

2 changes: 1 addition & 1 deletion src/core/public/i18n/i18n_eui_mapping.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ describe('@elastic/eui i18n tokens', () => {
test('defaultMessage is in sync with defString', () => {
// Certain complex tokens (e.g. ones that have a function as a defaultMessage)
// need custom i18n handling, and can't be checked for basic defString equality
const tokensToSkip = ['euiColumnSorting.buttonActive'];
const tokensToSkip = ['euiColumnSorting.buttonActive', 'euiSelectable.searchResults'];
if (tokensToSkip.includes(token)) return;

// Clean up typical errors from the `@elastic/eui` extraction token tool
Expand Down
60 changes: 56 additions & 4 deletions src/core/public/i18n/i18n_eui_mapping.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,8 @@ export const getEuiContextMapping = (): EuiTokensObject => {
defaultMessage: 'Row: {row}; Column: {col}',
values: { row, col },
}),
'euiDataGridCellButtons.expandButtonTitle': i18n.translate(
'core.euiDataGridCellButtons.expandButtonTitle',
'euiDataGridCellActions.expandButtonTitle': i18n.translate(
'core.euiDataGridCellActions.expandButtonTitle',
{
defaultMessage: 'Click or hit enter to interact with cell content',
}
Expand Down Expand Up @@ -954,13 +954,37 @@ export const getEuiContextMapping = (): EuiTokensObject => {
values={{ searchValue }}
/>
),
'euiSelectable.screenReaderInstructions': i18n.translate(
'core.euiSelectable.screenReaderInstructions',
{
defaultMessage:
'Use up and down arrows to move focus over options. Enter to select. Escape to collapse options.',
}
),
'euiSelectable.searchResults': ({ resultsLength }: EuiValues) =>
i18n.translate('core.euiSelectable.searchResults', {
defaultMessage: '{resultsLength, plural, one {# result} other {# results}}',
values: { resultsLength },
}),
'euiSelectable.placeholderName': i18n.translate('core.euiSelectable.placeholderName', {
defaultMessage: 'Filter options',
}),
'euiSelectableListItem.checkedOption': i18n.translate(
'core.euiSelectableListItem.checkedOption',
{
defaultMessage: 'Checked option.',
}
),
'euiSelectableListItem.checkedOptionInstructions': i18n.translate(
'core.euiSelectableListItem.checkedOptionInstructions',
{
defaultMessage: 'To uncheck this option, press enter.',
}
),
'euiSelectableListItem.includedOption': i18n.translate(
'core.euiSelectableListItem.includedOption',
{
defaultMessage: 'Included option.',
defaultMessage: 'Selected option.',
}
),
'euiSelectableListItem.includedOptionInstructions': i18n.translate(
Expand All @@ -978,7 +1002,13 @@ export const getEuiContextMapping = (): EuiTokensObject => {
'euiSelectableListItem.excludedOptionInstructions': i18n.translate(
'core.euiSelectableListItem.excludedOptionInstructions',
{
defaultMessage: 'To deselect this option, press enter.',
defaultMessage: 'To uncheck this option, press enter.',
}
),
'euiSelectableListItem.unckeckedOptionInstructions': i18n.translate(
'core.euiSelectableListItem.unckeckedOptionInstructions',
{
defaultMessage: 'To select this option, press enter.',
}
),
'euiSelectableTemplateSitewide.loadingResults': i18n.translate(
Expand Down Expand Up @@ -1088,6 +1118,28 @@ export const getEuiContextMapping = (): EuiTokensObject => {
defaultMessage: 'Step {number} is loading',
values: { number },
}),
'euiSuggest.stateSavedTooltip': i18n.translate('core.euiSuggest.stateSavedTooltip', {
defaultMessage: 'Saved.',
}),

'euiSuggest.stateUnsavedTooltip': i18n.translate('core.euiSuggest.stateUnsavedTooltip', {
defaultMessage: 'Changes have not been saved.',
}),

'euiSuggest.stateLoading': i18n.translate('core.euiSuggest.stateLoading', {
defaultMessage: 'State: loading.',
}),

'euiSuggest.stateSaved': i18n.translate('core.euiSuggest.stateSaved', {
defaultMessage: 'State: saved.',
}),

'euiSuggest.stateUnsaved': i18n.translate('core.euiSuggest.stateUnsaved', {
defaultMessage: 'State: unsaved.',
}),
'euiSuggest.stateUnchanged': i18n.translate('core.euiSuggest.stateUnchanged', {
defaultMessage: 'State: unchanged.',
}),
'euiSuperSelect.screenReaderAnnouncement': i18n.translate(
'core.euiSuperSelect.screenReaderAnnouncement',
{
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 @@ -77,6 +77,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.0.0': ['Elastic License 2.0'],
'@elastic/eui@46.1.0': ['SSPL-1.0 OR Elastic License 2.0'],
'@elastic/eui@48.1.1': ['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.

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 @@ -40,7 +40,8 @@ describe('Discover cell actions ', function () {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Component={(props: any) => <EuiButton {...props} />}
rowIndex={1}
columnId={'extension'}
colIndex={1}
columnId="extension"
isExpanded={false}
closePopover={jest.fn()}
/>
Expand Down Expand Up @@ -68,7 +69,8 @@ describe('Discover cell actions ', function () {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Component={(props: any) => <EuiButton {...props} />}
rowIndex={1}
columnId={'extension'}
colIndex={1}
columnId="extension"
isExpanded={false}
closePopover={jest.fn()}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ describe('document selection', () => {
<DiscoverGridContext.Provider value={contextMock}>
<SelectButton
rowIndex={0}
colIndex={0}
setCellProps={jest.fn()}
columnId="test"
isExpanded={false}
Expand All @@ -80,6 +81,7 @@ describe('document selection', () => {
<DiscoverGridContext.Provider value={contextMock}>
<SelectButton
rowIndex={0}
colIndex={0}
setCellProps={jest.fn()}
columnId="test"
isExpanded={false}
Expand All @@ -102,6 +104,7 @@ describe('document selection', () => {
<DiscoverGridContext.Provider value={contextMock}>
<SelectButton
rowIndex={0}
colIndex={0}
setCellProps={jest.fn()}
columnId="test"
isExpanded={false}
Expand All @@ -125,6 +128,7 @@ describe('document selection', () => {
<DiscoverGridContext.Provider value={contextMock}>
<SelectButton
rowIndex={0}
colIndex={0}
setCellProps={jest.fn()}
columnId="test"
isExpanded={false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ describe('Discover grid view button ', function () {
<DiscoverGridContext.Provider value={contextMock}>
<ExpandButton
rowIndex={0}
colIndex={0}
setCellProps={jest.fn()}
columnId="test"
isExpanded={false}
Expand All @@ -57,6 +58,7 @@ describe('Discover grid view button ', function () {
<DiscoverGridContext.Provider value={contextMock}>
<ExpandButton
rowIndex={0}
colIndex={0}
setCellProps={jest.fn()}
columnId="test"
isExpanded={false}
Expand All @@ -79,6 +81,7 @@ describe('Discover grid view button ', function () {
<DiscoverGridContext.Provider value={contextMock}>
<ExpandButton
rowIndex={1}
colIndex={0}
setCellProps={jest.fn()}
columnId="test"
isExpanded={false}
Expand Down
Loading