From 703ad7caf230b6498e8a5b7b24ebbdd5b59a34fd Mon Sep 17 00:00:00 2001 From: Nathan Reese Date: Fri, 30 Oct 2020 14:34:53 -0600 Subject: [PATCH 1/8] [Maps] convert vector style component to typescript round 1 (#81961) * [Maps] convert vector style component to typescript round 1 * clean up * review feedback Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- ...ditor.js => vector_style_color_editor.tsx} | 11 ++- .../{field_select.js => field_select.tsx} | 88 +++++++++++-------- ...yle_label.js => get_vector_style_label.ts} | 4 +- .../{stop_input.js => stop_input.tsx} | 41 ++++++--- ...e_prop_editor.js => style_prop_editor.tsx} | 77 ++++++++++------ 5 files changed, 140 insertions(+), 81 deletions(-) rename x-pack/plugins/maps/public/classes/styles/vector/components/color/{vector_style_color_editor.js => vector_style_color_editor.tsx} (69%) rename x-pack/plugins/maps/public/classes/styles/vector/components/{field_select.js => field_select.tsx} (56%) rename x-pack/plugins/maps/public/classes/styles/vector/components/{get_vector_style_label.js => get_vector_style_label.ts} (94%) rename x-pack/plugins/maps/public/classes/styles/vector/components/{stop_input.js => stop_input.tsx} (76%) rename x-pack/plugins/maps/public/classes/styles/vector/components/{style_prop_editor.js => style_prop_editor.tsx} (59%) diff --git a/x-pack/plugins/maps/public/classes/styles/vector/components/color/vector_style_color_editor.js b/x-pack/plugins/maps/public/classes/styles/vector/components/color/vector_style_color_editor.tsx similarity index 69% rename from x-pack/plugins/maps/public/classes/styles/vector/components/color/vector_style_color_editor.js rename to x-pack/plugins/maps/public/classes/styles/vector/components/color/vector_style_color_editor.tsx index 43e7050b3d1d2..4527f56c04d2e 100644 --- a/x-pack/plugins/maps/public/classes/styles/vector/components/color/vector_style_color_editor.js +++ b/x-pack/plugins/maps/public/classes/styles/vector/components/color/vector_style_color_editor.tsx @@ -6,12 +6,15 @@ import React from 'react'; -import { StylePropEditor } from '../style_prop_editor'; +import { i18n } from '@kbn/i18n'; +import { Props, StylePropEditor } from '../style_prop_editor'; +// @ts-expect-error import { DynamicColorForm } from './dynamic_color_form'; +// @ts-expect-error import { StaticColorForm } from './static_color_form'; -import { i18n } from '@kbn/i18n'; +import { ColorDynamicOptions, ColorStaticOptions } from '../../../../../../common/descriptor_types'; -export function VectorStyleColorEditor(props) { +export function VectorStyleColorEditor(props: Props) { const colorForm = props.styleProperty.isDynamic() ? ( ) : ( @@ -19,7 +22,7 @@ export function VectorStyleColorEditor(props) { ); return ( - {...props} customStaticOptionLabel={i18n.translate( 'xpack.maps.styles.color.staticDynamicSelect.staticLabel', diff --git a/x-pack/plugins/maps/public/classes/styles/vector/components/field_select.js b/x-pack/plugins/maps/public/classes/styles/vector/components/field_select.tsx similarity index 56% rename from x-pack/plugins/maps/public/classes/styles/vector/components/field_select.js rename to x-pack/plugins/maps/public/classes/styles/vector/components/field_select.tsx index dcc1f1eadbd54..57c63413aecda 100644 --- a/x-pack/plugins/maps/public/classes/styles/vector/components/field_select.js +++ b/x-pack/plugins/maps/public/classes/styles/vector/components/field_select.tsx @@ -4,20 +4,30 @@ * you may not use this file except in compliance with the Elastic License. */ -import PropTypes from 'prop-types'; import React from 'react'; -import { EuiComboBox, EuiHighlight, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; -import { FIELD_ORIGIN } from '../../../../../common/constants'; +import { + EuiComboBox, + EuiComboBoxProps, + EuiComboBoxOptionOption, + EuiHighlight, + EuiFlexGroup, + EuiFlexItem, +} from '@elastic/eui'; import { i18n } from '@kbn/i18n'; +import { FIELD_ORIGIN, VECTOR_STYLES } from '../../../../../common/constants'; import { FieldIcon } from '../../../../../../../../src/plugins/kibana_react/public'; +import { StyleField } from '../style_fields_helper'; -function renderOption(option, searchValue, contentClassName) { +function renderOption( + option: EuiComboBoxOptionOption, + searchValue: string, + contentClassName: string +) { + const fieldIcon = option.value ? : null; return ( - - - + {fieldIcon} {option.label} @@ -25,11 +35,11 @@ function renderOption(option, searchValue, contentClassName) { ); } -function groupFieldsByOrigin(fields) { - const fieldsByOriginMap = new Map(); +function groupFieldsByOrigin(fields: StyleField[]) { + const fieldsByOriginMap = new Map(); fields.forEach((field) => { if (fieldsByOriginMap.has(field.origin)) { - const fieldsList = fieldsByOriginMap.get(field.origin); + const fieldsList = fieldsByOriginMap.get(field.origin)!; fieldsList.push(field); fieldsByOriginMap.set(field.origin, fieldsList); } else { @@ -37,7 +47,7 @@ function groupFieldsByOrigin(fields) { } }); - function fieldsListToOptions(fieldsList) { + function fieldsListToOptions(fieldsList: StyleField[]) { return fieldsList .map((field) => { return { value: field, label: field.label }; @@ -50,11 +60,14 @@ function groupFieldsByOrigin(fields) { if (fieldsByOriginMap.size === 1) { // do not show origin group if all fields are from same origin const onlyOriginKey = fieldsByOriginMap.keys().next().value; - const fieldsList = fieldsByOriginMap.get(onlyOriginKey); + const fieldsList = fieldsByOriginMap.get(onlyOriginKey)!; return fieldsListToOptions(fieldsList); } - const optionGroups = []; + const optionGroups: Array<{ + label: string; + options: Array>; + }> = []; fieldsByOriginMap.forEach((fieldsList, fieldOrigin) => { optionGroups.push({ label: i18n.translate('xpack.maps.style.fieldSelect.OriginLabel', { @@ -65,29 +78,46 @@ function groupFieldsByOrigin(fields) { }); }); - optionGroups.sort((a, b) => { - return a.label.toLowerCase().localeCompare(b.label.toLowerCase()); - }); + optionGroups.sort( + (a: EuiComboBoxOptionOption, b: EuiComboBoxOptionOption) => { + return a.label.toLowerCase().localeCompare(b.label.toLowerCase()); + } + ); return optionGroups; } -export function FieldSelect({ fields, selectedFieldName, onChange, styleName, ...rest }) { - const onFieldChange = (selectedFields) => { +type Props = { + fields: StyleField[]; + selectedFieldName: string; + onChange: ({ field }: { field: StyleField | null }) => void; + styleName: VECTOR_STYLES; +} & Omit< + EuiComboBoxProps, + | 'selectedOptions' + | 'options' + | 'onChange' + | 'singleSelection' + | 'isClearable' + | 'fullWidth' + | 'renderOption' +>; + +export function FieldSelect({ fields, selectedFieldName, onChange, styleName, ...rest }: Props) { + const onFieldChange = (selectedFields: Array>) => { onChange({ - field: selectedFields.length > 0 ? selectedFields[0].value : null, + field: selectedFields.length > 0 && selectedFields[0].value ? selectedFields[0].value : null, }); }; let selectedOption; if (selectedFieldName) { - const field = fields.find((field) => { - return field.name === selectedFieldName; + const field = fields.find((f) => { + return f.name === selectedFieldName; }); - //Do not spread in all the other unused values (e.g. type, supportsAutoDomain etc...) if (field) { selectedOption = { - value: field.value, + value: field, label: field.label, }; } @@ -110,15 +140,3 @@ export function FieldSelect({ fields, selectedFieldName, onChange, styleName, .. /> ); } - -export const fieldShape = PropTypes.shape({ - name: PropTypes.string.isRequired, - origin: PropTypes.oneOf(Object.values(FIELD_ORIGIN)).isRequired, - type: PropTypes.string.isRequired, -}); - -FieldSelect.propTypes = { - selectedFieldName: PropTypes.string, - fields: PropTypes.arrayOf(fieldShape).isRequired, - onChange: PropTypes.func.isRequired, -}; diff --git a/x-pack/plugins/maps/public/classes/styles/vector/components/get_vector_style_label.js b/x-pack/plugins/maps/public/classes/styles/vector/components/get_vector_style_label.ts similarity index 94% rename from x-pack/plugins/maps/public/classes/styles/vector/components/get_vector_style_label.js rename to x-pack/plugins/maps/public/classes/styles/vector/components/get_vector_style_label.ts index 5d39b423e56e6..1b5f3f47d2204 100644 --- a/x-pack/plugins/maps/public/classes/styles/vector/components/get_vector_style_label.js +++ b/x-pack/plugins/maps/public/classes/styles/vector/components/get_vector_style_label.ts @@ -8,14 +8,14 @@ import { i18n } from '@kbn/i18n'; import { VECTOR_STYLES } from '../../../../../common/constants'; -export function getDisabledByMessage(styleName) { +export function getDisabledByMessage(styleName: VECTOR_STYLES) { return i18n.translate('xpack.maps.styles.vector.disabledByMessage', { defaultMessage: `Set '{styleLabel}' to enable`, values: { styleLabel: getVectorStyleLabel(styleName) }, }); } -export function getVectorStyleLabel(styleName) { +export function getVectorStyleLabel(styleName: VECTOR_STYLES) { switch (styleName) { case VECTOR_STYLES.FILL_COLOR: return i18n.translate('xpack.maps.styles.vector.fillColorLabel', { diff --git a/x-pack/plugins/maps/public/classes/styles/vector/components/stop_input.js b/x-pack/plugins/maps/public/classes/styles/vector/components/stop_input.tsx similarity index 76% rename from x-pack/plugins/maps/public/classes/styles/vector/components/stop_input.js rename to x-pack/plugins/maps/public/classes/styles/vector/components/stop_input.tsx index 64a5f806e34c4..765626329a7c5 100644 --- a/x-pack/plugins/maps/public/classes/styles/vector/components/stop_input.js +++ b/x-pack/plugins/maps/public/classes/styles/vector/components/stop_input.tsx @@ -5,18 +5,37 @@ */ import _ from 'lodash'; -import React, { Component } from 'react'; +import React, { ChangeEvent, Component } from 'react'; +import { EuiComboBox, EuiComboBoxOptionOption, EuiFieldText } from '@elastic/eui'; +import { IField } from '../../../fields/field'; + +interface Props { + dataTestSubj: string; + field: IField; + getValueSuggestions: (query: string) => Promise; + onChange: (value: string) => void; + value: string; +} + +interface State { + suggestions: string[]; + isLoadingSuggestions: boolean; + hasPrevFocus: boolean; + fieldDataType: string | null; + localFieldTextValue: string; + searchValue?: string; +} -import { EuiComboBox, EuiFieldText } from '@elastic/eui'; +export class StopInput extends Component { + private _isMounted: boolean = false; -export class StopInput extends Component { - constructor(props) { + constructor(props: Props) { super(props); this.state = { suggestions: [], isLoadingSuggestions: false, hasPrevFocus: false, - fieldDataType: undefined, + fieldDataType: null, localFieldTextValue: props.value, }; } @@ -45,15 +64,15 @@ export class StopInput extends Component { } }; - _onChange = (selectedOptions) => { + _onChange = (selectedOptions: Array>) => { this.props.onChange(_.get(selectedOptions, '[0].label', '')); }; - _onCreateOption = (newValue) => { + _onCreateOption = (newValue: string) => { this.props.onChange(newValue); }; - _onSearchChange = async (searchValue) => { + _onSearchChange = async (searchValue: string) => { this.setState( { isLoadingSuggestions: true, @@ -65,8 +84,8 @@ export class StopInput extends Component { ); }; - _loadSuggestions = _.debounce(async (searchValue) => { - let suggestions = []; + _loadSuggestions = _.debounce(async (searchValue: string) => { + let suggestions: string[] = []; try { suggestions = await this.props.getValueSuggestions(searchValue); } catch (error) { @@ -81,7 +100,7 @@ export class StopInput extends Component { } }, 300); - _onFieldTextChange = (event) => { + _onFieldTextChange = (event: ChangeEvent) => { this.setState({ localFieldTextValue: event.target.value }); // onChange can cause UI lag, ensure smooth input typing by debouncing onChange this._debouncedOnFieldTextChange(); diff --git a/x-pack/plugins/maps/public/classes/styles/vector/components/style_prop_editor.js b/x-pack/plugins/maps/public/classes/styles/vector/components/style_prop_editor.tsx similarity index 59% rename from x-pack/plugins/maps/public/classes/styles/vector/components/style_prop_editor.js rename to x-pack/plugins/maps/public/classes/styles/vector/components/style_prop_editor.tsx index e7df47bc6d4cb..43b088074a30e 100644 --- a/x-pack/plugins/maps/public/classes/styles/vector/components/style_prop_editor.js +++ b/x-pack/plugins/maps/public/classes/styles/vector/components/style_prop_editor.tsx @@ -4,8 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import React, { Component, Fragment } from 'react'; -import { getVectorStyleLabel, getDisabledByMessage } from './get_vector_style_label'; +import React, { Component, Fragment, ReactElement } from 'react'; import { EuiFormRow, EuiSelect, @@ -14,12 +13,31 @@ import { EuiFieldText, EuiToolTip, } from '@elastic/eui'; -import { STYLE_TYPE } from '../../../../../common/constants'; import { i18n } from '@kbn/i18n'; +import { getVectorStyleLabel, getDisabledByMessage } from './get_vector_style_label'; +import { STYLE_TYPE, VECTOR_STYLES } from '../../../../../common/constants'; +import { FieldMetaOptions } from '../../../../../common/descriptor_types'; +import { IStyleProperty } from '../properties/style_property'; +import { StyleField } from '../style_fields_helper'; + +export interface Props { + children: ReactElement; + customStaticOptionLabel?: string; + defaultStaticStyleOptions: StaticOptions; + defaultDynamicStyleOptions: DynamicOptions; + disabled: boolean; + disabledBy?: VECTOR_STYLES; + fields: StyleField[]; + onDynamicStyleChange: (propertyName: VECTOR_STYLES, options: DynamicOptions) => void; + onStaticStyleChange: (propertyName: VECTOR_STYLES, options: StaticOptions) => void; + styleProperty: IStyleProperty; +} -export class StylePropEditor extends Component { - _prevStaticStyleOptions = this.props.defaultStaticStyleOptions; - _prevDynamicStyleOptions = this.props.defaultDynamicStyleOptions; +export class StylePropEditor extends Component< + Props +> { + private _prevStaticStyleOptions = this.props.defaultStaticStyleOptions; + private _prevDynamicStyleOptions = this.props.defaultDynamicStyleOptions; _onTypeToggle = () => { if (this.props.styleProperty.isDynamic()) { @@ -41,7 +59,7 @@ export class StylePropEditor extends Component { } }; - _onFieldMetaOptionsChange = (fieldMetaOptions) => { + _onFieldMetaOptionsChange = (fieldMetaOptions: FieldMetaOptions) => { const options = { ...this.props.styleProperty.getOptions(), fieldMetaOptions, @@ -89,28 +107,29 @@ export class StylePropEditor extends Component { const staticDynamicSelect = this.renderStaticDynamicSelect(); - const stylePropertyForm = this.props.disabled ? ( - - - - {staticDynamicSelect} - - - - - - - ) : ( - - {React.cloneElement(this.props.children, { - staticDynamicSelect, - })} - {fieldMetaOptionsPopover} - - ); + const stylePropertyForm = + this.props.disabled && this.props.disabledBy ? ( + + + + {staticDynamicSelect} + + + + + + + ) : ( + + {React.cloneElement(this.props.children, { + staticDynamicSelect, + })} + {fieldMetaOptionsPopover} + + ); return ( Date: Fri, 30 Oct 2020 14:46:48 -0700 Subject: [PATCH 2/8] [Alerting UI] Grouped list of alert types using producers in Types filter of Alerts tab (#81876) * Grouped list of alert types using producers in Types filter of Alerts tab * Added e2e test * fixed deps for test utils --- .../plugins/triggers_actions_ui/kibana.json | 2 +- .../public/application/app.tsx | 2 + .../actions_connectors_list.test.tsx | 16 ++++++ .../components/alerts_list.test.tsx | 11 ++++ .../alerts_list/components/alerts_list.tsx | 41 ++++++++++++-- .../alerts_list/components/type_filter.tsx | 56 ++++++++++++------- .../public/application/test_utils/index.ts | 4 ++ .../triggers_actions_ui/public/plugin.ts | 4 ++ .../apps/triggers_actions_ui/alerts_list.ts | 1 + 9 files changed, 110 insertions(+), 27 deletions(-) diff --git a/x-pack/plugins/triggers_actions_ui/kibana.json b/x-pack/plugins/triggers_actions_ui/kibana.json index a4446e0a75120..72e1f0be5f7f4 100644 --- a/x-pack/plugins/triggers_actions_ui/kibana.json +++ b/x-pack/plugins/triggers_actions_ui/kibana.json @@ -3,7 +3,7 @@ "version": "kibana", "server": true, "ui": true, - "optionalPlugins": ["home", "alerts", "stackAlerts"], + "optionalPlugins": ["alerts", "stackAlerts", "features", "home"], "requiredPlugins": ["management", "charts", "data", "kibanaReact"], "configPath": ["xpack", "trigger_actions_ui"], "extraPublicDirs": ["public/common", "public/common/constants"], diff --git a/x-pack/plugins/triggers_actions_ui/public/application/app.tsx b/x-pack/plugins/triggers_actions_ui/public/application/app.tsx index bb9fe65d6bbb8..fc48a8e977c7d 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/app.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/app.tsx @@ -17,6 +17,7 @@ import { ScopedHistory, } from 'kibana/public'; import { Section, routeToAlertDetails } from './constants'; +import { KibanaFeature } from '../../../features/common'; import { AppContextProvider } from './app_context'; import { ActionTypeRegistryContract, AlertTypeRegistryContract } from '../types'; import { ChartsPluginStart } from '../../../../../src/plugins/charts/public'; @@ -44,6 +45,7 @@ export interface AppDeps { actionTypeRegistry: ActionTypeRegistryContract; alertTypeRegistry: AlertTypeRegistryContract; history: ScopedHistory; + kibanaFeatures: KibanaFeature[]; } export const App = (appDeps: AppDeps) => { diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.test.tsx index 33b839dc70b31..e946e881def10 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.test.tsx @@ -15,6 +15,7 @@ import { AppContextProvider } from '../../../app_context'; import { chartPluginMock } from '../../../../../../../../src/plugins/charts/public/mocks'; import { dataPluginMock } from '../../../../../../../../src/plugins/data/public/mocks'; import { alertingPluginMock } from '../../../../../../alerts/public/mocks'; +import { featuresPluginMock } from '../../../../../../features/public/mocks'; jest.mock('../../../lib/action_connector_api', () => ({ loadAllActions: jest.fn(), @@ -49,6 +50,8 @@ describe('actions_connectors_list component empty', () => { application: { capabilities, navigateToApp }, }, ] = await mockes.getStartServices(); + const kibanaFeatures = await featuresPluginMock.createStart().getFeatures(); + const deps = { chrome, docLinks, @@ -71,6 +74,7 @@ describe('actions_connectors_list component empty', () => { setBreadcrumbs: jest.fn(), actionTypeRegistry, alertTypeRegistry: {} as any, + kibanaFeatures, }; actionTypeRegistry.has.mockReturnValue(true); @@ -156,6 +160,8 @@ describe('actions_connectors_list component with items', () => { application: { capabilities, navigateToApp }, }, ] = await mockes.getStartServices(); + const kibanaFeatures = await featuresPluginMock.createStart().getFeatures(); + const deps = { chrome, docLinks, @@ -182,6 +188,7 @@ describe('actions_connectors_list component with items', () => { }, } as any, alertTypeRegistry: {} as any, + kibanaFeatures, }; wrapper = mountWithIntl( @@ -244,6 +251,8 @@ describe('actions_connectors_list component empty with show only capability', () application: { capabilities, navigateToApp }, }, ] = await mockes.getStartServices(); + const kibanaFeatures = await featuresPluginMock.createStart().getFeatures(); + const deps = { chrome, docLinks, @@ -270,6 +279,7 @@ describe('actions_connectors_list component empty with show only capability', () }, } as any, alertTypeRegistry: {} as any, + kibanaFeatures, }; wrapper = mountWithIntl( @@ -333,6 +343,8 @@ describe('actions_connectors_list with show only capability', () => { application: { capabilities, navigateToApp }, }, ] = await mockes.getStartServices(); + const kibanaFeatures = await featuresPluginMock.createStart().getFeatures(); + const deps = { chrome, docLinks, @@ -359,6 +371,7 @@ describe('actions_connectors_list with show only capability', () => { }, } as any, alertTypeRegistry: {} as any, + kibanaFeatures, }; wrapper = mountWithIntl( @@ -434,6 +447,8 @@ describe('actions_connectors_list component with disabled items', () => { application: { capabilities, navigateToApp }, }, ] = await mockes.getStartServices(); + const kibanaFeatures = await featuresPluginMock.createStart().getFeatures(); + const deps = { chrome, docLinks, @@ -460,6 +475,7 @@ describe('actions_connectors_list component with disabled items', () => { }, } as any, alertTypeRegistry: {} as any, + kibanaFeatures, }; wrapper = mountWithIntl( diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.test.tsx index e6e44d4d21bdf..21dd17b538c63 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.test.tsx @@ -18,6 +18,7 @@ import { chartPluginMock } from '../../../../../../../../src/plugins/charts/publ import { dataPluginMock } from '../../../../../../../../src/plugins/data/public/mocks'; import { alertingPluginMock } from '../../../../../../alerts/public/mocks'; import { ALERTS_FEATURE_ID } from '../../../../../../alerts/common'; +import { featuresPluginMock } from '../../../../../../features/public/mocks'; jest.mock('../../../lib/action_connector_api', () => ({ loadActionTypes: jest.fn(), @@ -96,6 +97,9 @@ describe('alerts_list component empty', () => { application: { capabilities, navigateToApp }, }, ] = await mockes.getStartServices(); + + const kibanaFeatures = await featuresPluginMock.createStart().getFeatures(); + const deps = { chrome, docLinks, @@ -111,6 +115,7 @@ describe('alerts_list component empty', () => { setBreadcrumbs: jest.fn(), actionTypeRegistry, alertTypeRegistry, + kibanaFeatures, }; wrapper = mountWithIntl( @@ -265,6 +270,7 @@ describe('alerts_list component with items', () => { application: { capabilities, navigateToApp }, }, ] = await mockes.getStartServices(); + const kibanaFeatures = await featuresPluginMock.createStart().getFeatures(); const deps = { chrome, docLinks, @@ -280,6 +286,7 @@ describe('alerts_list component with items', () => { setBreadcrumbs: jest.fn(), actionTypeRegistry, alertTypeRegistry, + kibanaFeatures, }; alertTypeRegistry.has.mockReturnValue(true); @@ -346,6 +353,7 @@ describe('alerts_list component empty with show only capability', () => { application: { capabilities, navigateToApp }, }, ] = await mockes.getStartServices(); + const kibanaFeatures = await featuresPluginMock.createStart().getFeatures(); const deps = { chrome, docLinks, @@ -365,6 +373,7 @@ describe('alerts_list component empty with show only capability', () => { }, } as any, alertTypeRegistry: {} as any, + kibanaFeatures, }; wrapper = mountWithIntl( @@ -465,6 +474,7 @@ describe('alerts_list with show only capability', () => { application: { capabilities, navigateToApp }, }, ] = await mockes.getStartServices(); + const kibanaFeatures = await featuresPluginMock.createStart().getFeatures(); const deps = { chrome, docLinks, @@ -480,6 +490,7 @@ describe('alerts_list with show only capability', () => { setBreadcrumbs: jest.fn(), actionTypeRegistry, alertTypeRegistry, + kibanaFeatures, }; alertTypeRegistry.has.mockReturnValue(false); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.tsx index 9eb1149cf3905..3f39c698597ce 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_list/components/alerts_list.tsx @@ -7,6 +7,7 @@ /* eslint-disable react-hooks/exhaustive-deps */ import { i18n } from '@kbn/i18n'; +import { capitalize, sortBy } from 'lodash'; import { FormattedMessage } from '@kbn/i18n/react'; import React, { useEffect, useState, Fragment } from 'react'; import { @@ -78,6 +79,7 @@ export const AlertsList: React.FunctionComponent = () => { docLinks, charts, dataPlugin, + kibanaFeatures, } = useAppDependencies(); const canExecuteActions = hasExecuteActionsCapability(capabilities); @@ -334,16 +336,43 @@ export const AlertsList: React.FunctionComponent = () => { (alertType) => alertType.authorizedConsumers[ALERTS_FEATURE_ID]?.all ); + const getProducerFeatureName = (producer: string) => { + return kibanaFeatures?.find((featureItem) => featureItem.id === producer)?.name; + }; + + const groupAlertTypesByProducer = () => { + return authorizedAlertTypes.reduce( + ( + result: Record< + string, + Array<{ + value: string; + name: string; + }> + >, + alertType + ) => { + const producer = alertType.producer; + (result[producer] = result[producer] || []).push({ + value: alertType.id, + name: alertType.name, + }); + return result; + }, + {} + ); + }; + const toolsRight = [ setTypesFilter(types)} - options={authorizedAlertTypes - .map((alertType) => ({ - value: alertType.id, - name: alertType.name, - })) - .sort((a, b) => a.name.localeCompare(b.name))} + options={sortBy(Object.entries(groupAlertTypesByProducer())).map( + ([groupName, alertTypesOptions]) => ({ + groupName: getProducerFeatureName(groupName) ?? capitalize(groupName), + subOptions: alertTypesOptions.sort((a, b) => a.name.localeCompare(b.name)), + }) + )} />, ; }>; onChange?: (selectedTags: string[]) => void; } @@ -52,22 +61,29 @@ export const TypeFilter: React.FunctionComponent = ({ } >
- {options.map((item, index) => ( - { - const isPreviouslyChecked = selectedValues.includes(item.value); - if (isPreviouslyChecked) { - setSelectedValues(selectedValues.filter((val) => val !== item.value)); - } else { - setSelectedValues(selectedValues.concat(item.value)); - } - }} - checked={selectedValues.includes(item.value) ? 'on' : undefined} - data-test-subj={`alertType${item.value}FilterOption`} - > - {item.name} - + {options.map((groupItem, groupIndex) => ( + + +

{groupItem.groupName}

+
+ {groupItem.subOptions.map((item, index) => ( + { + const isPreviouslyChecked = selectedValues.includes(item.value); + if (isPreviouslyChecked) { + setSelectedValues(selectedValues.filter((val) => val !== item.value)); + } else { + setSelectedValues(selectedValues.concat(item.value)); + } + }} + checked={selectedValues.includes(item.value) ? 'on' : undefined} + data-test-subj={`alertType${item.value}FilterOption`} + > + {item.name} + + ))} +
))}
diff --git a/x-pack/plugins/triggers_actions_ui/public/application/test_utils/index.ts b/x-pack/plugins/triggers_actions_ui/public/application/test_utils/index.ts index 7b3872246ca50..b5ab53d868cf1 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/test_utils/index.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/test_utils/index.ts @@ -4,6 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ +import { featuresPluginMock } from '../../../../features/public/mocks'; import { chartPluginMock } from '../../../../../../src/plugins/charts/public/mocks'; import { dataPluginMock } from '../../../../../../src/plugins/data/public/mocks'; import { alertingPluginMock } from '../../../../alerts/public/mocks'; @@ -22,6 +23,8 @@ export async function getMockedAppDependencies() { application: { capabilities, navigateToApp }, }, ] = await coreSetupMock.getStartServices(); + const kibanaFeatures = await featuresPluginMock.createStart().getFeatures(); + return { chrome, docLinks, @@ -37,5 +40,6 @@ export async function getMockedAppDependencies() { setBreadcrumbs: jest.fn(), actionTypeRegistry, alertTypeRegistry, + kibanaFeatures, }; } diff --git a/x-pack/plugins/triggers_actions_ui/public/plugin.ts b/x-pack/plugins/triggers_actions_ui/public/plugin.ts index 393ac5bc1b74d..b22be6ef9b2f6 100644 --- a/x-pack/plugins/triggers_actions_ui/public/plugin.ts +++ b/x-pack/plugins/triggers_actions_ui/public/plugin.ts @@ -12,6 +12,7 @@ import { } from 'src/core/public'; import { i18n } from '@kbn/i18n'; +import { FeaturesPluginStart } from '../../features/public'; import { registerBuiltInActionTypes } from './application/components/builtin_action_types'; import { registerBuiltInAlertTypes } from './application/components/builtin_alert_types'; import { ActionTypeModel, AlertTypeModel } from './types'; @@ -52,6 +53,7 @@ interface PluginsStart { charts: ChartsPluginStart; alerts?: AlertingStart; navigateToApp: CoreStart['application']['navigateToApp']; + features: FeaturesPluginStart; } export class Plugin @@ -112,6 +114,7 @@ export class Plugin ]; const { boot } = await import('./application/boot'); + const kibanaFeatures = await pluginsStart.features.getFeatures(); return boot({ dataPlugin: pluginsStart.data, @@ -131,6 +134,7 @@ export class Plugin history: params.history, actionTypeRegistry, alertTypeRegistry, + kibanaFeatures, }); }, }); diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts_list.ts b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts_list.ts index a69db68c7d35e..f7281a1d93a46 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts_list.ts +++ b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts_list.ts @@ -458,6 +458,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const failinfAlert = await createFailingAlert(); await refreshAlertsList(); await testSubjects.click('alertTypeFilterButton'); + expect(await (await testSubjects.find('alertType0Group')).getVisibleText()).to.eql('Alerts'); await testSubjects.click('alertTypetest.failingFilterOption'); await retry.try(async () => { From bb2e4c6ab5e38e697da1717e84bf91f2ab9b6cb1 Mon Sep 17 00:00:00 2001 From: Brian Seeders Date: Fri, 30 Oct 2020 17:49:58 -0400 Subject: [PATCH 3/8] Skip ES snapshot failing suite (#82206) --- test/functional/apps/getting_started/_shakespeare.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/functional/apps/getting_started/_shakespeare.js b/test/functional/apps/getting_started/_shakespeare.js index e727949da5ad3..38ed3edc7deb5 100644 --- a/test/functional/apps/getting_started/_shakespeare.js +++ b/test/functional/apps/getting_started/_shakespeare.js @@ -35,7 +35,8 @@ export default function ({ getService, getPageObjects }) { // https://www.elastic.co/guide/en/kibana/current/tutorial-load-dataset.html - describe('Shakespeare', function describeIndexTests() { + // Failing: See https://github.com/elastic/kibana/issues/82206 + describe.skip('Shakespeare', function describeIndexTests() { // index starts on the first "count" metric at 1 // Each new metric or aggregation added to a visualization gets the next index. // So to modify a metric or aggregation tests need to keep track of the From 2985def251a1ebfc4e368389f2e7c5fec7426031 Mon Sep 17 00:00:00 2001 From: Brian Seeders Date: Fri, 30 Oct 2020 17:53:28 -0400 Subject: [PATCH 4/8] Skip failing ES snapshot test (#82207) --- .../test/api_integration/apis/security_solution/network_dns.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/test/api_integration/apis/security_solution/network_dns.ts b/x-pack/test/api_integration/apis/security_solution/network_dns.ts index 806e0e60a69b2..966b8184965d1 100644 --- a/x-pack/test/api_integration/apis/security_solution/network_dns.ts +++ b/x-pack/test/api_integration/apis/security_solution/network_dns.ts @@ -18,7 +18,8 @@ export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const supertest = getService('supertest'); - describe('Network DNS', () => { + // Failing: See https://github.com/elastic/kibana/issues/82207 + describe.skip('Network DNS', () => { describe('With packetbeat', () => { before(() => esArchiver.load('packetbeat/dns')); after(() => esArchiver.unload('packetbeat/dns')); From 6fdc7eb1fa6bc1db6272c2eb21be72f30f5f1773 Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Fri, 30 Oct 2020 16:18:27 -0600 Subject: [PATCH 5/8] Upgrade EUI to v30.1.1 (#81499) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * eui to v30.0.0 * removed unused RecentLinks component * update compressed -> display prop * euiformrow compressed -> display * euipopover remove withtitle * euibuttongroup prop updates * remove euibuttontoggle * src snapshot updates * tutorial euibuttongroup update * x-pack snapshot updates * euibuttongroup test updates * TODO * misc. js file updates * remove euinavdrawer scss references * translation removals * more x-pack snapshot updates * update data-test-subj lookup * icons logoAMP -> logoObservability * cypress selector updates * update euibuttontoggle onchange, test interaction * Fix auto-update toggle in Visualize * some more change -> click test updates * idtoselectedmap change * Fix feature table button group * Remove empty SASS file * Fix feature table button group II * Using `compressed` to also dictate dual range row * Fix a few security labels * An ML fix * Apply suggestions from code review Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> * remove unused translation * update view_type_toggle snapshot * more snapshot updates * eui to 30.1.0 * undo temp ts-ignore * more x-pack snapshot updates * eui to 30.1.1 * update feature privilege text * Update x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/sub_feature_form.tsx Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com> * reuse i18n token * Adapt log entry action button to new `minWidth` prop * clean up label * Combine auto apply strings into one * ternary fix * cases status useCallback Co-authored-by: cchaos Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com> Co-authored-by: Felix Stürmer --- package.json | 6 +- packages/kbn-ui-framework/package.json | 2 +- packages/kbn-ui-shared-deps/package.json | 2 +- .../public/chrome/ui/header/recent_links.tsx | 52 -- .../public/static/components/number_input.tsx | 2 +- .../charts/public/static/components/range.tsx | 8 +- .../components/required_number_input.tsx | 2 +- .../public/static/components/select.tsx | 2 +- .../public/static/components/switch.tsx | 2 +- .../public/static/components/text_input.tsx | 2 +- .../dashboard_empty_screen.test.tsx.snap | 6 + .../data/public/ui/filter_bar/filter_bar.tsx | 1 - .../data/public/ui/filter_bar/filter_item.tsx | 1 - .../public/ui/filter_bar/filter_options.tsx | 1 - .../query_string_input/language_switcher.tsx | 1 - .../components/action_bar/action_bar.tsx | 2 +- .../sidebar/discover_field_search.tsx | 2 +- .../components/panel_options_menu/index.tsx | 1 - .../panel/panel_header/panel_options_menu.tsx | 1 - .../saved_objects_installer.test.js.snap | 111 ++- .../__snapshots__/tutorial.test.js.snap | 1 + .../components/tutorial/tutorial.js | 3 + .../components/tutorial/tutorial.test.js | 2 +- .../__snapshots__/indices_list.test.tsx.snap | 5 - .../components/indices_list/indices_list.tsx | 1 - .../validated_range/validated_dual_range.tsx | 8 +- .../__snapshots__/header.test.tsx.snap | 13 + .../public/services/share_menu_manager.tsx | 1 - .../public/context_menu/open_context_menu.tsx | 1 - .../public/components/agg_select.tsx | 2 +- .../__snapshots__/metric_agg.test.tsx.snap | 3 +- .../controls/__snapshots__/size.test.tsx.snap | 3 +- .../__snapshots__/top_aggregate.test.tsx.snap | 3 +- .../components/controls/auto_precision.tsx | 2 +- .../components/simple_number_list.tsx | 2 +- .../components/controls/date_ranges.tsx | 2 +- .../public/components/controls/field.tsx | 2 +- .../public/components/controls/filter.tsx | 2 +- .../public/components/controls/ip_ranges.tsx | 2 +- .../public/components/controls/max_bars.tsx | 2 +- .../public/components/controls/metric_agg.tsx | 7 +- .../components/controls/number_interval.tsx | 2 +- .../public/components/controls/order.tsx | 2 +- .../public/components/controls/order_by.tsx | 7 +- .../components/controls/percentile_ranks.tsx | 2 +- .../components/controls/percentiles.tsx | 2 +- .../public/components/controls/precision.tsx | 2 +- .../controls/radius_ratio_option.tsx | 2 +- .../public/components/controls/ranges.tsx | 2 +- .../public/components/controls/raw_json.tsx | 2 +- .../components/controls/rows_or_columns.tsx | 4 +- .../public/components/controls/size.tsx | 2 +- .../public/components/controls/string.tsx | 2 +- .../components/controls/time_interval.tsx | 2 +- .../components/controls/top_aggregate.tsx | 2 +- .../components/controls/use_geocentroid.tsx | 2 +- .../public/components/sidebar/controls.tsx | 46 +- .../public/components/metric_vis_options.tsx | 2 +- .../public/components/timelion_interval.tsx | 2 +- .../components/common/truncate_labels.tsx | 2 +- .../__snapshots__/y_extents.test.tsx.snap | 3 +- .../options/metrics_axes/y_extents.tsx | 2 +- .../options/point_series/threshold_panel.tsx | 2 +- .../vislib/components/legend/legend_item.tsx | 9 +- .../__snapshots__/new_vis_modal.test.tsx.snap | 12 + .../page_objects/visualize_editor_page.ts | 9 +- .../plugins/kbn_tp_run_pipeline/package.json | 2 +- .../kbn_sample_panel_action/package.json | 2 +- .../kbn_tp_custom_visualizations/package.json | 2 +- .../drilldowns_with_embeddable_example.tsx | 1 - .../drilldowns_without_embeddable_example.tsx | 1 - x-pack/package.json | 2 +- .../PopoverExpression/index.tsx | 1 - .../uis/arguments/image_upload/index.js | 1 + x-pack/plugins/canvas/i18n/components.ts | 12 + x-pack/plugins/canvas/i18n/ui.ts | 4 + .../asset_manager.stories.storyshot | 12 + .../custom_element_modal.stories.storyshot | 20 + .../custom_element_modal.tsx | 4 +- .../datasource_component.stories.storyshot | 5 + .../saved_elements_modal.stories.storyshot | 15 + .../text_style_picker.stories.storyshot | 676 +++++++++--------- .../text_style_picker/text_style_picker.tsx | 2 + .../delete_var.stories.storyshot | 5 + .../__snapshots__/edit_var.stories.storyshot | 128 ++-- .../components/var_config/var_value_field.tsx | 1 + .../element_menu.stories.storyshot | 7 +- .../__snapshots__/pdf_panel.stories.storyshot | 2 + .../view_menu/custom_interval.tsx | 4 +- .../__snapshots__/shareable.test.tsx.snap | 10 +- .../__snapshots__/canvas.stories.storyshot | 6 +- .../__tests__/__snapshots__/app.test.tsx.snap | 2 +- .../__snapshots__/footer.stories.storyshot | 4 +- .../autoplay_settings.stories.storyshot | 6 +- .../__snapshots__/settings.stories.storyshot | 4 +- .../__snapshots__/settings.test.tsx.snap | 19 +- .../components/footer/settings/settings.tsx | 1 - .../auto_follow_pattern_action_menu.tsx | 1 - .../components/context_menu/context_menu.js | 1 - .../components/filterable_users_popover.tsx | 1 - .../components/group_row_sources_dropdown.tsx | 1 - .../extend_index_management.test.tsx.snap | 3 +- .../policy_table/components/table_content.tsx | 1 - .../components/index_lifecycle_summary.tsx | 1 - .../manage_button.tsx | 1 - .../components/create_button_popover.tsx | 1 - .../index_actions_context_menu.js | 1 - .../template_details_content.tsx | 1 - .../common/components/alert_preview.tsx | 2 +- .../inventory/components/expression.tsx | 2 +- .../alerting/inventory/components/metric.tsx | 1 - .../inventory/components/node_type.tsx | 1 - .../components/expression.tsx | 4 +- .../log_entry_context_menu.tsx | 2 +- .../ml/anomaly_detection/job_setup_screen.tsx | 2 +- .../components/waffle/legend_controls.tsx | 1 - .../waffle/waffle_inventory_switcher.tsx | 1 - .../components/chart_options.tsx | 6 +- .../applications/ingest_manager/index.scss | 14 - .../applications/ingest_manager/index.tsx | 1 - .../pipeline_processors_editor.helpers.tsx | 6 +- .../pipeline_processors_editor_item.tsx | 11 +- .../documents_dropdown/documents_dropdown.tsx | 1 - .../pipelines_list/details_flyout.tsx | 1 - .../indexpattern_datasource/field_item.tsx | 2 +- .../upload_license.test.tsx.snap | 36 + .../upgrade_failure.test.js.snap | 18 + .../vector_style_symbolize_as_editor.js | 11 +- .../join_editor/resources/join_expression.js | 1 - .../join_editor/resources/where_expression.js | 1 - .../__snapshots__/tools_control.test.tsx.snap | 2 - .../tools_control/tools_control.tsx | 1 - .../toc_entry_actions_popover.test.tsx.snap | 4 - .../toc_entry_actions_popover.tsx | 1 - .../anomaly_results_view_selector.test.tsx | 4 +- .../condition_expression.test.js.snap | 2 - .../scope_expression.test.js.snap | 3 - .../rule_editor/condition_expression.js | 1 - .../rule_editor/scope_expression.js | 1 - .../exploration_query_bar.tsx | 6 +- .../content_types/number_content.tsx | 2 +- .../__snapshots__/editor.test.tsx.snap | 72 +- .../components/custom_url_editor/editor.tsx | 14 +- .../new_group_input/new_group_input.js | 2 +- .../monitoring/public/alerts/badge.tsx | 2 - .../collection_enabled.test.js.snap | 6 + .../collection_interval.test.js.snap | 12 + .../__snapshots__/setup_mode.test.js.snap | 10 +- .../app/empty_section/index.test.tsx | 4 +- .../public/pages/home/section.ts | 2 +- .../public/pages/overview/empty_section.ts | 4 +- .../application/components/main_controls.tsx | 1 - .../painless_lab/public/styles/_index.scss | 14 - .../remote_cluster_form.test.js.snap | 6 + .../job_action_menu/job_action_menu.js | 1 - .../overwritten_session_page.test.tsx.snap | 7 + .../rule_editor_panel/add_rule_button.tsx | 1 - .../kibana/feature_table/feature_table.tsx | 11 +- .../kibana/feature_table/sub_feature_form.tsx | 12 +- .../simple_privilege_section.test.tsx | 2 +- .../privilege_space_form.tsx | 6 + .../alerts_detection_rules_custom.spec.ts | 7 +- .../alerts_detection_rules_eql.spec.ts | 3 +- .../alerts_detection_rules_override.spec.ts | 3 +- .../alerts_detection_rules_threshold.spec.ts | 3 +- .../cypress/screens/rule_details.ts | 2 +- .../cases/components/case_status/index.tsx | 106 +-- .../cases/components/case_view/index.test.tsx | 4 +- .../cases/components/case_view/index.tsx | 24 +- .../__snapshots__/index.test.tsx.snap | 30 +- .../step_about_rule_details/index.test.tsx | 18 +- .../rules/step_about_rule_details/index.tsx | 7 +- .../step_about_rule_details/translations.ts | 7 + .../__snapshots__/index.test.tsx.snap | 6 +- .../__snapshots__/index.test.tsx.snap | 8 +- .../__snapshots__/index.test.tsx.snap | 10 +- .../components/view_type_toggle/index.tsx | 20 +- .../components/recent_cases/filters/index.tsx | 14 +- .../components/recent_cases/translations.ts | 7 + .../recent_timelines/filters/index.tsx | 5 +- .../recent_timelines/translations.ts | 7 + .../note_card_body.test.tsx.snap | 30 +- .../add_data_provider_popover.tsx | 1 - .../policy_details/policy_details.tsx | 1 - .../policy_retention_schedule.tsx | 1 - .../nav_control_popover.test.tsx.snap | 1 - .../nav_control/nav_control_popover.tsx | 1 - .../components/filter_range_form.tsx | 28 +- .../translations/translations/ja-JP.json | 4 - .../translations/translations/zh-CN.json | 4 - .../geo_threshold/query_builder/index.tsx | 2 +- .../expression_with_popover.tsx | 1 - .../threshold/expression.tsx | 1 - .../sections/alert_form/alert_form.tsx | 2 +- .../common/expression_items/for_the_last.tsx | 1 - .../common/expression_items/group_by_over.tsx | 1 - .../public/common/expression_items/of.tsx | 1 - .../common/expression_items/threshold.tsx | 1 - .../public/common/expression_items/when.tsx | 1 - .../url_drilldown_collect_config.tsx | 1 - .../uptime_date_picker.test.tsx.snap | 2 +- .../location_availability/toggle_view_btn.tsx | 4 + .../__snapshots__/empty_state.test.tsx.snap | 42 ++ .../filter_popover.test.tsx.snap | 4 +- .../overview/filter_group/filter_popover.tsx | 1 - .../__snapshots__/page_header.test.tsx.snap | 4 +- .../threshold_watch_edit.tsx | 4 - yarn.lock | 219 +++--- 208 files changed, 1254 insertions(+), 1115 deletions(-) delete mode 100644 src/core/public/chrome/ui/header/recent_links.tsx delete mode 100644 x-pack/plugins/ingest_manager/public/applications/ingest_manager/index.scss diff --git a/package.json b/package.json index 3a2d13fd5ef3b..1d5c5059cd03e 100644 --- a/package.json +++ b/package.json @@ -110,14 +110,16 @@ "**/grunt-*/**", "x-pack/typescript", "@elastic/eui/rehype-react", + "@elastic/eui/remark-parse", "@elastic/eui/remark-rehype", - "@elastic/eui/remark-rehype/**" + "@elastic/eui/remark-rehype/**", + "@elastic/eui/unified" ] }, "dependencies": { "@elastic/datemath": "5.0.3", "@elastic/elasticsearch": "7.10.0-rc.1", - "@elastic/eui": "29.5.0", + "@elastic/eui": "30.1.1", "@elastic/good": "8.1.1-kibana2", "@elastic/numeral": "^2.5.0", "@elastic/request-crypto": "1.1.4", diff --git a/packages/kbn-ui-framework/package.json b/packages/kbn-ui-framework/package.json index d954ae0823caf..b47adb29f1e68 100644 --- a/packages/kbn-ui-framework/package.json +++ b/packages/kbn-ui-framework/package.json @@ -31,7 +31,7 @@ }, "devDependencies": { "@babel/core": "^7.11.6", - "@elastic/eui": "29.5.0", + "@elastic/eui": "30.1.1", "@kbn/babel-preset": "1.0.0", "@kbn/optimizer": "1.0.0", "babel-loader": "^8.0.6", diff --git a/packages/kbn-ui-shared-deps/package.json b/packages/kbn-ui-shared-deps/package.json index b1b5d6e2b419e..e6883be307bb2 100644 --- a/packages/kbn-ui-shared-deps/package.json +++ b/packages/kbn-ui-shared-deps/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "@elastic/charts": "24.0.0", - "@elastic/eui": "29.5.0", + "@elastic/eui": "30.1.1", "@elastic/numeral": "^2.5.0", "@kbn/i18n": "1.0.0", "@kbn/monaco": "1.0.0", diff --git a/src/core/public/chrome/ui/header/recent_links.tsx b/src/core/public/chrome/ui/header/recent_links.tsx deleted file mode 100644 index 0e068a3465b0e..0000000000000 --- a/src/core/public/chrome/ui/header/recent_links.tsx +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React from 'react'; -import { i18n } from '@kbn/i18n'; -import { EuiNavDrawerGroup } from '@elastic/eui'; -import { RecentNavLink } from './nav_link'; - -interface Props { - recentNavLinks: RecentNavLink[]; -} - -export function RecentLinks({ recentNavLinks }: Props) { - return ( - - ); -} diff --git a/src/plugins/charts/public/static/components/number_input.tsx b/src/plugins/charts/public/static/components/number_input.tsx index 8c2874f522902..68e292861c32e 100644 --- a/src/plugins/charts/public/static/components/number_input.tsx +++ b/src/plugins/charts/public/static/components/number_input.tsx @@ -54,7 +54,7 @@ function NumberInputOption({ 'data-test-subj': dataTestSubj, }: NumberInputOptionProps) { return ( - + ({ } }; return ( - + ({ ); return ( - + ({ setValue, }: SwitchOptionProps) { return ( - + ({ setValue, }: TextInputOptionProps) { return ( - + setIsAddFilterPopoverOpen(false)} anchorPosition="downLeft" - withTitle panelPaddingSize="none" ownFocus={true} initialFocus=".filterEditor__hiddenItem" diff --git a/src/plugins/data/public/ui/filter_bar/filter_item.tsx b/src/plugins/data/public/ui/filter_bar/filter_item.tsx index 018f41ab82bfc..48dbfea634256 100644 --- a/src/plugins/data/public/ui/filter_bar/filter_item.tsx +++ b/src/plugins/data/public/ui/filter_bar/filter_item.tsx @@ -358,7 +358,6 @@ export function FilterItem(props: Props) { }} button={badge} anchorPosition="downLeft" - withTitle={true} panelPaddingSize="none" > diff --git a/src/plugins/data/public/ui/filter_bar/filter_options.tsx b/src/plugins/data/public/ui/filter_bar/filter_options.tsx index b97e0e33f2400..46dda2382a5ca 100644 --- a/src/plugins/data/public/ui/filter_bar/filter_options.tsx +++ b/src/plugins/data/public/ui/filter_bar/filter_options.tsx @@ -166,7 +166,6 @@ class FilterOptionsUI extends Component { } anchorPosition="rightUp" panelPaddingSize="none" - withTitle repositionOnScroll > diff --git a/src/plugins/data/public/ui/query_string_input/language_switcher.tsx b/src/plugins/data/public/ui/query_string_input/language_switcher.tsx index 4d51b173f6743..3957e59388acf 100644 --- a/src/plugins/data/public/ui/query_string_input/language_switcher.tsx +++ b/src/plugins/data/public/ui/query_string_input/language_switcher.tsx @@ -76,7 +76,6 @@ export function QueryLanguageSwitcher(props: Props) { button={button} isOpen={isPopoverOpen} closePopover={() => setIsPopoverOpen(false)} - withTitle repositionOnScroll > diff --git a/src/plugins/discover/public/application/angular/context/components/action_bar/action_bar.tsx b/src/plugins/discover/public/application/angular/context/components/action_bar/action_bar.tsx index ac88d2aa36696..8ce02076d4d0a 100644 --- a/src/plugins/discover/public/application/angular/context/components/action_bar/action_bar.tsx +++ b/src/plugins/discover/public/application/angular/context/components/action_bar/action_bar.tsx @@ -145,7 +145,7 @@ export function ActionBar({ - + {isSuccessor ? ( handleValueChange(id, optionId.replace(`${id}-`, ''))} + onChange={(optionId: string) => handleValueChange(id, optionId.replace(`${id}-`, ''))} buttonSize="compressed" isFullWidth data-test-subj={`${id}ButtonGroup`} diff --git a/src/plugins/embeddable/public/components/panel_options_menu/index.tsx b/src/plugins/embeddable/public/components/panel_options_menu/index.tsx index 7790646a88a68..9b9d95628f19d 100644 --- a/src/plugins/embeddable/public/components/panel_options_menu/index.tsx +++ b/src/plugins/embeddable/public/components/panel_options_menu/index.tsx @@ -83,7 +83,6 @@ export const PanelOptionsMenu: React.FC = ({ panelPaddingSize="none" anchorPosition="downRight" data-test-subj={open ? 'embeddablePanelContextMenuOpen' : 'embeddablePanelContextMenuClosed'} - withTitle > diff --git a/src/plugins/embeddable/public/lib/panel/panel_header/panel_options_menu.tsx b/src/plugins/embeddable/public/lib/panel/panel_header/panel_options_menu.tsx index 629a5f8c880e8..82bfb9b47e1a7 100644 --- a/src/plugins/embeddable/public/lib/panel/panel_header/panel_options_menu.tsx +++ b/src/plugins/embeddable/public/lib/panel/panel_header/panel_options_menu.tsx @@ -113,7 +113,6 @@ export class PanelOptionsMenu extends React.Component - - -
- - + + + Step 1 is incomplete + + + + - - -
- - - - - -
-
-
+ + + + diff --git a/src/plugins/home/public/application/components/tutorial/tutorial.test.js b/src/plugins/home/public/application/components/tutorial/tutorial.test.js index 9944ac4848bc6..65e11170e0e42 100644 --- a/src/plugins/home/public/application/components/tutorial/tutorial.test.js +++ b/src/plugins/home/public/application/components/tutorial/tutorial.test.js @@ -133,7 +133,7 @@ describe('isCloudEnabled is false', () => { ); await loadTutorialPromise; component.update(); - component.find('button#onPremElasticCloud').closest('div').find('input').simulate('change'); + component.find('#onPremElasticCloud').first().simulate('click'); component.update(); expect(component.state('visibleInstructions')).toBe('onPremElasticCloud'); }); diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/indices_list/__snapshots__/indices_list.test.tsx.snap b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/indices_list/__snapshots__/indices_list.test.tsx.snap index 6631a9bbd1d02..db527ea81b2cb 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/indices_list/__snapshots__/indices_list.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/indices_list/__snapshots__/indices_list.test.tsx.snap @@ -63,7 +63,6 @@ exports[`IndicesList should change pages 1`] = ` isOpen={false} ownFocus={false} panelPaddingSize="none" - withTitle={true} > diff --git a/src/plugins/kibana_react/public/validated_range/validated_dual_range.tsx b/src/plugins/kibana_react/public/validated_range/validated_dual_range.tsx index 832ea70f0460e..5d26925d34088 100644 --- a/src/plugins/kibana_react/public/validated_range/validated_dual_range.tsx +++ b/src/plugins/kibana_react/public/validated_range/validated_dual_range.tsx @@ -105,15 +105,19 @@ export class ValidatedDualRange extends Component { allowEmptyRange, ...rest // TODO: Consider alternatives for spread operator in component } = this.props; + // Ensure the form row is display as compressed if compressed is true + let evaluatedDisplay = formRowDisplay; + if (!evaluatedDisplay) { + evaluatedDisplay = compressed ? 'rowCompressed' : 'row'; + } return ( + <> {numbers.map((number, arrayIndex) => ( diff --git a/src/plugins/vis_default_editor/public/components/controls/date_ranges.tsx b/src/plugins/vis_default_editor/public/components/controls/date_ranges.tsx index 4afc85ba3b5c2..785ef1b83a23d 100644 --- a/src/plugins/vis_default_editor/public/components/controls/date_ranges.tsx +++ b/src/plugins/vis_default_editor/public/components/controls/date_ranges.tsx @@ -125,7 +125,7 @@ function DateRangesParamEditor({ ); return ( - + <> diff --git a/src/plugins/vis_default_editor/public/components/controls/field.tsx b/src/plugins/vis_default_editor/public/components/controls/field.tsx index 41d6db25da5e2..9529adfe12720 100644 --- a/src/plugins/vis_default_editor/public/components/controls/field.tsx +++ b/src/plugins/vis_default_editor/public/components/controls/field.tsx @@ -108,7 +108,7 @@ function FieldParamEditor({ isInvalid={showErrorMessage} fullWidth={true} error={errors} - compressed + display="rowCompressed" > + {agg.params.ipRangeType === IpRangeTypes.MASK ? ( setValue(ev.target.value), [setValue]); return ( - + + + - + + <> {ranges.map(({ from, to, id }, index) => { const deleteBtnTitle = i18n.translate( diff --git a/src/plugins/vis_default_editor/public/components/controls/raw_json.tsx b/src/plugins/vis_default_editor/public/components/controls/raw_json.tsx index b433b704330a7..714bb3f3294ab 100644 --- a/src/plugins/vis_default_editor/public/components/controls/raw_json.tsx +++ b/src/plugins/vis_default_editor/public/components/controls/raw_json.tsx @@ -82,7 +82,7 @@ function RawJsonParamEditor({ label={label} isInvalid={showValidation ? !isFieldValid : false} fullWidth={true} - compressed + display="rowCompressed" > <> - + + setAutoApplyEnabled(e.target.checked), []); + const toggleAutoApply = useCallback( + (nextAutoApplyEnabled) => setAutoApplyEnabled(nextAutoApplyEnabled), + [] + ); const onClickDiscard = useCallback(() => dispatch(discardChanges(vis)), [dispatch, vis]); useDebounce( @@ -131,19 +127,33 @@ function DefaultEditorControls({ defaultMessage: 'Auto updates the visualization on every change.', })} > - toggleAutoApply(!autoApplyEnabled)} size="s" - isIconOnly - /> + minWidth={80} + aria-label={ + autoApplyEnabled + ? i18n.translate('visDefaultEditor.sidebar.autoApplyChangesLabelOn', { + defaultMessage: 'Auto apply is on', + }) + : i18n.translate('visDefaultEditor.sidebar.autoApplyChangesLabelOff', { + defaultMessage: 'Auto apply is off', + }) + } + > + {autoApplyEnabled + ? i18n.translate('visDefaultEditor.sidebar.autoApplyChangesOn', { + defaultMessage: 'On', + }) + : i18n.translate('visDefaultEditor.sidebar.autoApplyChangesOff', { + defaultMessage: 'Off', + })} + )}
diff --git a/src/plugins/vis_type_metric/public/components/metric_vis_options.tsx b/src/plugins/vis_type_metric/public/components/metric_vis_options.tsx index ac6ab9e9e69a8..d0a7412238871 100644 --- a/src/plugins/vis_type_metric/public/components/metric_vis_options.tsx +++ b/src/plugins/vis_type_metric/public/components/metric_vis_options.tsx @@ -86,7 +86,7 @@ function MetricVisOptions({ ); const setColorMode: EuiButtonGroupProps['onChange'] = useCallback( - (id) => setMetricValue('metricColorMode', id as ColorModes), + (id: string) => setMetricValue('metricColorMode', id as ColorModes), [setMetricValue] ); diff --git a/src/plugins/vis_type_timelion/public/components/timelion_interval.tsx b/src/plugins/vis_type_timelion/public/components/timelion_interval.tsx index 7ed98f0fb802e..e0a76316669f7 100644 --- a/src/plugins/vis_type_timelion/public/components/timelion_interval.tsx +++ b/src/plugins/vis_type_timelion/public/components/timelion_interval.tsx @@ -108,7 +108,7 @@ function TimelionInterval({ value, setValue, setValidity }: TimelionIntervalProp return ( + <> diff --git a/src/plugins/vis_type_vislib/public/components/options/point_series/threshold_panel.tsx b/src/plugins/vis_type_vislib/public/components/options/point_series/threshold_panel.tsx index 0823180300756..964bb7d569b08 100644 --- a/src/plugins/vis_type_vislib/public/components/options/point_series/threshold_panel.tsx +++ b/src/plugins/vis_type_vislib/public/components/options/point_series/threshold_panel.tsx @@ -114,7 +114,7 @@ function ThresholdPanel({ defaultMessage: 'Line color', })} fullWidth - compressed + display="rowCompressed" > { + const [idToSelectedMap, setIdToSelectedMap] = useState({}); /** * Keydown listener for a legend entry. * This will close the details panel of this legend entry when pressing Escape. @@ -74,7 +75,7 @@ const VisLegendItemComponent = ({ } }; - const filterOptions: EuiButtonGroupOption[] = [ + const filterOptions: EuiButtonGroupOptionProps[] = [ { id: 'filterIn', label: i18n.translate('visTypeVislib.vislib.legend.filterForValueButtonAriaLabel', { @@ -96,6 +97,7 @@ const VisLegendItemComponent = ({ ]; const handleFilterChange = (id: string) => { + setIdToSelectedMap({ filterIn: id === 'filterIn', filterOut: id === 'filterOut' }); onFilter(item, id !== 'filterIn'); }; @@ -112,6 +114,7 @@ const VisLegendItemComponent = ({ options={filterOptions} onChange={handleFilterChange} data-test-subj={`legend-${item.label}-filters`} + idToSelectedMap={idToSelectedMap} /> diff --git a/src/plugins/visualizations/public/wizard/__snapshots__/new_vis_modal.test.tsx.snap b/src/plugins/visualizations/public/wizard/__snapshots__/new_vis_modal.test.tsx.snap index 02c0b36d12689..2089289b372a2 100644 --- a/src/plugins/visualizations/public/wizard/__snapshots__/new_vis_modal.test.tsx.snap +++ b/src/plugins/visualizations/public/wizard/__snapshots__/new_vis_modal.test.tsx.snap @@ -1032,6 +1032,7 @@ exports[`NewVisModal filter for visualization types should render as expected 1` size="s" > { isOpen={openPopup} closePopover={() => setOpenPopup(false)} panelPaddingSize="none" - withTitle anchorPosition="downLeft" > diff --git a/x-pack/examples/ui_actions_enhanced_examples/public/containers/drilldowns_without_embeddable_example/drilldowns_without_embeddable_example.tsx b/x-pack/examples/ui_actions_enhanced_examples/public/containers/drilldowns_without_embeddable_example/drilldowns_without_embeddable_example.tsx index fb22e98e4a6d9..8f1582aaacff5 100644 --- a/x-pack/examples/ui_actions_enhanced_examples/public/containers/drilldowns_without_embeddable_example/drilldowns_without_embeddable_example.tsx +++ b/x-pack/examples/ui_actions_enhanced_examples/public/containers/drilldowns_without_embeddable_example/drilldowns_without_embeddable_example.tsx @@ -77,7 +77,6 @@ export const DrilldownsWithoutEmbeddableExample: React.FC = () => { isOpen={openPopup} closePopover={() => setOpenPopup(false)} panelPaddingSize="none" - withTitle anchorPosition="downLeft" > diff --git a/x-pack/package.json b/x-pack/package.json index ba464a21263d7..ea1b7b9713df9 100644 --- a/x-pack/package.json +++ b/x-pack/package.json @@ -267,7 +267,7 @@ "@babel/runtime": "^7.11.2", "@elastic/datemath": "5.0.3", "@elastic/ems-client": "7.10.0", - "@elastic/eui": "29.5.0", + "@elastic/eui": "30.1.1", "@elastic/filesaver": "1.1.2", "@elastic/node-crypto": "1.2.1", "@elastic/numeral": "^2.5.0", diff --git a/x-pack/plugins/apm/public/components/alerting/ServiceAlertTrigger/PopoverExpression/index.tsx b/x-pack/plugins/apm/public/components/alerting/ServiceAlertTrigger/PopoverExpression/index.tsx index ac96951ab54ca..a95ea3cf11e7a 100644 --- a/x-pack/plugins/apm/public/components/alerting/ServiceAlertTrigger/PopoverExpression/index.tsx +++ b/x-pack/plugins/apm/public/components/alerting/ServiceAlertTrigger/PopoverExpression/index.tsx @@ -20,7 +20,6 @@ export function PopoverExpression(props: Props) { return ( setPopoverOpen(false)} button={ diff --git a/x-pack/plugins/canvas/canvas_plugin_src/uis/arguments/image_upload/index.js b/x-pack/plugins/canvas/canvas_plugin_src/uis/arguments/image_upload/index.js index d7c7cd9e1a32f..9bdb66cc16c06 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/uis/arguments/image_upload/index.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/uis/arguments/image_upload/index.js @@ -131,6 +131,7 @@ class ImageUpload extends React.Component { onChange={this.changeUrlType} isFullWidth className="canvasSidebar__buttonGroup" + legend={strings.getUrlTypeChangeLegend()} /> ); diff --git a/x-pack/plugins/canvas/i18n/components.ts b/x-pack/plugins/canvas/i18n/components.ts index 51c86f6604330..b7d25a32818f8 100644 --- a/x-pack/plugins/canvas/i18n/components.ts +++ b/x-pack/plugins/canvas/i18n/components.ts @@ -870,6 +870,10 @@ export const ComponentStrings = { i18n.translate('xpack.canvas.textStylePicker.alignRightOption', { defaultMessage: 'Align right', }), + getAlignmentOptionsControlLegend: () => + i18n.translate('xpack.canvas.textStylePicker.alignmentOptionsControl', { + defaultMessage: 'Alignment options', + }), getFontColorLabel: () => i18n.translate('xpack.canvas.textStylePicker.fontColorLabel', { defaultMessage: 'Font Color', @@ -886,6 +890,10 @@ export const ComponentStrings = { i18n.translate('xpack.canvas.textStylePicker.styleUnderlineOption', { defaultMessage: 'Underline', }), + getStyleOptionsControlLegend: () => + i18n.translate('xpack.canvas.textStylePicker.styleOptionsControl', { + defaultMessage: 'Style options', + }), }, TimePicker: { getApplyButtonLabel: () => @@ -1061,6 +1069,10 @@ export const ComponentStrings = { }), }, VarConfigVarValueField: { + getBooleanOptionsLegend: () => + i18n.translate('xpack.canvas.varConfigVarValueField.booleanOptionsLegend', { + defaultMessage: 'Boolean value', + }), getFalseOption: () => i18n.translate('xpack.canvas.varConfigVarValueField.falseOption', { defaultMessage: 'False', diff --git a/x-pack/plugins/canvas/i18n/ui.ts b/x-pack/plugins/canvas/i18n/ui.ts index bc282db203be2..0347a9c5444aa 100644 --- a/x-pack/plugins/canvas/i18n/ui.ts +++ b/x-pack/plugins/canvas/i18n/ui.ts @@ -181,6 +181,10 @@ export const ArgumentStrings = { url: URL, }, }), + getUrlTypeChangeLegend: () => + i18n.translate('xpack.canvas.uis.arguments.imageUpload.urlTypes.changeLegend', { + defaultMessage: 'Image upload type', + }), }, Number: { getDisplayName: () => diff --git a/x-pack/plugins/canvas/public/components/asset_manager/__stories__/__snapshots__/asset_manager.stories.storyshot b/x-pack/plugins/canvas/public/components/asset_manager/__stories__/__snapshots__/asset_manager.stories.storyshot index 8225f6414385d..a6dbe675ee9d6 100644 --- a/x-pack/plugins/canvas/public/components/asset_manager/__stories__/__snapshots__/asset_manager.stories.storyshot +++ b/x-pack/plugins/canvas/public/components/asset_manager/__stories__/__snapshots__/asset_manager.stories.storyshot @@ -146,6 +146,7 @@ exports[`Storyshots components/Assets/AssetManager no assets 1`] = ` aria-labelledby="CanvasAssetManagerLabel" className="euiProgress euiProgress--native euiProgress--s euiProgress--secondary" max={25000} + style={null} value={0} /> @@ -163,6 +164,11 @@ exports[`Storyshots components/Assets/AssetManager no assets 1`] = ` - -
+ + -
-
+ + -
+ + @@ -366,110 +354,122 @@ exports[`Storyshots components/TextStylePicker default 1`] = ` className="euiFlexItem euiFlexItem--flexGrowZero" >
+ + Alignment options +
-
- - -
-
+ +
-
+ +
+ +
@@ -733,110 +733,98 @@ exports[`Storyshots components/TextStylePicker interactive 1`] = ` className="euiFlexItem euiFlexItem--flexGrowZero" >
+ + Style options +
-
- - -
-
+ + -
-
+ + -
+ +
@@ -844,110 +832,122 @@ exports[`Storyshots components/TextStylePicker interactive 1`] = ` className="euiFlexItem euiFlexItem--flexGrowZero" >
+ + Alignment options +
-
- - -
-
+ +
-
+ +
+ +
diff --git a/x-pack/plugins/canvas/public/components/text_style_picker/text_style_picker.tsx b/x-pack/plugins/canvas/public/components/text_style_picker/text_style_picker.tsx index c501e78a5e338..7371eacd92fd1 100644 --- a/x-pack/plugins/canvas/public/components/text_style_picker/text_style_picker.tsx +++ b/x-pack/plugins/canvas/public/components/text_style_picker/text_style_picker.tsx @@ -162,6 +162,7 @@ export const TextStylePicker: FC = ({ type="multi" isIconOnly className="canvasSidebar__buttonGroup" + legend={strings.getStyleOptionsControlLegend()} />
@@ -172,6 +173,7 @@ export const TextStylePicker: FC = ({ idSelected={align} onChange={(optionId: string) => doChange('align', optionId)} className="canvasSidebar__buttonGroup" + legend={strings.getAlignmentOptionsControlLegend()} />
diff --git a/x-pack/plugins/canvas/public/components/var_config/__stories__/__snapshots__/delete_var.stories.storyshot b/x-pack/plugins/canvas/public/components/var_config/__stories__/__snapshots__/delete_var.stories.storyshot index f1fac7e6ce477..5c9e0b6224126 100644 --- a/x-pack/plugins/canvas/public/components/var_config/__stories__/__snapshots__/delete_var.stories.storyshot +++ b/x-pack/plugins/canvas/public/components/var_config/__stories__/__snapshots__/delete_var.stories.storyshot @@ -64,6 +64,11 @@ Array [ - -
+ +
+ + @@ -307,6 +315,11 @@ Array [ className="euiButton euiButton--secondary euiButton--small euiButton--fill" disabled={false} onClick={[Function]} + style={ + Object { + "minWidth": undefined, + } + } type="button" > = ({ type, value, onChange }) => { }} buttonSize="compressed" isFullWidth + legend={strings.getBooleanOptionsLegend()} /> ); } diff --git a/x-pack/plugins/canvas/public/components/workpad_header/element_menu/__stories__/__snapshots__/element_menu.stories.storyshot b/x-pack/plugins/canvas/public/components/workpad_header/element_menu/__stories__/__snapshots__/element_menu.stories.storyshot index 6bce2be335b78..de78772bcb124 100644 --- a/x-pack/plugins/canvas/public/components/workpad_header/element_menu/__stories__/__snapshots__/element_menu.stories.storyshot +++ b/x-pack/plugins/canvas/public/components/workpad_header/element_menu/__stories__/__snapshots__/element_menu.stories.storyshot @@ -14,9 +14,14 @@ exports[`Storyshots components/WorkpadHeader/ElementMenu default 1`] = ` >
" +
markdown mock
My Canvas Workpad
" `; exports[`Canvas Shareable Workpad API Placed successfully with height specified 1`] = `"
"`; @@ -21,7 +21,7 @@ exports[`Canvas Shareable Workpad API Placed successfully with height specified
markdown mock
markdown mock
My Canvas Workpad
" +
markdown mock
My Canvas Workpad
" `; exports[`Canvas Shareable Workpad API Placed successfully with page specified 1`] = `"
"`; @@ -33,7 +33,7 @@ exports[`Canvas Shareable Workpad API Placed successfully with page specified 2`
markdown mock
markdown mock
My Canvas Workpad
" +
markdown mock
My Canvas Workpad
" `; exports[`Canvas Shareable Workpad API Placed successfully with width and height specified 1`] = `"
"`; @@ -45,7 +45,7 @@ exports[`Canvas Shareable Workpad API Placed successfully with width and height
markdown mock
markdown mock
My Canvas Workpad
" +
markdown mock
My Canvas Workpad
" `; exports[`Canvas Shareable Workpad API Placed successfully with width specified 1`] = `"
"`; @@ -57,5 +57,5 @@ exports[`Canvas Shareable Workpad API Placed successfully with width specified 2
markdown mock
markdown mock
My Canvas Workpad
" +
markdown mock
My Canvas Workpad
" `; diff --git a/x-pack/plugins/canvas/shareable_runtime/components/__stories__/__snapshots__/canvas.stories.storyshot b/x-pack/plugins/canvas/shareable_runtime/components/__stories__/__snapshots__/canvas.stories.storyshot index 73d350a9c1ee1..7d7b2a0ae9341 100644 --- a/x-pack/plugins/canvas/shareable_runtime/components/__stories__/__snapshots__/canvas.stories.storyshot +++ b/x-pack/plugins/canvas/shareable_runtime/components/__stories__/__snapshots__/canvas.stories.storyshot @@ -1445,7 +1445,7 @@ exports[`Storyshots shareables/Canvas component 1`] = ` className="euiFlexItem euiFlexItem--flexGrowZero" >
App renders properly 1`] = `
markdown mock
markdown mock
My Canvas Workpad
" +
markdown mock
My Canvas Workpad
" `; diff --git a/x-pack/plugins/canvas/shareable_runtime/components/footer/__stories__/__snapshots__/footer.stories.storyshot b/x-pack/plugins/canvas/shareable_runtime/components/footer/__stories__/__snapshots__/footer.stories.storyshot index 2fe222b4238a3..28c01c3fba8e5 100644 --- a/x-pack/plugins/canvas/shareable_runtime/components/footer/__stories__/__snapshots__/footer.stories.storyshot +++ b/x-pack/plugins/canvas/shareable_runtime/components/footer/__stories__/__snapshots__/footer.stories.storyshot @@ -1398,7 +1398,7 @@ exports[`Storyshots shareables/Footer contextual: austin 1`] = ` className="euiFlexItem euiFlexItem--flexGrowZero" >
can navigate Autoplay Settings 1`] = `
"`; +exports[` can navigate Toolbar Settings, closes when activated 3`] = `"
Settings
Hide Toolbar
Hide the toolbar when the mouse is not within the Canvas?
"`; diff --git a/x-pack/plugins/canvas/shareable_runtime/components/footer/settings/settings.tsx b/x-pack/plugins/canvas/shareable_runtime/components/footer/settings/settings.tsx index 4d827da0c3639..4e67b1c67a27f 100644 --- a/x-pack/plugins/canvas/shareable_runtime/components/footer/settings/settings.tsx +++ b/x-pack/plugins/canvas/shareable_runtime/components/footer/settings/settings.tsx @@ -81,7 +81,6 @@ export const SettingsComponent: FC = ({ refs }) => { isOpen={isPopoverOpen} button={button} panelPaddingSize="none" - withTitle anchorPosition="upRight" insert={ refs.stage.current ? { sibling: refs.stage.current, position: 'after' } : undefined diff --git a/x-pack/plugins/cross_cluster_replication/public/app/components/auto_follow_pattern_action_menu/auto_follow_pattern_action_menu.tsx b/x-pack/plugins/cross_cluster_replication/public/app/components/auto_follow_pattern_action_menu/auto_follow_pattern_action_menu.tsx index ce26e4e71a5db..7edb6276b8158 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/components/auto_follow_pattern_action_menu/auto_follow_pattern_action_menu.tsx +++ b/x-pack/plugins/cross_cluster_replication/public/app/components/auto_follow_pattern_action_menu/auto_follow_pattern_action_menu.tsx @@ -143,7 +143,6 @@ const AutoFollowPatternActionMenuUI: FunctionComponent = ({ closePopover={() => setShowPopover(false)} button={button} panelPaddingSize="none" - withTitle repositionOnScroll > diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/filterable_users_popover.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/filterable_users_popover.tsx index e5fdcc3089059..c9bf03c5d4700 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/filterable_users_popover.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/filterable_users_popover.tsx @@ -45,7 +45,6 @@ export const FilterableUsersPopover: React.FC = ( isOpen={isPopoverOpen} closePopover={closePopover} panelPaddingSize="none" - withTitle={true} > = isOpen={isPopoverOpen} closePopover={closePopover} panelPaddingSize="none" - withTitle={true} > {contentSourceCountHeading}
{sources}
diff --git a/x-pack/plugins/index_lifecycle_management/__jest__/__snapshots__/extend_index_management.test.tsx.snap b/x-pack/plugins/index_lifecycle_management/__jest__/__snapshots__/extend_index_management.test.tsx.snap index 1c4627794c45b..6106503566c2f 100644 --- a/x-pack/plugins/index_lifecycle_management/__jest__/__snapshots__/extend_index_management.test.tsx.snap +++ b/x-pack/plugins/index_lifecycle_management/__jest__/__snapshots__/extend_index_management.test.tsx.snap @@ -596,14 +596,13 @@ exports[`extend index management ilm summary extension should return extension w key="phaseExecutionPopover" ownFocus={false} panelPaddingSize="m" - withTitle={true} >
= ({ isOpen={isPolicyPopoverOpen(policy.name)} closePopover={closePolicyPopover} panelPaddingSize="none" - withTitle anchorPosition="rightUp" repositionOnScroll > diff --git a/x-pack/plugins/index_lifecycle_management/public/extend_index_management/components/index_lifecycle_summary.tsx b/x-pack/plugins/index_lifecycle_management/public/extend_index_management/components/index_lifecycle_summary.tsx index d711863c309e9..afdf726ea02f9 100644 --- a/x-pack/plugins/index_lifecycle_management/public/extend_index_management/components/index_lifecycle_summary.tsx +++ b/x-pack/plugins/index_lifecycle_management/public/extend_index_management/components/index_lifecycle_summary.tsx @@ -158,7 +158,6 @@ export class IndexLifecycleSummary extends Component { button={button} isOpen={this.state.showPhaseExecutionPopover} closePopover={this.closePhaseExecutionPopover} - withTitle > = ({ isOpen={isPopoverOpen} closePopover={() => setIsPopOverOpen(false)} panelPaddingSize="none" - withTitle anchorPosition="rightUp" repositionOnScroll > diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/component_template_selector/components/create_button_popover.tsx b/x-pack/plugins/index_management/public/application/components/component_templates/component_template_selector/components/create_button_popover.tsx index 941e8ec362de2..8939e58ffd94f 100644 --- a/x-pack/plugins/index_management/public/application/components/component_templates/component_template_selector/components/create_button_popover.tsx +++ b/x-pack/plugins/index_management/public/application/components/component_templates/component_template_selector/components/create_button_popover.tsx @@ -36,7 +36,6 @@ export const CreateButtonPopOver = ({ anchorPosition = 'upCenter' }: Props) => { isOpen={isPopoverOpen} closePopover={() => setIsPopOverOpen(false)} panelPaddingSize="none" - withTitle anchorPosition={anchorPosition} repositionOnScroll > diff --git a/x-pack/plugins/index_management/public/application/sections/home/index_list/index_actions_context_menu/index_actions_context_menu.js b/x-pack/plugins/index_management/public/application/sections/home/index_list/index_actions_context_menu/index_actions_context_menu.js index 6e96ef56d683f..cf6fcfc238e06 100644 --- a/x-pack/plugins/index_management/public/application/sections/home/index_list/index_actions_context_menu/index_actions_context_menu.js +++ b/x-pack/plugins/index_management/public/application/sections/home/index_list/index_actions_context_menu/index_actions_context_menu.js @@ -746,7 +746,6 @@ export class IndexActionsContextMenu extends Component { isOpen={this.state.isPopoverOpen} closePopover={this.closePopover} panelPaddingSize="none" - withTitle anchorPosition={anchorPosition} repositionOnScroll > diff --git a/x-pack/plugins/index_management/public/application/sections/home/template_list/template_details/template_details_content.tsx b/x-pack/plugins/index_management/public/application/sections/home/template_list/template_details/template_details_content.tsx index 4899c5c664eba..1b1b9ad013c37 100644 --- a/x-pack/plugins/index_management/public/application/sections/home/template_list/template_details/template_details_content.tsx +++ b/x-pack/plugins/index_management/public/application/sections/home/template_list/template_details/template_details_content.tsx @@ -262,7 +262,6 @@ export const TemplateDetailsContent = ({ isOpen={isPopoverOpen} closePopover={() => setIsPopOverOpen(false)} panelPaddingSize="none" - withTitle anchorPosition="rightUp" repositionOnScroll > diff --git a/x-pack/plugins/infra/public/alerting/common/components/alert_preview.tsx b/x-pack/plugins/infra/public/alerting/common/components/alert_preview.tsx index 02c3ea29c1846..7b15acfb6c4e2 100644 --- a/x-pack/plugins/infra/public/alerting/common/components/alert_preview.tsx +++ b/x-pack/plugins/infra/public/alerting/common/components/alert_preview.tsx @@ -127,7 +127,7 @@ export const AlertPreview: React.FC = (props) => { defaultMessage: 'Preview', })} fullWidth - compressed + display="rowCompressed" > <> diff --git a/x-pack/plugins/infra/public/alerting/inventory/components/expression.tsx b/x-pack/plugins/infra/public/alerting/inventory/components/expression.tsx index f47f30c280b2a..66d547eb50d9c 100644 --- a/x-pack/plugins/infra/public/alerting/inventory/components/expression.tsx +++ b/x-pack/plugins/infra/public/alerting/inventory/components/expression.tsx @@ -365,7 +365,7 @@ export const Expressions: React.FC = (props) => { defaultMessage: 'Use a KQL expression to limit the scope of your alert trigger.', })} fullWidth - compressed + display="rowCompressed" > {(alertsContext.metadata && ( { setAggFieldPopoverOpen(false); }} - withTitle anchorPosition={popupPosition ?? 'downRight'} zIndex={8000} > diff --git a/x-pack/plugins/infra/public/alerting/inventory/components/node_type.tsx b/x-pack/plugins/infra/public/alerting/inventory/components/node_type.tsx index 9c215b89f4634..4dca479271832 100644 --- a/x-pack/plugins/infra/public/alerting/inventory/components/node_type.tsx +++ b/x-pack/plugins/infra/public/alerting/inventory/components/node_type.tsx @@ -61,7 +61,6 @@ export const NodeTypeExpression = ({ setAggTypePopoverOpen(false); }} ownFocus - withTitle anchorPosition={popupPosition ?? 'downLeft'} >
diff --git a/x-pack/plugins/infra/public/alerting/metric_threshold/components/expression.tsx b/x-pack/plugins/infra/public/alerting/metric_threshold/components/expression.tsx index c71a3b6b13338..92c0172703423 100644 --- a/x-pack/plugins/infra/public/alerting/metric_threshold/components/expression.tsx +++ b/x-pack/plugins/infra/public/alerting/metric_threshold/components/expression.tsx @@ -364,7 +364,7 @@ export const Expressions: React.FC = (props) => { defaultMessage: 'Use a KQL expression to limit the scope of your alert trigger.', })} fullWidth - compressed + display="rowCompressed" > {(alertsContext.metadata && ( = (props) => { 'Create an alert for every unique value. For example: "host.id" or "cloud.region".', })} fullWidth - compressed + display="rowCompressed" > = ({ fill aria-label={ariaLabel || DEFAULT_MENU_LABEL} onClick={onOpen} - style={{ minWidth: 'auto' }} + minWidth="auto" > diff --git a/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/ml/anomaly_detection/job_setup_screen.tsx b/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/ml/anomaly_detection/job_setup_screen.tsx index 92b21d676c9bb..e270b5650854d 100644 --- a/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/ml/anomaly_detection/job_setup_screen.tsx +++ b/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/ml/anomaly_detection/job_setup_screen.tsx @@ -227,7 +227,7 @@ export const JobSetupScreen = (props: Props) => { defaultMessage="Partition field" /> } - compressed + display="rowCompressed" > Legend Options diff --git a/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/waffle_inventory_switcher.tsx b/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/waffle_inventory_switcher.tsx index c88446eaf3f6a..28f13d582082b 100644 --- a/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/waffle_inventory_switcher.tsx +++ b/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/waffle_inventory_switcher.tsx @@ -135,7 +135,6 @@ export const WaffleInventorySwitcher: React.FC = () => { isOpen={isOpen} closePopover={closePopover} panelPaddingSize="none" - withTitle anchorPosition="downLeft" > diff --git a/x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/chart_options.tsx b/x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/chart_options.tsx index d21454dba5178..c6344e03d2cfd 100644 --- a/x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/chart_options.tsx +++ b/x-pack/plugins/infra/public/pages/metrics/metrics_explorer/components/chart_options.tsx @@ -121,7 +121,7 @@ export const MetricsExplorerChartOptions = ({ chartOptions, onChange }: Props) = > ) => { moveProcessor(processorSelector: string, dropZoneSelector: string) { act(() => { - find(`${processorSelector}.moveItemButton`).simulate('change'); + find(`${processorSelector}.moveItemButton`).simulate('click'); }); component.update(); act(() => { @@ -137,11 +137,11 @@ const createActions = (testBed: TestBed) => { startAndCancelMove(processorSelector: string) { act(() => { - find(`${processorSelector}.moveItemButton`).simulate('change'); + find(`${processorSelector}.moveItemButton`).simulate('click'); }); component.update(); act(() => { - find(`${processorSelector}.cancelMoveItemButton`).simulate('change'); + find(`${processorSelector}.cancelMoveItemButton`).simulate('click'); }); component.update(); }, diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/pipeline_processors_editor_item/pipeline_processors_editor_item.tsx b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/pipeline_processors_editor_item/pipeline_processors_editor_item.tsx index dd7798a37dd4e..707f6e7f1e2c9 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/pipeline_processors_editor_item/pipeline_processors_editor_item.tsx +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/pipeline_processors_editor_item/pipeline_processors_editor_item.tsx @@ -7,7 +7,7 @@ import classNames from 'classnames'; import React, { FunctionComponent, memo, useCallback } from 'react'; import { - EuiButtonToggle, + EuiButtonIcon, EuiFlexGroup, EuiFlexItem, EuiLink, @@ -127,17 +127,14 @@ export const PipelineProcessorsEditorItem: FunctionComponent = memo( const icon = isMovingThisProcessor ? 'cross' : 'sortable'; const disabled = isEditorNotInIdleMode && !isMovingThisProcessor; const moveButton = ( - { + onClick={() => { if (isMovingThisProcessor) { onCancelMove(); } else { diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/test_pipeline/documents_dropdown/documents_dropdown.tsx b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/test_pipeline/documents_dropdown/documents_dropdown.tsx index 19c3c49396c6e..6d0b2a1dcb2cf 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/test_pipeline/documents_dropdown/documents_dropdown.tsx +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/test_pipeline/documents_dropdown/documents_dropdown.tsx @@ -78,7 +78,6 @@ export const DocumentsDropdown: FunctionComponent = ({ closePopover={() => setShowPopover(false)} button={managePipelineButton} panelPaddingSize="none" - withTitle repositionOnScroll data-test-subj="documentsDropdown" panelClassName="documentsDropdownPanel" diff --git a/x-pack/plugins/ingest_pipelines/public/application/sections/pipelines_list/details_flyout.tsx b/x-pack/plugins/ingest_pipelines/public/application/sections/pipelines_list/details_flyout.tsx index 3122aa6da7396..bbb7603c53967 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/sections/pipelines_list/details_flyout.tsx +++ b/x-pack/plugins/ingest_pipelines/public/application/sections/pipelines_list/details_flyout.tsx @@ -187,7 +187,6 @@ export const PipelineDetailsFlyout: FunctionComponent = ({ closePopover={() => setShowPopover(false)} button={managePipelineButton} panelPaddingSize="none" - withTitle repositionOnScroll > { + onChange={(optionId: string) => { setShowingHistogram(optionId === 'histogram'); }} idSelected={showingHistogram ? 'histogram' : 'topValues'} diff --git a/x-pack/plugins/license_management/__jest__/__snapshots__/upload_license.test.tsx.snap b/x-pack/plugins/license_management/__jest__/__snapshots__/upload_license.test.tsx.snap index 2767642254322..72c04992566bd 100644 --- a/x-pack/plugins/license_management/__jest__/__snapshots__/upload_license.test.tsx.snap +++ b/x-pack/plugins/license_management/__jest__/__snapshots__/upload_license.test.tsx.snap @@ -589,6 +589,7 @@ exports[`UploadLicense should display a modal when license requires acknowledgem onClick={[Function]} > + ); diff --git a/x-pack/plugins/maps/public/connected_components/layer_panel/join_editor/resources/join_expression.js b/x-pack/plugins/maps/public/connected_components/layer_panel/join_editor/resources/join_expression.js index 60f8c8005fe4c..c6c784481436c 100644 --- a/x-pack/plugins/maps/public/connected_components/layer_panel/join_editor/resources/join_expression.js +++ b/x-pack/plugins/maps/public/connected_components/layer_panel/join_editor/resources/join_expression.js @@ -175,7 +175,6 @@ export class JoinExpression extends Component { closePopover={this._closePopover} ownFocus initialFocus="body" /* avoid initialFocus on Combobox */ - withTitle anchorPosition="leftCenter" button={ { isOpen={this.state.isPopoverOpen} closePopover={this._closePopover} panelPaddingSize="none" - withTitle anchorPosition="leftUp" > diff --git a/x-pack/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/toc_entry_actions_popover/__snapshots__/toc_entry_actions_popover.test.tsx.snap b/x-pack/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/toc_entry_actions_popover/__snapshots__/toc_entry_actions_popover.test.tsx.snap index 0f620bdeb1c0e..456414889c732 100644 --- a/x-pack/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/toc_entry_actions_popover/__snapshots__/toc_entry_actions_popover.test.tsx.snap +++ b/x-pack/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/toc_entry_actions_popover/__snapshots__/toc_entry_actions_popover.test.tsx.snap @@ -57,7 +57,6 @@ exports[`TOCEntryActionsPopover is rendered 1`] = ` isOpen={false} ownFocus={false} panelPaddingSize="none" - withTitle={true} > { isOpen={this.state.isPopoverOpen} closePopover={this._closePopover} panelPaddingSize="none" - withTitle anchorPosition="leftUp" anchorClassName="mapLayTocActions__popoverAnchor" > diff --git a/x-pack/plugins/ml/public/application/components/anomaly_results_view_selector/anomaly_results_view_selector.test.tsx b/x-pack/plugins/ml/public/application/components/anomaly_results_view_selector/anomaly_results_view_selector.test.tsx index d54a7fe81e858..449c017d533cc 100644 --- a/x-pack/plugins/ml/public/application/components/anomaly_results_view_selector/anomaly_results_view_selector.test.tsx +++ b/x-pack/plugins/ml/public/application/components/anomaly_results_view_selector/anomaly_results_view_selector.test.tsx @@ -37,7 +37,9 @@ describe('AnomalyResultsViewSelector', () => { // Check the Single Metric Viewer element exists in the selector, and that it is checked. expect(getByTestId('mlAnomalyResultsViewSelectorSingleMetricViewer')).toBeInTheDocument(); expect( - getByTestId('mlAnomalyResultsViewSelectorSingleMetricViewer').hasAttribute('checked') + getByTestId('mlAnomalyResultsViewSelectorSingleMetricViewer') + .querySelector('input')! + .hasAttribute('checked') ).toBe(true); }); }); diff --git a/x-pack/plugins/ml/public/application/components/rule_editor/__snapshots__/condition_expression.test.js.snap b/x-pack/plugins/ml/public/application/components/rule_editor/__snapshots__/condition_expression.test.js.snap index 43b4625e81f79..4ea930d74d3d6 100644 --- a/x-pack/plugins/ml/public/application/components/rule_editor/__snapshots__/condition_expression.test.js.snap +++ b/x-pack/plugins/ml/public/application/components/rule_editor/__snapshots__/condition_expression.test.js.snap @@ -30,7 +30,6 @@ exports[`ConditionExpression renders with appliesTo, operator and value supplied isOpen={false} ownFocus={true} panelPaddingSize="none" - withTitle={true} >
{this.renderAppliesToPopover()} diff --git a/x-pack/plugins/ml/public/application/components/rule_editor/scope_expression.js b/x-pack/plugins/ml/public/application/components/rule_editor/scope_expression.js index a8c7ac0f6f598..ced81d59ab51e 100644 --- a/x-pack/plugins/ml/public/application/components/rule_editor/scope_expression.js +++ b/x-pack/plugins/ml/public/application/components/rule_editor/scope_expression.js @@ -157,7 +157,6 @@ export class ScopeExpression extends Component { closePopover={this.closeFilterList} panelPaddingSize="none" ownFocus - withTitle anchorPosition="downLeft" > {this.renderFilterListPopover()} diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_query_bar/exploration_query_bar.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_query_bar/exploration_query_bar.tsx index c837fcbacdd55..4e84bd5ffeddb 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_query_bar/exploration_query_bar.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_query_bar/exploration_query_bar.tsx @@ -7,7 +7,6 @@ import React, { Dispatch, FC, SetStateAction, useEffect, useState } from 'react'; import { EuiButtonGroup, EuiCode, EuiFlexGroup, EuiFlexItem, EuiInputPopover } from '@elastic/eui'; -import { EuiButtonGroupIdToSelectedMap } from '@elastic/eui/src/components/button/button_group/button_group'; import { i18n } from '@kbn/i18n'; @@ -54,7 +53,7 @@ export const ExplorationQueryBar: FC = ({ query: '', language: SEARCH_QUERY_LANGUAGE.KUERY, }); - const [idToSelectedMap, setIdToSelectedMap] = useState({}); + const [idToSelectedMap, setIdToSelectedMap] = useState<{ [id: string]: boolean }>({}); const [errorMessage, setErrorMessage] = useState(undefined); @@ -174,11 +173,10 @@ export const ExplorationQueryBar: FC = ({ defaultMessage: 'Analytics query bar filter buttons', } )} - name="analyticsQueryBarFilterButtons" options={filters.options} type="multi" idToSelectedMap={idToSelectedMap} - onChange={(optionId) => { + onChange={(optionId: string) => { const newIdToSelectedMap = { [optionId]: !idToSelectedMap[optionId] }; setIdToSelectedMap(newIdToSelectedMap); handleFilterUpdate(optionId, newIdToSelectedMap); diff --git a/x-pack/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/content_types/number_content.tsx b/x-pack/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/content_types/number_content.tsx index e2fb8ae5547cc..bfc431166fab9 100644 --- a/x-pack/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/content_types/number_content.tsx +++ b/x-pack/plugins/ml/public/application/datavisualizer/index_based/components/field_data_card/content_types/number_content.tsx @@ -146,7 +146,7 @@ export const NumberContent: FC = ({ config }) => { options={detailsOptions} idSelected={detailsMode} onChange={(optionId) => setDetailsMode(optionId as DETAILS_MODE)} - aria-label={i18n.translate( + legend={i18n.translate( 'xpack.ml.fieldDataCard.cardNumber.selectMetricDetailsDisplayAriaLabel', { defaultMessage: 'Select display option for metric details', diff --git a/x-pack/plugins/ml/public/application/jobs/components/custom_url_editor/__snapshots__/editor.test.tsx.snap b/x-pack/plugins/ml/public/application/jobs/components/custom_url_editor/__snapshots__/editor.test.tsx.snap index 06ee16f264756..7d5c73b42f15b 100644 --- a/x-pack/plugins/ml/public/application/jobs/components/custom_url_editor/__snapshots__/editor.test.tsx.snap +++ b/x-pack/plugins/ml/public/application/jobs/components/custom_url_editor/__snapshots__/editor.test.tsx.snap @@ -21,9 +21,8 @@ exports[`CustomUrlEditor renders the editor for a dashboard type URL with a labe > = ({ className="url-label" error={invalidLabelError} isInvalid={isInvalidLabel} - compressed + display="rowCompressed" > = ({ label={ } - compressed + display="rowCompressed" > = ({ defaultMessage="Dashboard name" /> } - compressed + display="rowCompressed" > = ({ defaultMessage="Index pattern" /> } - compressed + display="rowCompressed" > = ({ /> } className="url-time-range" - compressed + display="rowCompressed" > = ({ className="url-time-range" error={invalidIntervalError} isInvalid={isInvalidTimeRange} - compressed + display="rowCompressed" > = ({ label={ } - compressed + display="rowCompressed" fullWidth={true} > = (props: Props) => { isOpen={showPopover === true} closePopover={() => setShowPopover(null)} panelPaddingSize="none" - withTitle anchorPosition="downLeft" > @@ -178,7 +177,6 @@ export const AlertsBadge: React.FC = (props: Props) => { isOpen={showPopover === type} closePopover={() => setShowPopover(null)} panelPaddingSize="none" - withTitle anchorPosition="downLeft" > diff --git a/x-pack/plugins/monitoring/public/components/no_data/explanations/collection_enabled/__tests__/__snapshots__/collection_enabled.test.js.snap b/x-pack/plugins/monitoring/public/components/no_data/explanations/collection_enabled/__tests__/__snapshots__/collection_enabled.test.js.snap index deed4687e74f6..046f2bfa92247 100644 --- a/x-pack/plugins/monitoring/public/components/no_data/explanations/collection_enabled/__tests__/__snapshots__/collection_enabled.test.js.snap +++ b/x-pack/plugins/monitoring/public/components/no_data/explanations/collection_enabled/__tests__/__snapshots__/collection_enabled.test.js.snap @@ -248,6 +248,7 @@ exports[`ExplainCollectionEnabled should explain about xpack.monitoring.collecti type="button" > - + - + { const section: ISection = { id: 'apm', title: 'APM', - icon: 'logoAPM', + icon: 'logoObservability', description: 'foo bar', }; const { getByText, queryAllByText } = render(); @@ -26,7 +26,7 @@ describe('EmptySection', () => { const section: ISection = { id: 'apm', title: 'APM', - icon: 'logoAPM', + icon: 'logoObservability', description: 'foo bar', linkTitle: 'install agent', href: 'https://www.elastic.co', diff --git a/x-pack/plugins/observability/public/pages/home/section.ts b/x-pack/plugins/observability/public/pages/home/section.ts index 8c87f17c16b3d..21bda1ac5bbba 100644 --- a/x-pack/plugins/observability/public/pages/home/section.ts +++ b/x-pack/plugins/observability/public/pages/home/section.ts @@ -24,7 +24,7 @@ export const appsSection: ISection[] = [ title: i18n.translate('xpack.observability.section.apps.apm.title', { defaultMessage: 'APM', }), - icon: 'logoAPM', + icon: 'logoObservability', description: i18n.translate('xpack.observability.section.apps.apm.description', { defaultMessage: 'Trace transactions through a distributed architecture and map your services’ interactions to easily spot performance bottlenecks.', diff --git a/x-pack/plugins/observability/public/pages/overview/empty_section.ts b/x-pack/plugins/observability/public/pages/overview/empty_section.ts index e13efbb8ffdd2..95b46cbb782d8 100644 --- a/x-pack/plugins/observability/public/pages/overview/empty_section.ts +++ b/x-pack/plugins/observability/public/pages/overview/empty_section.ts @@ -29,7 +29,7 @@ export const getEmptySections = ({ core }: { core: AppMountContext['core'] }): I title: i18n.translate('xpack.observability.emptySection.apps.apm.title', { defaultMessage: 'APM', }), - icon: 'logoAPM', + icon: 'logoObservability', description: i18n.translate('xpack.observability.emptySection.apps.apm.description', { defaultMessage: 'Trace transactions through a distributed architecture and map your services’ interactions to easily spot performance bottlenecks.', @@ -74,7 +74,7 @@ export const getEmptySections = ({ core }: { core: AppMountContext['core'] }): I title: i18n.translate('xpack.observability.emptySection.apps.ux.title', { defaultMessage: 'User Experience', }), - icon: 'logoAPM', + icon: 'logoObservability', description: i18n.translate('xpack.observability.emptySection.apps.ux.description', { defaultMessage: 'Performance is a distribution. Measure the experiences of all visitors to your web application and understand how to improve the experience for everyone.', diff --git a/x-pack/plugins/painless_lab/public/application/components/main_controls.tsx b/x-pack/plugins/painless_lab/public/application/components/main_controls.tsx index e6a61995ac78a..c6c0bee98a466 100644 --- a/x-pack/plugins/painless_lab/public/application/components/main_controls.tsx +++ b/x-pack/plugins/painless_lab/public/application/components/main_controls.tsx @@ -102,7 +102,6 @@ export function MainControls({ toggleRequestFlyout, isRequestFlyoutOpen, reset, isOpen={isHelpOpen} closePopover={() => setIsHelpOpen(false)} panelPaddingSize="none" - withTitle anchorPosition="upLeft" > diff --git a/x-pack/plugins/painless_lab/public/styles/_index.scss b/x-pack/plugins/painless_lab/public/styles/_index.scss index 0a6b84523424a..14a58fe4bdb8b 100644 --- a/x-pack/plugins/painless_lab/public/styles/_index.scss +++ b/x-pack/plugins/painless_lab/public/styles/_index.scss @@ -1,5 +1,4 @@ @import '@elastic/eui/src/global_styling/variables/header'; -@import '@elastic/eui/src/components/nav_drawer/variables'; /** * This is a very brittle way of preventing the editor and other content from disappearing @@ -51,16 +50,3 @@ $headerOffset: $euiHeaderHeightCompensation * 3; // The panels container should adopt the height of the main container height: 100%; } - -/** - * 1. Hack EUI so the bottom bar doesn't obscure the nav drawer flyout, but is also not obscured - * by the main content area. - */ -.painlessLab__bottomBar { - z-index: 5; /* 1 */ - left: $euiNavDrawerWidthCollapsed; -} - -.painlessLab__bottomBar-isNavDrawerLocked { - left: $euiNavDrawerWidthExpanded; -} diff --git a/x-pack/plugins/remote_clusters/public/application/sections/components/remote_cluster_form/__snapshots__/remote_cluster_form.test.js.snap b/x-pack/plugins/remote_clusters/public/application/sections/components/remote_cluster_form/__snapshots__/remote_cluster_form.test.js.snap index 4f54c2f9a1675..ff0caecf93a96 100644 --- a/x-pack/plugins/remote_clusters/public/application/sections/components/remote_cluster_form/__snapshots__/remote_cluster_form.test.js.snap +++ b/x-pack/plugins/remote_clusters/public/application/sections/components/remote_cluster_form/__snapshots__/remote_cluster_form.test.js.snap @@ -1270,6 +1270,7 @@ exports[`RemoteClusterForm proxy mode renders correct connection settings when u > diff --git a/x-pack/plugins/security/public/authentication/overwritten_session/__snapshots__/overwritten_session_page.test.tsx.snap b/x-pack/plugins/security/public/authentication/overwritten_session/__snapshots__/overwritten_session_page.test.tsx.snap index 1124924fcdda2..f33e322cbaae4 100644 --- a/x-pack/plugins/security/public/authentication/overwritten_session/__snapshots__/overwritten_session_page.test.tsx.snap +++ b/x-pack/plugins/security/public/authentication/overwritten_session/__snapshots__/overwritten_session_page.test.tsx.snap @@ -71,14 +71,21 @@ exports[`OverwrittenSessionPage renders as expected 1`] = ` href="/mock-base-path/" > { isOpen={isMenuOpen} closePopover={() => setIsMenuOpen(false)} panelPaddingSize="none" - withTitle anchorPosition="downLeft" > diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/feature_table.tsx b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/feature_table.tsx index a07c2e1c14ac4..57828c50ca17f 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/feature_table.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/feature_table.tsx @@ -249,7 +249,7 @@ export class FeatureTable extends Component { ); const extraAction = ( - + {feature.reserved.description} ); @@ -320,6 +320,15 @@ export class FeatureTable extends Component { options={options} idSelected={`${feature.id}_${selectedPrivilegeId ?? NO_PRIVILEGE_VALUE}`} onChange={this.onChange(feature.id)} + legend={i18n.translate('xpack.security.management.editRole.featureTable.actionLegendText', { + defaultMessage: '{featureName} feature privilege', + values: { + featureName: feature.name, + }, + })} + style={{ + minWidth: 200, + }} /> ); diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/sub_feature_form.tsx b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/sub_feature_form.tsx index 5432a50c1f0df..41e15387f9c47 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/sub_feature_form.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/sub_feature_form.tsx @@ -7,6 +7,7 @@ import React from 'react'; import { EuiFlexGroup, EuiFlexItem, EuiText, EuiCheckbox, EuiButtonGroup } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; import { NO_PRIVILEGE_VALUE } from '../constants'; import { PrivilegeFormCalculator } from '../privilege_form_calculator'; import { @@ -118,7 +119,7 @@ export const SubFeatureForm = (props: Props) => { options={options} idSelected={firstSelectedPrivilege?.id ?? NO_PRIVILEGE_VALUE} isDisabled={props.disabled} - onChange={(selectedPrivilegeId) => { + onChange={(selectedPrivilegeId: string) => { // Deselect all privileges which belong to this mutually-exclusive group const privilegesWithoutGroupEntries = props.selectedFeaturePrivileges.filter( (sp) => !privilegeGroup.privileges.some((privilege) => privilege.id === sp) @@ -130,6 +131,15 @@ export const SubFeatureForm = (props: Props) => { props.onChange([...privilegesWithoutGroupEntries, selectedPrivilegeId]); } }} + legend={i18n.translate( + 'xpack.security.management.editRole.subFeatureForm.controlLegendText', + { + defaultMessage: '{subFeatureName} sub-feature privilege', + values: { + subFeatureName: props.subFeature.name, + }, + } + )} /> ); } diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/simple_privilege_section/simple_privilege_section.test.tsx b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/simple_privilege_section/simple_privilege_section.test.tsx index 6601c6ae1f8d5..8254e2632aa9d 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/simple_privilege_section/simple_privilege_section.test.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/simple_privilege_section/simple_privilege_section.test.tsx @@ -193,7 +193,7 @@ describe('', () => { const featurePrivilegeToggles = wrapper.find(EuiButtonGroup); expect(featurePrivilegeToggles).toHaveLength(1); - expect(featurePrivilegeToggles.find('button')).toHaveLength(3); + expect(featurePrivilegeToggles.find('input')).toHaveLength(3); (featurePrivilegeToggles.props() as EuiButtonGroupProps).onChange('feature1_all', null); diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/space_aware_privilege_section/privilege_space_form.tsx b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/space_aware_privilege_section/privilege_space_form.tsx index 28bbd55c7d544..7ce878321185a 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/space_aware_privilege_section/privilege_space_form.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/space_aware_privilege_section/privilege_space_form.tsx @@ -222,6 +222,12 @@ export class PrivilegeSpaceForm extends Component { idSelected={this.getDisplayedBasePrivilege()} isDisabled={!hasSelectedSpaces} onChange={this.onSpaceBasePrivilegeChange} + legend={i18n.translate( + 'xpack.security.management.editRole.spacePrivilegeForm.basePrivilegeControlLegend', + { + defaultMessage: 'Privileges for all features', + } + )} /> diff --git a/x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_custom.spec.ts b/x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_custom.spec.ts index 491f4f8952fd9..783f8be840b7f 100644 --- a/x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_custom.spec.ts +++ b/x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_custom.spec.ts @@ -55,7 +55,6 @@ import { MITRE_ATTACK_DETAILS, REFERENCE_URLS_DETAILS, RISK_SCORE_DETAILS, - RULE_ABOUT_DETAILS_HEADER_TOGGLE, RULE_NAME_HEADER, RULE_TYPE_DETAILS, RUNS_EVERY_DETAILS, @@ -180,7 +179,7 @@ describe('Custom detection rules creation', () => { getDetails(MITRE_ATTACK_DETAILS).should('have.text', expectedMitre); getDetails(TAGS_DETAILS).should('have.text', expectedTags); }); - cy.get(RULE_ABOUT_DETAILS_HEADER_TOGGLE).eq(INVESTIGATION_NOTES_TOGGLE).click({ force: true }); + cy.get(INVESTIGATION_NOTES_TOGGLE).click({ force: true }); cy.get(ABOUT_INVESTIGATION_NOTES).should('have.text', INVESTIGATION_NOTES_MARKDOWN); cy.get(DEFINITION_DETAILS).within(() => { getDetails(INDEX_PATTERNS_DETAILS).should('have.text', indexPatterns.join('')); @@ -333,9 +332,7 @@ describe('Custom detection rules deletion and edition', () => { getDetails(RISK_SCORE_DETAILS).should('have.text', editedRule.riskScore); getDetails(TAGS_DETAILS).should('have.text', expectedEditedtags); }); - cy.get(RULE_ABOUT_DETAILS_HEADER_TOGGLE) - .eq(INVESTIGATION_NOTES_TOGGLE) - .click({ force: true }); + cy.get(INVESTIGATION_NOTES_TOGGLE).click({ force: true }); cy.get(ABOUT_INVESTIGATION_NOTES).should('have.text', editedRule.note); cy.get(DEFINITION_DETAILS).within(() => { getDetails(INDEX_PATTERNS_DETAILS).should( diff --git a/x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_eql.spec.ts b/x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_eql.spec.ts index bee4713ca7cda..3d4aaca8bb78f 100644 --- a/x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_eql.spec.ts +++ b/x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_eql.spec.ts @@ -38,7 +38,6 @@ import { MITRE_ATTACK_DETAILS, REFERENCE_URLS_DETAILS, RISK_SCORE_DETAILS, - RULE_ABOUT_DETAILS_HEADER_TOGGLE, RULE_NAME_HEADER, RULE_TYPE_DETAILS, RUNS_EVERY_DETAILS, @@ -142,7 +141,7 @@ describe('Detection rules, EQL', () => { getDetails(MITRE_ATTACK_DETAILS).should('have.text', expectedMitre); getDetails(TAGS_DETAILS).should('have.text', expectedTags); }); - cy.get(RULE_ABOUT_DETAILS_HEADER_TOGGLE).eq(INVESTIGATION_NOTES_TOGGLE).click({ force: true }); + cy.get(INVESTIGATION_NOTES_TOGGLE).click({ force: true }); cy.get(ABOUT_INVESTIGATION_NOTES).should('have.text', INVESTIGATION_NOTES_MARKDOWN); cy.get(DEFINITION_DETAILS).within(() => { getDetails(INDEX_PATTERNS_DETAILS).should('have.text', indexPatterns.join('')); diff --git a/x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_override.spec.ts b/x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_override.spec.ts index e31fe2e9a3911..e905365d1bbb3 100644 --- a/x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_override.spec.ts +++ b/x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_override.spec.ts @@ -41,7 +41,6 @@ import { REFERENCE_URLS_DETAILS, RISK_SCORE_DETAILS, RISK_SCORE_OVERRIDE_DETAILS, - RULE_ABOUT_DETAILS_HEADER_TOGGLE, RULE_NAME_HEADER, RULE_NAME_OVERRIDE_DETAILS, RULE_TYPE_DETAILS, @@ -160,7 +159,7 @@ describe('Detection rules, override', () => { }); }); }); - cy.get(RULE_ABOUT_DETAILS_HEADER_TOGGLE).eq(INVESTIGATION_NOTES_TOGGLE).click({ force: true }); + cy.get(INVESTIGATION_NOTES_TOGGLE).click({ force: true }); cy.get(ABOUT_INVESTIGATION_NOTES).should('have.text', INVESTIGATION_NOTES_MARKDOWN); cy.get(DEFINITION_DETAILS).within(() => { getDetails(INDEX_PATTERNS_DETAILS).should('have.text', indexPatterns.join('')); diff --git a/x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_threshold.spec.ts b/x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_threshold.spec.ts index a6f974256f3e4..a9b43d82bb7fd 100644 --- a/x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_threshold.spec.ts +++ b/x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_threshold.spec.ts @@ -38,7 +38,6 @@ import { MITRE_ATTACK_DETAILS, REFERENCE_URLS_DETAILS, RISK_SCORE_DETAILS, - RULE_ABOUT_DETAILS_HEADER_TOGGLE, RULE_NAME_HEADER, RULE_TYPE_DETAILS, RUNS_EVERY_DETAILS, @@ -141,7 +140,7 @@ describe('Detection rules, threshold', () => { getDetails(MITRE_ATTACK_DETAILS).should('have.text', expectedMitre); getDetails(TAGS_DETAILS).should('have.text', expectedTags); }); - cy.get(RULE_ABOUT_DETAILS_HEADER_TOGGLE).eq(INVESTIGATION_NOTES_TOGGLE).click({ force: true }); + cy.get(INVESTIGATION_NOTES_TOGGLE).click({ force: true }); cy.get(ABOUT_INVESTIGATION_NOTES).should('have.text', INVESTIGATION_NOTES_MARKDOWN); cy.get(DEFINITION_DETAILS).within(() => { getDetails(INDEX_PATTERNS_DETAILS).should('have.text', indexPatterns.join('')); diff --git a/x-pack/plugins/security_solution/cypress/screens/rule_details.ts b/x-pack/plugins/security_solution/cypress/screens/rule_details.ts index e40b81ed0e856..d72210dd3e083 100644 --- a/x-pack/plugins/security_solution/cypress/screens/rule_details.ts +++ b/x-pack/plugins/security_solution/cypress/screens/rule_details.ts @@ -34,7 +34,7 @@ export const INDEX_PATTERNS_DETAILS = 'Index patterns'; export const INVESTIGATION_NOTES_MARKDOWN = 'test markdown'; -export const INVESTIGATION_NOTES_TOGGLE = 1; +export const INVESTIGATION_NOTES_TOGGLE = '[data-test-subj="stepAboutDetailsToggle-notes"]'; export const MACHINE_LEARNING_JOB_ID = '[data-test-subj="machineLearningJobId"]'; diff --git a/x-pack/plugins/security_solution/public/cases/components/case_status/index.tsx b/x-pack/plugins/security_solution/public/cases/components/case_status/index.tsx index a37c9052c2ff3..2d3a7850eb0b6 100644 --- a/x-pack/plugins/security_solution/public/cases/components/case_status/index.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/case_status/index.tsx @@ -4,12 +4,12 @@ * you may not use this file except in compliance with the Elastic License. */ -import React from 'react'; +import React, { useCallback } from 'react'; import styled, { css } from 'styled-components'; import { EuiBadge, + EuiButton, EuiButtonEmpty, - EuiButtonToggle, EuiDescriptionList, EuiDescriptionListDescription, EuiDescriptionListTitle, @@ -44,7 +44,7 @@ interface CaseStatusProps { onRefresh: () => void; status: string; title: string; - toggleStatusCase: (evt: unknown) => void; + toggleStatusCase: (status: boolean) => void; value: string | null; } const CaseStatusComp: React.FC = ({ @@ -62,56 +62,62 @@ const CaseStatusComp: React.FC = ({ title, toggleStatusCase, value, -}) => ( - - - - - - {i18n.STATUS} - - - {status} - - +}) => { + const handleToggleStatusCase = useCallback(() => { + toggleStatusCase(!isSelected); + }, [toggleStatusCase, isSelected]); + return ( + + + + + + {i18n.STATUS} + + + {status} + + + + + {title} + + + + + + + + + + + + {i18n.CASE_REFRESH} + - {title} - - - + + {buttonLabel} + + + + - - - - - - - {i18n.CASE_REFRESH} - - - - - - - - - - - -); + + + ); +}; export const CaseStatus = React.memo(CaseStatusComp); diff --git a/x-pack/plugins/security_solution/public/cases/components/case_view/index.test.tsx b/x-pack/plugins/security_solution/public/cases/components/case_view/index.test.tsx index 58d7efb763ee2..5cb6ede0d9d21 100644 --- a/x-pack/plugins/security_solution/public/cases/components/case_view/index.test.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/case_view/index.test.tsx @@ -183,9 +183,7 @@ describe('CaseView ', () => { ); await waitFor(() => { - wrapper - .find('input[data-test-subj="toggle-case-status"]') - .simulate('change', { target: { checked: true } }); + wrapper.find('[data-test-subj="toggle-case-status"]').first().simulate('click'); expect(updateCaseProperty).toHaveBeenCalled(); }); }); diff --git a/x-pack/plugins/security_solution/public/cases/components/case_view/index.tsx b/x-pack/plugins/security_solution/public/cases/components/case_view/index.tsx index 52cea10cfb275..7ee2b856f8786 100644 --- a/x-pack/plugins/security_solution/public/cases/components/case_view/index.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/case_view/index.tsx @@ -5,7 +5,7 @@ */ import { - EuiButtonToggle, + EuiButton, EuiFlexGroup, EuiFlexItem, EuiLoadingContent, @@ -242,10 +242,10 @@ export const CaseComponent = React.memo( ); const toggleStatusCase = useCallback( - (e) => + (nextStatus) => onUpdateField({ key: 'status', - value: e.target.checked ? 'closed' : 'open', + value: nextStatus ? 'closed' : 'open', }), [onUpdateField] ); @@ -307,6 +307,11 @@ export const CaseComponent = React.memo( [allCasesLink] ); + const isSelected = useMemo(() => caseStatusData.isSelected, [caseStatusData]); + const handleToggleStatusCase = useCallback(() => { + toggleStatusCase(!isSelected); + }, [toggleStatusCase, isSelected]); + return ( <> @@ -330,7 +335,7 @@ export const CaseComponent = React.memo( disabled={!userCanCrud} isLoading={isLoading && updateKey === 'status'} onRefresh={handleRefresh} - toggleStatusCase={toggleStatusCase} + toggleStatusCase={handleToggleStatusCase} {...caseStatusData} /> @@ -358,15 +363,16 @@ export const CaseComponent = React.memo( - + fill={caseStatusData.isSelected} + onClick={handleToggleStatusCase} + > + {caseStatusData.buttonLabel} + {hasDataToPush && ( diff --git a/x-pack/plugins/security_solution/public/common/components/paginated_table/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/paginated_table/__snapshots__/index.test.tsx.snap index 3df8663324fdd..6331a2e02b219 100644 --- a/x-pack/plugins/security_solution/public/common/components/paginated_table/__snapshots__/index.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/common/components/paginated_table/__snapshots__/index.test.tsx.snap @@ -77,15 +77,6 @@ exports[`Paginated Table Component rendering it renders the default load more ta "warning": "#ffce7a", }, "euiButtonMinWidth": "112px", - "euiButtonToggleBorderColor": "#343741", - "euiButtonToggleTypes": Object { - "danger": "#ff6666", - "ghost": "#ffffff", - "primary": "#1ba9f5", - "secondary": "#7de2d1", - "text": "#98a2b3", - "warning": "#ffce7a", - }, "euiButtonTypes": Object { "danger": "#ff6666", "ghost": "#ffffff", @@ -340,15 +331,6 @@ exports[`Paginated Table Component rendering it renders the default load more ta "small": "14px", "xSmall": "12px", }, - "euiNavDrawerBackgroundColor": "#1d1e24", - "euiNavDrawerContractingDelay": "150ms", - "euiNavDrawerExpandingDelay": "250ms", - "euiNavDrawerExtendedDelay": "1000ms", - "euiNavDrawerMenuAddedDelay": "90ms", - "euiNavDrawerSideShadow": "2px 0 2px -1px rgba(0, 0, 0, 0.3)", - "euiNavDrawerTopPosition": "49px", - "euiNavDrawerWidthCollapsed": "48px", - "euiNavDrawerWidthExpanded": "240px", "euiPageBackgroundColor": "#1a1b20", "euiPaletteColorBlind": Object { "euiColorVis0": Object { @@ -402,10 +384,22 @@ exports[`Paginated Table Component rendering it renders the default load more ta "euiPopoverTranslateDistance": "8px", "euiProgressColors": Object { "accent": "#f990c0", + "customColor": "currentColor", "danger": "#ff6666", "primary": "#1ba9f5", "secondary": "#7de2d1", "subdued": "#81858f", + "success": "#7de2d1", + "vis0": "#54b399", + "vis1": "#6092c0", + "vis2": "#d36086", + "vis3": "#9170b8", + "vis4": "#ca8eae", + "vis5": "#d6bf57", + "vis6": "#b9a888", + "vis7": "#da8b45", + "vis8": "#aa6556", + "vis9": "#e7664c", "warning": "#ffce7a", }, "euiProgressSizes": Object { diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/index.test.tsx index 757319e7aa1ae..555e02d13d723 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/index.test.tsx @@ -104,8 +104,8 @@ describe('StepAboutRuleToggleDetails', () => { ); expect(wrapper.find(EuiButtonGroup).exists()).toBeTruthy(); - expect(wrapper.find('EuiButtonToggle[id="details"]').at(0).prop('isSelected')).toBeTruthy(); - expect(wrapper.find('EuiButtonToggle[id="notes"]').at(0).prop('isSelected')).toBeFalsy(); + expect(wrapper.find('#details').at(0).prop('isSelected')).toBeTruthy(); + expect(wrapper.find('#notes').at(0).prop('isSelected')).toBeFalsy(); }); test('it allows users to toggle between "details" and "note"', () => { @@ -122,16 +122,17 @@ describe('StepAboutRuleToggleDetails', () => { ); - expect(wrapper.find('EuiButtonGroup[idSelected="details"]').exists()).toBeTruthy(); - expect(wrapper.find('EuiButtonGroup[idSelected="notes"]').exists()).toBeFalsy(); + expect(wrapper.find('[idSelected="details"]').exists()).toBeTruthy(); + expect(wrapper.find('[idSelected="notes"]').exists()).toBeFalsy(); wrapper - .find('input[title="Investigation guide"]') + .find('[title="Investigation guide"]') .at(0) + .find('input') .simulate('change', { target: { value: 'notes' } }); - expect(wrapper.find('EuiButtonGroup[idSelected="details"]').exists()).toBeFalsy(); - expect(wrapper.find('EuiButtonGroup[idSelected="notes"]').exists()).toBeTruthy(); + expect(wrapper.find('[idSelected="details"]').exists()).toBeFalsy(); + expect(wrapper.find('[idSelected="notes"]').exists()).toBeTruthy(); }); test('it displays notes markdown when user toggles to "notes"', () => { @@ -149,8 +150,9 @@ describe('StepAboutRuleToggleDetails', () => { ); wrapper - .find('input[title="Investigation guide"]') + .find('[title="Investigation guide"]') .at(0) + .find('input') .simulate('change', { target: { value: 'notes' } }); expect(wrapper.find('EuiButtonGroup[idSelected="notes"]').exists()).toBeTruthy(); diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/index.tsx index 52e9dc7e44ff7..fb98233bf8cc7 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/index.tsx @@ -8,7 +8,7 @@ import { EuiPanel, EuiProgress, EuiButtonGroup, - EuiButtonGroupOption, + EuiButtonGroupOptionProps, EuiSpacer, EuiFlexItem, EuiText, @@ -46,14 +46,16 @@ const AboutContent = styled.div` height: 100%; `; -const toggleOptions: EuiButtonGroupOption[] = [ +const toggleOptions: EuiButtonGroupOptionProps[] = [ { id: 'details', label: i18n.ABOUT_PANEL_DETAILS_TAB, + 'data-test-subj': 'stepAboutDetailsToggle-details', }, { id: 'notes', label: i18n.ABOUT_PANEL_NOTES_TAB, + 'data-test-subj': 'stepAboutDetailsToggle-notes', }, ]; @@ -98,6 +100,7 @@ const StepAboutRuleToggleDetailsComponent: React.FC = ({ setToggleOption(val); }} data-test-subj="stepAboutDetailsToggle" + legend={i18n.ABOUT_CONTROL_LEGEND} /> )} diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/translations.ts b/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/translations.ts index e1b89b1ec8ce2..8a98697b523d7 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/translations.ts +++ b/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/translations.ts @@ -25,3 +25,10 @@ export const ABOUT_PANEL_NOTES_TAB = i18n.translate( defaultMessage: 'Investigation guide', } ); + +export const ABOUT_CONTROL_LEGEND = i18n.translate( + 'xpack.securitySolution.detectionEngine.details.stepAboutRule.controlLegend', + { + defaultMessage: 'Viewing', + } +); diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/trusted_apps_grid/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/trusted_apps_grid/__snapshots__/index.test.tsx.snap index 86cb203671ac2..c82b9cac8ab1f 100644 --- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/trusted_apps_grid/__snapshots__/index.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/trusted_apps_grid/__snapshots__/index.test.tsx.snap @@ -2653,7 +2653,7 @@ exports[`TrustedAppsGrid renders correctly when loaded data 1`] = ` class="euiFlexItem euiFlexItem--flexGrowZero" >
); }); diff --git a/x-pack/plugins/security_solution/public/overview/components/recent_cases/filters/index.tsx b/x-pack/plugins/security_solution/public/overview/components/recent_cases/filters/index.tsx index af2c1523605d2..1bf608787fd7e 100644 --- a/x-pack/plugins/security_solution/public/overview/components/recent_cases/filters/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/recent_cases/filters/index.tsx @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { EuiButtonGroup, EuiButtonGroupOption } from '@elastic/eui'; +import { EuiButtonGroup, EuiButtonGroupOptionProps } from '@elastic/eui'; import React, { useCallback, useMemo } from 'react'; import { FilterMode } from '../types'; @@ -13,7 +13,7 @@ import * as i18n from '../translations'; const MY_RECENTLY_REPORTED_ID = 'myRecentlyReported'; -const toggleButtonIcons: EuiButtonGroupOption[] = [ +const toggleButtonIcons: EuiButtonGroupOptionProps[] = [ { id: 'recentlyCreated', label: i18n.RECENTLY_CREATED_CASES, @@ -45,7 +45,15 @@ export const Filters = React.memo<{ [setFilterBy] ); - return ; + return ( + + ); }); Filters.displayName = 'Filters'; diff --git a/x-pack/plugins/security_solution/public/overview/components/recent_cases/translations.ts b/x-pack/plugins/security_solution/public/overview/components/recent_cases/translations.ts index f9b3e05ad9595..ff5585affb475 100644 --- a/x-pack/plugins/security_solution/public/overview/components/recent_cases/translations.ts +++ b/x-pack/plugins/security_solution/public/overview/components/recent_cases/translations.ts @@ -41,3 +41,10 @@ export const VIEW_ALL_CASES = i18n.translate( defaultMessage: 'View all cases', } ); + +export const CASES_FILTER_CONTROL = i18n.translate( + 'xpack.securitySolution.recentCases.controlLegend', + { + defaultMessage: 'Cases filter', + } +); diff --git a/x-pack/plugins/security_solution/public/overview/components/recent_timelines/filters/index.tsx b/x-pack/plugins/security_solution/public/overview/components/recent_timelines/filters/index.tsx index 815768482781b..bd6f1271f3073 100644 --- a/x-pack/plugins/security_solution/public/overview/components/recent_timelines/filters/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/recent_timelines/filters/index.tsx @@ -4,14 +4,14 @@ * you may not use this file except in compliance with the Elastic License. */ -import { EuiButtonGroup, EuiButtonGroupOption } from '@elastic/eui'; +import { EuiButtonGroup, EuiButtonGroupOptionProps } from '@elastic/eui'; import React from 'react'; import { FilterMode } from '../types'; import * as i18n from '../translations'; -const toggleButtonIcons: EuiButtonGroupOption[] = [ +const toggleButtonIcons: EuiButtonGroupOptionProps[] = [ { id: 'favorites', label: i18n.FAVORITES, @@ -35,6 +35,7 @@ export const Filters = React.memo<{ setFilterBy(f as FilterMode); }} isIconOnly + legend={i18n.TIMELINES_FILTER_CONTROL} /> )); diff --git a/x-pack/plugins/security_solution/public/overview/components/recent_timelines/translations.ts b/x-pack/plugins/security_solution/public/overview/components/recent_timelines/translations.ts index 468773ae90790..998e333d727d2 100644 --- a/x-pack/plugins/security_solution/public/overview/components/recent_timelines/translations.ts +++ b/x-pack/plugins/security_solution/public/overview/components/recent_timelines/translations.ts @@ -81,3 +81,10 @@ export const VIEW_ALL_TIMELINES = i18n.translate( defaultMessage: 'View all timelines', } ); + +export const TIMELINES_FILTER_CONTROL = i18n.translate( + 'xpack.securitySolution.recentTimelines.filterControlLegend', + { + defaultMessage: 'Timelines filter', + } +); diff --git a/x-pack/plugins/security_solution/public/timelines/components/notes/note_card/__snapshots__/note_card_body.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/notes/note_card/__snapshots__/note_card_body.test.tsx.snap index 10ad0123f7fc6..17c614bd2c83c 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/notes/note_card/__snapshots__/note_card_body.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/timelines/components/notes/note_card/__snapshots__/note_card_body.test.tsx.snap @@ -77,15 +77,6 @@ exports[`NoteCardBody renders correctly against snapshot 1`] = ` "warning": "#ffce7a", }, "euiButtonMinWidth": "112px", - "euiButtonToggleBorderColor": "#343741", - "euiButtonToggleTypes": Object { - "danger": "#ff6666", - "ghost": "#ffffff", - "primary": "#1ba9f5", - "secondary": "#7de2d1", - "text": "#98a2b3", - "warning": "#ffce7a", - }, "euiButtonTypes": Object { "danger": "#ff6666", "ghost": "#ffffff", @@ -340,15 +331,6 @@ exports[`NoteCardBody renders correctly against snapshot 1`] = ` "small": "14px", "xSmall": "12px", }, - "euiNavDrawerBackgroundColor": "#1d1e24", - "euiNavDrawerContractingDelay": "150ms", - "euiNavDrawerExpandingDelay": "250ms", - "euiNavDrawerExtendedDelay": "1000ms", - "euiNavDrawerMenuAddedDelay": "90ms", - "euiNavDrawerSideShadow": "2px 0 2px -1px rgba(0, 0, 0, 0.3)", - "euiNavDrawerTopPosition": "49px", - "euiNavDrawerWidthCollapsed": "48px", - "euiNavDrawerWidthExpanded": "240px", "euiPageBackgroundColor": "#1a1b20", "euiPaletteColorBlind": Object { "euiColorVis0": Object { @@ -402,10 +384,22 @@ exports[`NoteCardBody renders correctly against snapshot 1`] = ` "euiPopoverTranslateDistance": "8px", "euiProgressColors": Object { "accent": "#f990c0", + "customColor": "currentColor", "danger": "#ff6666", "primary": "#1ba9f5", "secondary": "#7de2d1", "subdued": "#81858f", + "success": "#7de2d1", + "vis0": "#54b399", + "vis1": "#6092c0", + "vis2": "#d36086", + "vis3": "#9170b8", + "vis4": "#ca8eae", + "vis5": "#d6bf57", + "vis6": "#b9a888", + "vis7": "#da8b45", + "vis8": "#aa6556", + "vis9": "#e7664c", "warning": "#ffce7a", }, "euiProgressSizes": Object { diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/add_data_provider_popover.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/add_data_provider_popover.tsx index 0cd7032596f15..ff3df357f7337 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/add_data_provider_popover.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/add_data_provider_popover.tsx @@ -196,7 +196,6 @@ const AddDataProviderPopoverComponent: React.FC = ( isOpen={isAddFilterPopoverOpen} closePopover={handleClosePopover} anchorPosition="downLeft" - withTitle panelPaddingSize="none" ownFocus={true} repositionOnScroll diff --git a/x-pack/plugins/snapshot_restore/public/application/sections/home/policy_list/policy_details/policy_details.tsx b/x-pack/plugins/snapshot_restore/public/application/sections/home/policy_list/policy_details/policy_details.tsx index b4612c9df42ff..aecb3c02ef43e 100644 --- a/x-pack/plugins/snapshot_restore/public/application/sections/home/policy_list/policy_details/policy_details.tsx +++ b/x-pack/plugins/snapshot_restore/public/application/sections/home/policy_list/policy_details/policy_details.tsx @@ -214,7 +214,6 @@ export const PolicyDetails: React.FunctionComponent = ({ isOpen={isPopoverOpen} closePopover={() => setIsPopoverOpen(false)} panelPaddingSize="none" - withTitle anchorPosition="rightUp" repositionOnScroll > diff --git a/x-pack/plugins/snapshot_restore/public/application/sections/home/policy_list/policy_retention_schedule/policy_retention_schedule.tsx b/x-pack/plugins/snapshot_restore/public/application/sections/home/policy_list/policy_retention_schedule/policy_retention_schedule.tsx index dc5de0b4295e8..583c8e4ef1dc9 100644 --- a/x-pack/plugins/snapshot_restore/public/application/sections/home/policy_list/policy_retention_schedule/policy_retention_schedule.tsx +++ b/x-pack/plugins/snapshot_restore/public/application/sections/home/policy_list/policy_retention_schedule/policy_retention_schedule.tsx @@ -176,7 +176,6 @@ export const PolicyRetentionSchedule: React.FunctionComponent = ({ isOpen={isPopoverOpen} closePopover={() => setIsPopoverOpen(false)} panelPaddingSize="none" - withTitle anchorPosition="rightUp" repositionOnScroll > diff --git a/x-pack/plugins/spaces/public/nav_control/__snapshots__/nav_control_popover.test.tsx.snap b/x-pack/plugins/spaces/public/nav_control/__snapshots__/nav_control_popover.test.tsx.snap index 22d65f4600e05..e02e81e497806 100644 --- a/x-pack/plugins/spaces/public/nav_control/__snapshots__/nav_control_popover.test.tsx.snap +++ b/x-pack/plugins/spaces/public/nav_control/__snapshots__/nav_control_popover.test.tsx.snap @@ -26,7 +26,6 @@ exports[`NavControlPopover renders without crashing 1`] = ` ownFocus={true} panelPaddingSize="none" repositionOnScroll={true} - withTitle={true} > { anchorPosition={this.props.anchorPosition} panelPaddingSize="none" repositionOnScroll={true} - withTitle={this.props.anchorPosition.includes('down')} ownFocus > {element} diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_range_form.tsx b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_range_form.tsx index 7f6c23dddb9fc..8a41ea81407e4 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_range_form.tsx +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_range_form.tsx @@ -11,7 +11,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiSpacer, - EuiButtonToggle, + EuiButton, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; import { FilterAggConfigRange } from '../types'; @@ -60,18 +60,17 @@ export const FilterRangeForm: FilterAggConfigRange['aggTypeConfig']['FilterAggFo onChange={(e) => { updateConfig({ from: e.target.value === '' ? undefined : Number(e.target.value) }); }} - // @ts-ignore step="any" prepend={ - '} onChange={(e: any) => { updateConfig({ includeFrom: e.target.checked }); }} - isSelected={includeFrom} - isEmpty={!includeFrom} - /> + fill={includeFrom} + > + {includeFrom ? '≥' : '>'} + } /> @@ -91,18 +90,17 @@ export const FilterRangeForm: FilterAggConfigRange['aggTypeConfig']['FilterAggFo onChange={(e) => { updateConfig({ to: e.target.value === '' ? undefined : Number(e.target.value) }); }} - // @ts-ignore step="any" append={ - { - updateConfig({ includeTo: e.target.checked }); + onClick={() => { + updateConfig({ includeTo: !includeTo }); }} - isSelected={includeTo} - isEmpty={!includeTo} - /> + fill={includeTo} + > + {includeTo ? '≤' : '<'}s + } /> diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 19e8e057db0ea..7386903c311d2 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -529,8 +529,6 @@ "core.ui.chrome.headerGlobalNav.helpMenuOpenGitHubIssueTitle": "GitHubで問題を開く", "core.ui.chrome.headerGlobalNav.helpMenuTitle": "ヘルプ", "core.ui.chrome.headerGlobalNav.helpMenuVersion": "v {version}", - "core.ui.chrome.sideGlobalNav.viewRecentItemsFlyoutTitle": "最近のアイテム", - "core.ui.chrome.sideGlobalNav.viewRecentItemsLabel": "最近閲覧", "core.ui.EmptyRecentlyViewed": "最近閲覧したアイテムはありません", "core.ui.enterpriseSearchNavList.label": "エンタープライズサーチ", "core.ui.errorUrlOverflow.bigUrlWarningNotificationMessage": "{advancedSettingsLink}で{storeInSessionStorageParam}オプションを有効にするか、オンスクリーンビジュアルを簡素化してください。", @@ -559,7 +557,6 @@ "core.ui.primaryNavSection.undockAriaLabel": "プライマリナビゲーションリンクの固定を解除する", "core.ui.primaryNavSection.undockLabel": "ナビゲーションの固定を解除する", "core.ui.recentLinks.linkItem.screenReaderLabel": "{recentlyAccessedItemLinklabel}、タイプ: {pageType}", - "core.ui.recentLinks.screenReaderLabel": "最近閲覧したリンク、ナビゲーション", "core.ui.recentlyViewed": "最近閲覧", "core.ui.recentlyViewedAriaLabel": "最近閲覧したリンク", "core.ui.securityNavList.label": "セキュリティ", @@ -3671,7 +3668,6 @@ "visDefaultEditor.editorConfig.dateHistogram.customInterval.helpText": "構成間隔の倍数でなければなりません: {interval}", "visDefaultEditor.editorConfig.histogram.interval.helpText": "構成間隔の倍数でなければなりません: {interval}", "visDefaultEditor.metrics.wrongLastBucketTypeErrorMessage": "「{type}」メトリック集約を使用する場合、最後のバケット集約は「Date Histogram」または「Histogram」でなければなりません。", - "visDefaultEditor.sidebar.autoApplyChangesAriaLabel": "エディターの変更を自動適用します", "visDefaultEditor.sidebar.autoApplyChangesOffLabel": "自動適用がオフです", "visDefaultEditor.sidebar.autoApplyChangesOnLabel": "自動適用がオンです", "visDefaultEditor.sidebar.autoApplyChangesTooltip": "変更されるごとにビジュアライゼーションを自動的に更新します。", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index c448efdd9d7b5..3dfa1cbbca434 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -529,8 +529,6 @@ "core.ui.chrome.headerGlobalNav.helpMenuOpenGitHubIssueTitle": "在 GitHub 中提出问题", "core.ui.chrome.headerGlobalNav.helpMenuTitle": "帮助", "core.ui.chrome.headerGlobalNav.helpMenuVersion": "v {version}", - "core.ui.chrome.sideGlobalNav.viewRecentItemsFlyoutTitle": "最近项", - "core.ui.chrome.sideGlobalNav.viewRecentItemsLabel": "最近查看", "core.ui.EmptyRecentlyViewed": "没有最近查看的项目", "core.ui.enterpriseSearchNavList.label": "企业搜索", "core.ui.errorUrlOverflow.bigUrlWarningNotificationMessage": "在{advancedSettingsLink}中启用“{storeInSessionStorageParam}”选项或简化屏幕视觉效果。", @@ -559,7 +557,6 @@ "core.ui.primaryNavSection.undockAriaLabel": "取消停靠主导航", "core.ui.primaryNavSection.undockLabel": "取消停靠导航", "core.ui.recentLinks.linkItem.screenReaderLabel": "{recentlyAccessedItemLinklabel},类型:{pageType}", - "core.ui.recentLinks.screenReaderLabel": "最近查看的链接, 导航", "core.ui.recentlyViewed": "最近查看", "core.ui.recentlyViewedAriaLabel": "最近查看的链接", "core.ui.securityNavList.label": "安全", @@ -3672,7 +3669,6 @@ "visDefaultEditor.editorConfig.dateHistogram.customInterval.helpText": "必须是配置时间间隔的倍数:{interval}", "visDefaultEditor.editorConfig.histogram.interval.helpText": "必须是配置时间间隔的倍数:{interval}", "visDefaultEditor.metrics.wrongLastBucketTypeErrorMessage": "使用“{type}”指标聚合时,上一存储桶聚合必须是“Date Histogram”或“Histogram”。", - "visDefaultEditor.sidebar.autoApplyChangesAriaLabel": "自动应用编辑器更改", "visDefaultEditor.sidebar.autoApplyChangesOffLabel": "自动应用关闭", "visDefaultEditor.sidebar.autoApplyChangesOnLabel": "自动应用开启", "visDefaultEditor.sidebar.autoApplyChangesTooltip": "每次更改时自动更新可视化。", diff --git a/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_alert_types/geo_threshold/query_builder/index.tsx b/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_alert_types/geo_threshold/query_builder/index.tsx index b33d5e16c6eb9..ccc2ddd9c01ca 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_alert_types/geo_threshold/query_builder/index.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_alert_types/geo_threshold/query_builder/index.tsx @@ -188,7 +188,7 @@ export const GeoThresholdAlertTypeExpression: React.FunctionComponent - + setPopoverOpen(false)} ownFocus - withTitle anchorPosition="downLeft" zIndex={8000} display="block" diff --git a/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_alert_types/threshold/expression.tsx b/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_alert_types/threshold/expression.tsx index cc00c244ecd02..7c42c43dc79a2 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_alert_types/threshold/expression.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_alert_types/threshold/expression.tsx @@ -314,7 +314,6 @@ export const IndexThresholdAlertTypeExpression: React.FunctionComponent 0} error={errors.interval} diff --git a/x-pack/plugins/triggers_actions_ui/public/common/expression_items/for_the_last.tsx b/x-pack/plugins/triggers_actions_ui/public/common/expression_items/for_the_last.tsx index 08339b509d5fd..388f87cbf752b 100644 --- a/x-pack/plugins/triggers_actions_ui/public/common/expression_items/for_the_last.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/common/expression_items/for_the_last.tsx @@ -83,7 +83,6 @@ export const ForLastExpression = ({ }} ownFocus display={display === 'fullWidth' ? 'block' : 'inlineBlock'} - withTitle anchorPosition={popupPosition ?? 'downLeft'} >
diff --git a/x-pack/plugins/triggers_actions_ui/public/common/expression_items/group_by_over.tsx b/x-pack/plugins/triggers_actions_ui/public/common/expression_items/group_by_over.tsx index 6af103be96e13..785df0981ebe6 100644 --- a/x-pack/plugins/triggers_actions_ui/public/common/expression_items/group_by_over.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/common/expression_items/group_by_over.tsx @@ -113,7 +113,6 @@ export const GroupByExpression = ({ setGroupByPopoverOpen(false); }} ownFocus - withTitle display={display === 'fullWidth' ? 'block' : 'inlineBlock'} anchorPosition={popupPosition ?? 'downRight'} > diff --git a/x-pack/plugins/triggers_actions_ui/public/common/expression_items/of.tsx b/x-pack/plugins/triggers_actions_ui/public/common/expression_items/of.tsx index 9cea1d3812274..e15b9a21570c9 100644 --- a/x-pack/plugins/triggers_actions_ui/public/common/expression_items/of.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/common/expression_items/of.tsx @@ -101,7 +101,6 @@ export const OfExpression = ({ closePopover={() => { setAggFieldPopoverOpen(false); }} - withTitle display={display === 'fullWidth' ? 'block' : 'inlineBlock'} anchorPosition={popupPosition ?? 'downRight'} zIndex={8000} diff --git a/x-pack/plugins/triggers_actions_ui/public/common/expression_items/threshold.tsx b/x-pack/plugins/triggers_actions_ui/public/common/expression_items/threshold.tsx index 2b5cec98b16a1..bdf30414b68bb 100644 --- a/x-pack/plugins/triggers_actions_ui/public/common/expression_items/threshold.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/common/expression_items/threshold.tsx @@ -97,7 +97,6 @@ export const ThresholdExpression = ({ setAlertThresholdPopoverOpen(false); }} ownFocus - withTitle display={display === 'fullWidth' ? 'block' : 'inlineBlock'} anchorPosition={popupPosition ?? 'downLeft'} > diff --git a/x-pack/plugins/triggers_actions_ui/public/common/expression_items/when.tsx b/x-pack/plugins/triggers_actions_ui/public/common/expression_items/when.tsx index 18197b6f64e43..5696417f241fd 100644 --- a/x-pack/plugins/triggers_actions_ui/public/common/expression_items/when.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/common/expression_items/when.tsx @@ -66,7 +66,6 @@ export const WhenExpression = ({ }} ownFocus display={display === 'fullWidth' ? 'block' : 'inlineBlock'} - withTitle anchorPosition={popupPosition ?? 'downLeft'} >
diff --git a/x-pack/plugins/ui_actions_enhanced/public/drilldowns/url_drilldown/components/url_drilldown_collect_config/url_drilldown_collect_config.tsx b/x-pack/plugins/ui_actions_enhanced/public/drilldowns/url_drilldown/components/url_drilldown_collect_config/url_drilldown_collect_config.tsx index bd0191443d785..3251e85841d86 100644 --- a/x-pack/plugins/ui_actions_enhanced/public/drilldowns/url_drilldown/components/url_drilldown_collect_config/url_drilldown_collect_config.tsx +++ b/x-pack/plugins/ui_actions_enhanced/public/drilldowns/url_drilldown/components/url_drilldown_collect_config/url_drilldown_collect_config.tsx @@ -189,7 +189,6 @@ function AddVariableButton({ closePopover={closePopover} panelPaddingSize="none" anchorPosition="downLeft" - withTitle >
diff --git a/x-pack/plugins/uptime/public/components/overview/filter_group/filter_popover.tsx b/x-pack/plugins/uptime/public/components/overview/filter_group/filter_popover.tsx index 064907a633df0..902f497babda8 100644 --- a/x-pack/plugins/uptime/public/components/overview/filter_group/filter_popover.tsx +++ b/x-pack/plugins/uptime/public/components/overview/filter_group/filter_popover.tsx @@ -93,7 +93,6 @@ export const FilterPopover = ({ id={id} isOpen={isOpen || forceOpen} ownFocus={true} - withTitle zIndex={10000} > diff --git a/x-pack/plugins/uptime/public/pages/__tests__/__snapshots__/page_header.test.tsx.snap b/x-pack/plugins/uptime/public/pages/__tests__/__snapshots__/page_header.test.tsx.snap index 15389460517de..7bb578494ab44 100644 --- a/x-pack/plugins/uptime/public/pages/__tests__/__snapshots__/page_header.test.tsx.snap +++ b/x-pack/plugins/uptime/public/pages/__tests__/__snapshots__/page_header.test.tsx.snap @@ -276,7 +276,7 @@ Array [ class="euiToolTipAnchor" >