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

Bumping EUI to v70.4.0 #145888

Merged
merged 21 commits into from
Dec 2, 2022
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
db246ea
Bumping EUI to v70.3.0
1Copenut Nov 21, 2022
bd4de15
Updating three snapshot tests.
1Copenut Nov 21, 2022
8c8f86a
Updated data-test-subj to current confirm modal string.
1Copenut Nov 21, 2022
05cba26
Updated one confirm modal data-test-subj string.
1Copenut Nov 21, 2022
75cb55f
Updating class euiModal count from 1 to 2.
1Copenut Nov 21, 2022
03ca3d2
Updating four more snapshot tests.
1Copenut Nov 21, 2022
542d3ed
Updating one snapshot, one CSS selector for find method.
1Copenut Nov 21, 2022
8972721
Merge branch 'main' into feature/eui-70.3.0
1Copenut Nov 21, 2022
3628895
Bumping react-focus-on to 3.7.0 to match EUI.
1Copenut Nov 22, 2022
0297330
Merge branch 'feature/eui-70.3.0' of github.com:1Copenut/kibana into …
1Copenut Nov 22, 2022
85f481d
Wrapping confirm title in DIV to restore test.
1Copenut Nov 22, 2022
6c80355
Add blur workaround to password change modal
cee-chen Nov 23, 2022
8c90cd8
Bumping EUI to 70.4.0.
1Copenut Nov 23, 2022
d1c8e3a
Updating 1 unit test for EuiTourStep types.
1Copenut Nov 23, 2022
5389257
Updated modal selector to be more exclusive.
1Copenut Nov 28, 2022
e61e97b
Merge branch 'main' into feature/eui-70.3.0
1Copenut Nov 29, 2022
32ec4cd
Set the correct version delimiter for react-focus-on
1Copenut Nov 29, 2022
016b979
Refactored FormattedMessage to raw i18n so modal title would render a…
1Copenut Nov 29, 2022
6da1228
Merge branch 'main' into feature/eui-70.3.0
1Copenut Nov 29, 2022
ee34833
Merge branch 'main' into feature/eui-70.3.0
1Copenut Dec 1, 2022
80ef488
Merge branch 'main' into feature/eui-70.3.0
1Copenut Dec 1, 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": "5.0.3",
"@elastic/elasticsearch": "npm:@elastic/[email protected]",
"@elastic/ems-client": "8.3.3",
"@elastic/eui": "70.2.4",
"@elastic/eui": "70.4.0",
"@elastic/filesaver": "1.1.2",
"@elastic/node-crypto": "1.2.1",
"@elastic/numeral": "^2.5.1",
Expand Down Expand Up @@ -611,7 +611,7 @@
"react-dom": "^17.0.2",
"react-dropzone": "^4.2.9",
"react-fast-compare": "^2.0.4",
"react-focus-on": "^3.6.0",
"react-focus-on": "^3.7.0",
"react-grid-layout": "^1.3.4",
"react-hook-form": "^7.39.5",
"react-intl": "^2.8.0",
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.

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@70.2.4': ['SSPL-1.0 OR Elastic License 2.0'],
'@elastic/eui@70.4.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 @@ -75,7 +75,7 @@ describe('NoDataPopover', () => {
};
const instance = mount(<NoDataPopover {...props} />);
act(() => {
instance.find(EuiTourStep).prop('footerAction')!.props.onClick();
instance.find('button[data-test-subj="noDataPopoverDismissButton"]').simulate('click');
});
instance.setProps({ ...props });
expect(props.storage.set).toHaveBeenCalledWith(expect.any(String), true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe('CreateCaseModal', () => {
</TestProviders>
);

wrapper.find('.euiModal__closeIcon').first().simulate('click');
wrapper.find('button.euiModal__closeIcon').first().simulate('click');
expect(onCloseCaseModal).toBeCalled();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,13 +421,13 @@ describe('index table', () => {
const rowIndex = 0;
openMenuAndClickButton(rendered, rowIndex, 'forcemergeIndexMenuButton');
snapshot(status(rendered, rowIndex));
expect(rendered.find('.euiModal').length).toBe(1);
expect(rendered.find('div.euiModal').length).toBe(1);

let count = 0;
store.subscribe(() => {
if (count === 1) {
snapshot(status(rendered, rowIndex));
expect(rendered.find('.euiModal').length).toBe(0);
expect(rendered.find('div.euiModal').length).toBe(0);
}
count++;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import React from 'react';
import { EuiFlexItem, EuiCard, EuiButton, EuiLink, EuiConfirmModal, EuiText } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n-react';
import { EXTERNAL_LINKS } from '../../../../../common/constants';
import { i18n } from '@kbn/i18n';

export class RevertToBasic extends React.PureComponent {
cancel = () => {
Expand All @@ -29,12 +30,10 @@ export class RevertToBasic extends React.PureComponent {
}
return (
<EuiConfirmModal
title={
<FormattedMessage
id="xpack.licenseMgmt.licenseDashboard.revertToBasic.confirmModalTitle"
defaultMessage="Confirm Revert to Basic License"
/>
}
title={i18n.translate(
'xpack.licenseMgmt.licenseDashboard.revertToBasic.confirmModalTitle',
{ defaultMessage: 'Confirm Revert to Basic License' }
)}
onCancel={cancelStartBasicLicense}
onConfirm={() => startBasicLicense(licenseType, true)}
cancelButtonText={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const ChangePasswordModal: FunctionComponent<ChangePasswordModalProps> =
const isCurrentUser = currentUser?.username === username;
const isSystemUser = username === 'kibana' || username === 'kibana_system';

const [form, eventHandlers] = useForm({
const [form, { onBlur, ...eventHandlers }] = useForm({
onSubmit: async (values) => {
try {
await new UserAPIClient(services.http!).changePassword(
Expand Down Expand Up @@ -141,6 +141,13 @@ export const ChangePasswordModal: FunctionComponent<ChangePasswordModalProps> =
defaultValues,
});

// For some reason, the focus-lock dependency that EuiModal uses to accessibly trap focus
// is fighting the form `onBlur` and causing focus to be lost when clicking between password
// fields, so this workaround waits a tick before validating the form on blur
const validateFormOnBlur = (event: React.FocusEvent<HTMLFormElement & HTMLInputElement>) => {
requestAnimationFrame(() => onBlur(event));
};

const firstFieldRef = useInitialFocus<HTMLInputElement>([isLoading]);
const modalFormId = useGeneratedHtmlId({ prefix: 'modalForm' });

Expand All @@ -158,7 +165,13 @@ export const ChangePasswordModal: FunctionComponent<ChangePasswordModalProps> =
{isLoading ? (
<EuiLoadingContent />
) : (
<EuiForm id={modalFormId} component="form" noValidate {...eventHandlers}>
<EuiForm
id={modalFormId}
component="form"
noValidate
{...eventHandlers}
onBlur={validateFormOnBlur}
>
{isSystemUser ? (
<>
<EuiCallOut
Expand Down
Loading