Skip to content

Commit

Permalink
Upgrade EUI to v53.0.1 (#128825) (#129150)
Browse files Browse the repository at this point in the history
* Upgrade EUI to v53.0.1

* Update i18n EUI mappings with new super date picker tokens

* Update deprecated prettyDuration usage

* Fix misc tests/type updates caused by EuiSuperDatePicker i18n release

- Fix mock typeof: this changed because the exported EuiSuperDatePicker is no longer a class, but a functional component wrapper around a class

- CI test: update now-capitalized datepicker select copy

- Jest tests: update snapshots, find()s (`Memo()` selector change is due to the exported EuiSuperDatePicker change)

* [kibana-app-services feedback] use renderToString

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 6a44f1f)

Co-authored-by: Constance <constancecchen@users.noreply.github.com>
  • Loading branch information
kibanamachine and Constance authored Apr 1, 2022
1 parent 611c523 commit 5bdb075
Show file tree
Hide file tree
Showing 15 changed files with 443 additions and 90 deletions.
2 changes: 1 addition & 1 deletion 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.2.0-canary.1",
"@elastic/ems-client": "8.2.0",
"@elastic/eui": "52.2.0",
"@elastic/eui": "53.0.1",
"@elastic/filesaver": "1.1.2",
"@elastic/node-crypto": "1.2.1",
"@elastic/numeral": "^2.5.1",
Expand Down
82 changes: 80 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.

26 changes: 25 additions & 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,31 @@ 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', 'euiSelectable.searchResults'];
const tokensToSkip = [
'euiColumnSorting.buttonActive',
'euiSelectable.searchResults',
'euiPrettyDuration.lastDurationSeconds',
'euiPrettyDuration.nextDurationSeconds',
'euiPrettyDuration.lastDurationMinutes',
'euiPrettyDuration.nextDurationMinutes',
'euiPrettyDuration.lastDurationHours',
'euiPrettyDuration.nextDurationHours',
'euiPrettyDuration.lastDurationDays',
'euiPrettyDuration.nexttDurationDays',
'euiPrettyDuration.lastDurationWeeks',
'euiPrettyDuration.nextDurationWeeks',
'euiPrettyDuration.lastDurationMonths',
'euiPrettyDuration.nextDurationMonths',
'euiPrettyDuration.lastDurationYears',
'euiPrettyDuration.nextDurationYears',
'euiPrettyInterval.seconds',
'euiPrettyInterval.minutes',
'euiPrettyInterval.hours',
'euiPrettyInterval.days',
'euiPrettyInterval.weeks',
'euiPrettyInterval.months',
'euiPrettyInterval.years',
];
if (tokensToSkip.includes(token)) return;

// Clean up typical errors from the `@elastic/eui` extraction token tool
Expand Down
Loading

0 comments on commit 5bdb075

Please sign in to comment.