diff --git a/package.json b/package.json index 22ac5858452168..1655f03ace40ac 100644 --- a/package.json +++ b/package.json @@ -102,7 +102,7 @@ "@elastic/datemath": "5.0.3", "@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@8.9.1-canary.1", "@elastic/ems-client": "8.5.1", - "@elastic/eui": "91.0.0-backport.0", + "@elastic/eui": "91.3.1", "@elastic/filesaver": "1.1.2", "@elastic/node-crypto": "1.2.1", "@elastic/numeral": "^2.5.1", diff --git a/packages/core/i18n/core-i18n-browser-internal/src/__snapshots__/i18n_service.test.tsx.snap b/packages/core/i18n/core-i18n-browser-internal/src/__snapshots__/i18n_service.test.tsx.snap index 610656fa96f466..416eba2d6fb6ed 100644 --- a/packages/core/i18n/core-i18n-browser-internal/src/__snapshots__/i18n_service.test.tsx.snap +++ b/packages/core/i18n/core-i18n-browser-internal/src/__snapshots__/i18n_service.test.tsx.snap @@ -35,6 +35,7 @@ exports[`#start() returns \`Context\` component 1`] = ` "euiCodeBlockFullScreen.fullscreenCollapse": "Collapse", "euiCodeBlockFullScreen.fullscreenExpand": "Expand", "euiCollapsedItemActions.allActions": "All actions", + "euiCollapsedItemActions.allActionsDisabled": "Individual item actions are disabled when rows are being selected.", "euiCollapsibleNavBeta.ariaLabel": "Site menu", "euiCollapsibleNavButton.ariaLabelClose": "Close navigation", "euiCollapsibleNavButton.ariaLabelCollapse": "Collapse navigation", @@ -53,15 +54,12 @@ exports[`#start() returns \`Context\` component 1`] = ` "euiColumnActions.moveRight": "Move right", "euiColumnActions.sort": [Function], "euiColumnSelector.button": "Columns", - "euiColumnSelector.buttonActivePlural": [Function], - "euiColumnSelector.buttonActiveSingular": [Function], "euiColumnSelector.dragHandleAriaLabel": "Drag handle", "euiColumnSelector.hideAll": "Hide all", "euiColumnSelector.search": "Search", "euiColumnSelector.searchcolumns": "Search columns", "euiColumnSelector.selectAll": "Show all", "euiColumnSorting.button": "Sort fields", - "euiColumnSorting.buttonActive": [Function], "euiColumnSorting.clearAll": "Clear sorting", "euiColumnSorting.emptySorting": "Currently no fields are sorted", "euiColumnSorting.pickFields": "Pick fields to sort by", @@ -110,6 +108,7 @@ exports[`#start() returns \`Context\` component 1`] = ` "euiDataGridSchema.jsonSortTextDesc": "Large-Small", "euiDataGridSchema.numberSortTextAsc": "Low-High", "euiDataGridSchema.numberSortTextDesc": "High-Low", + "euiDataGridToolbarControl.badgeAriaLabel": [Function], "euiDatePopoverButton.invalidTitle": [Function], "euiDatePopoverButton.outdatedTitle": [Function], "euiDatePopoverContent.absoluteTabLabel": "Absolute", @@ -133,6 +132,8 @@ exports[`#start() returns \`Context\` component 1`] = ` "euiDisplaySelector.rowHeightLabel": "Row height", "euiDualRange.sliderScreenReaderInstructions": "You are in a custom range slider. Use the Up and Down arrow keys to change the minimum value. Press Tab to interact with the maximum value.", "euiErrorBoundary.error": "Error", + "euiExternalLinkIcon.ariaLabel": "External link", + "euiExternalLinkIcon.newTarget.screenReaderOnlyText": "(opens in a new tab or window)", "euiFieldPassword.maskPassword": "Mask password", "euiFieldPassword.showPassword": "Show password as plain text. Note: this will visually expose your password on the screen.", "euiFilePicker.clearSelectedFiles": "Clear selected files", @@ -185,8 +186,6 @@ exports[`#start() returns \`Context\` component 1`] = ` "euiKeyboardShortcuts.title": "Keyboard shortcuts", "euiKeyboardShortcuts.upArrowDescription": "Move one cell up", "euiKeyboardShortcuts.upArrowTitle": "Up arrow", - "euiLink.external.ariaLabel": "External link", - "euiLink.newTarget.screenReaderOnlyText": "(opens in a new tab or window)", "euiLoadingChart.ariaLabel": "Loading", "euiLoadingStrings.ariaLabel": "Loading", "euiMark.highlightEnd": "highlight end", diff --git a/packages/core/i18n/core-i18n-browser-internal/src/i18n_eui_mapping.tsx b/packages/core/i18n/core-i18n-browser-internal/src/i18n_eui_mapping.tsx index a669a86bfda1c9..f542b59c24850a 100644 --- a/packages/core/i18n/core-i18n-browser-internal/src/i18n_eui_mapping.tsx +++ b/packages/core/i18n/core-i18n-browser-internal/src/i18n_eui_mapping.tsx @@ -167,6 +167,13 @@ export const getEuiContextMapping = (): EuiTokensObject => { 'ARIA label and tooltip content describing a button that expands an actions menu', } ), + 'euiCollapsedItemActions.allActionsDisabled': i18n.translate( + 'core.euiCollapsedItemActions.allActionsDisabled', + { + defaultMessage: 'Individual item actions are disabled when rows are being selected.', + description: 'Title content when the actions popover toggle is disabled', + } + ), 'euiCollapsibleNavBeta.ariaLabel': i18n.translate('core.euiCollapsibleNavBeta.ariaLabel', { defaultMessage: 'Site menu', }), @@ -252,16 +259,6 @@ export const getEuiContextMapping = (): EuiTokensObject => { 'euiColumnSelector.searchcolumns': i18n.translate('core.euiColumnSelector.searchcolumns', { defaultMessage: 'Search columns', }), - 'euiColumnSelector.buttonActiveSingular': ({ numberOfHiddenFields }: EuiValues) => - i18n.translate('core.euiColumnSelector.buttonActiveSingular', { - defaultMessage: '{numberOfHiddenFields} column hidden', - values: { numberOfHiddenFields }, - }), - 'euiColumnSelector.buttonActivePlural': ({ numberOfHiddenFields }: EuiValues) => - i18n.translate('core.euiColumnSelector.buttonActivePlural', { - defaultMessage: '{numberOfHiddenFields} columns hidden', - values: { numberOfHiddenFields }, - }), 'euiColumnSorting.clearAll': i18n.translate('core.euiColumnSorting.clearAll', { defaultMessage: 'Clear sorting', }), @@ -280,11 +277,6 @@ export const getEuiContextMapping = (): EuiTokensObject => { 'euiColumnSorting.button': i18n.translate('core.euiColumnSorting.button', { defaultMessage: 'Sort fields', }), - 'euiColumnSorting.buttonActive': ({ numberOfSortedFields }: EuiValues) => - i18n.translate('core.euiColumnSorting.buttonActive', { - defaultMessage: '{numberOfSortedFields, plural, one {# field} other {# fields}} sorted', - values: { numberOfSortedFields }, - }), 'euiColumnSortingDraggable.activeSortLabel': ({ display }: EuiValues) => i18n.translate('core.euiColumnSortingDraggable.activeSortLabel', { defaultMessage: '{display} is sorting this data grid', @@ -673,6 +665,11 @@ export const getEuiContextMapping = (): EuiTokensObject => { description: 'Descending size label', } ), + 'euiDataGridToolbarControl.badgeAriaLabel': ({ count }: EuiValues) => + i18n.translate('core.euiDataGridToolbarControl.badgeAriaLabel', { + defaultMessage: 'Active: {count}', + values: { count }, + }), 'euiDatePopoverButton.invalidTitle': ({ title }: EuiValues) => i18n.translate('core.euiDatePopoverButton.invalidTitle', { defaultMessage: 'Invalid date: {title}', @@ -830,11 +827,11 @@ export const getEuiContextMapping = (): EuiTokensObject => { 'core.euiInlineEditForm.saveButtonAriaLabel', { defaultMessage: 'Save edit' } ), - 'euiLink.external.ariaLabel': i18n.translate('core.euiLink.external.ariaLabel', { + 'euiExternalLinkIcon.ariaLabel': i18n.translate('core.euiExternalLinkIcon.ariaLabel', { defaultMessage: 'External link', }), - 'euiLink.newTarget.screenReaderOnlyText': i18n.translate( - 'core.euiLink.newTarget.screenReaderOnlyText', + 'euiExternalLinkIcon.newTarget.screenReaderOnlyText': i18n.translate( + 'core.euiExternalLinkIcon.newTarget.screenReaderOnlyText', { defaultMessage: '(opens in a new tab or window)', } diff --git a/packages/kbn-unified-data-table/src/components/__snapshots__/data_table_columns.test.tsx.snap b/packages/kbn-unified-data-table/src/components/__snapshots__/data_table_columns.test.tsx.snap index d5cbd1a0d408e8..3abfdd59567f54 100644 --- a/packages/kbn-unified-data-table/src/components/__snapshots__/data_table_columns.test.tsx.snap +++ b/packages/kbn-unified-data-table/src/components/__snapshots__/data_table_columns.test.tsx.snap @@ -45,6 +45,17 @@ Array [ ], "display":
+
<> {timeFieldName} diff --git a/packages/kbn-unified-data-table/src/components/data_table_document_selection.tsx b/packages/kbn-unified-data-table/src/components/data_table_document_selection.tsx index 4f660009a232cb..db6ed7680b0be0 100644 --- a/packages/kbn-unified-data-table/src/components/data_table_document_selection.tsx +++ b/packages/kbn-unified-data-table/src/components/data_table_document_selection.tsx @@ -6,15 +6,13 @@ * Side Public License, v 1. */ import React, { useCallback, useContext, useEffect, useMemo, useState } from 'react'; -import classNames from 'classnames'; import { - EuiButtonEmpty, EuiCheckbox, EuiContextMenuItem, EuiContextMenuPanel, EuiCopy, EuiDataGridCellValueElementProps, - EuiNotificationBadge, + EuiDataGridToolbarControl, EuiPopover, EuiFlexGroup, EuiFlexItem, @@ -183,33 +181,20 @@ export function DataTableDocumentToolbarBtn({ isOpen={isSelectionPopoverOpen} panelPaddingSize="none" button={ - - - - - - - {selectedDocs.length} - - - + + } > {isSelectionPopoverOpen && } diff --git a/src/dev/license_checker/config.ts b/src/dev/license_checker/config.ts index db69bab07e1eac..0d0b59092746e0 100644 --- a/src/dev/license_checker/config.ts +++ b/src/dev/license_checker/config.ts @@ -85,7 +85,7 @@ export const LICENSE_OVERRIDES = { 'jsts@1.6.2': ['Eclipse Distribution License - v 1.0'], // cf. https://github.com/bjornharrtell/jsts '@mapbox/jsonlint-lines-primitives@2.0.2': ['MIT'], // license in readme https://github.com/tmcw/jsonlint '@elastic/ems-client@8.5.1': ['Elastic License 2.0'], - '@elastic/eui@91.0.0-backport.0': ['SSPL-1.0 OR Elastic License 2.0'], + '@elastic/eui@91.3.1': ['SSPL-1.0 OR Elastic License 2.0'], 'language-subtag-registry@0.3.21': ['CC-BY-4.0'], // retired ODC‑By license https://github.com/mattcg/language-subtag-registry 'buffers@0.1.1': ['MIT'], // license in importing module https://www.npmjs.com/package/binary '@bufbuild/protobuf@1.2.1': ['Apache-2.0'], // license (Apache-2.0 AND BSD-3-Clause) diff --git a/src/plugins/data/public/utils/table_inspector_view/components/download_options.tsx b/src/plugins/data/public/utils/table_inspector_view/components/download_options.tsx index 599de9e82c58ca..ef03d9d9d251e8 100644 --- a/src/plugins/data/public/utils/table_inspector_view/components/download_options.tsx +++ b/src/plugins/data/public/utils/table_inspector_view/components/download_options.tsx @@ -141,7 +141,7 @@ class DataDownloadOptions extends Component } - toolTipPosition="left" + toolTipProps={{ position: 'left' }} > } - toolTipPosition="left" + toolTipProps={{ position: 'left' }} > , diff --git a/src/plugins/data_view_field_editor/public/components/field_format_editor/editors/url/__snapshots__/url.test.tsx.snap b/src/plugins/data_view_field_editor/public/components/field_format_editor/editors/url/__snapshots__/url.test.tsx.snap index 3685144b15219f..9959f3f97edd9d 100644 --- a/src/plugins/data_view_field_editor/public/components/field_format_editor/editors/url/__snapshots__/url.test.tsx.snap +++ b/src/plugins/data_view_field_editor/public/components/field_format_editor/editors/url/__snapshots__/url.test.tsx.snap @@ -179,13 +179,13 @@ exports[`UrlFormatEditor should render normally 1`] = ` URL template help External link (opens in a new tab or window) @@ -244,13 +244,13 @@ exports[`UrlFormatEditor should render normally 1`] = ` Label template help External link (opens in a new tab or window) diff --git a/src/plugins/discover/public/components/discover_grid/render_custom_toolbar.scss b/src/plugins/discover/public/components/discover_grid/render_custom_toolbar.scss index e24f7f8c6fcb16..66a3e9bb4f0435 100644 --- a/src/plugins/discover/public/components/discover_grid/render_custom_toolbar.scss +++ b/src/plugins/discover/public/components/discover_grid/render_custom_toolbar.scss @@ -2,7 +2,7 @@ padding: $euiSizeS $euiSizeS $euiSizeXS; } -.dscGridToolbarControlButton .euiDataGrid__controlBtn { +.dscGridToolbarControlButton .euiDataGridToolbarControl { block-size: $euiSizeXL; border: $euiBorderThin; border-radius: $euiBorderRadiusSmall; @@ -13,10 +13,7 @@ block-size: $euiSize; } - // cancel default background and font changes - &.euiDataGrid__controlBtn--active { - font-weight: $euiFontWeightMedium; - } + // cancel default background changes &:active, &:focus { background: transparent; } diff --git a/src/plugins/inspector/public/ui/inspector_view_chooser.tsx b/src/plugins/inspector/public/ui/inspector_view_chooser.tsx index 454bd1917ffd1a..d4621be61e73b4 100644 --- a/src/plugins/inspector/public/ui/inspector_view_chooser.tsx +++ b/src/plugins/inspector/public/ui/inspector_view_chooser.tsx @@ -60,7 +60,7 @@ export class InspectorViewChooser extends Component { this.closeSelector(); }} toolTipContent={view.help} - toolTipPosition="left" + toolTipProps={{ position: 'left' }} data-test-subj={`inspectorViewChooser${view.title}`} > {view.title} diff --git a/src/plugins/saved_objects_management/public/management_section/object_view/components/__snapshots__/not_found_errors.test.tsx.snap b/src/plugins/saved_objects_management/public/management_section/object_view/components/__snapshots__/not_found_errors.test.tsx.snap index f1ee3dd03f3e55..829472941701c1 100644 --- a/src/plugins/saved_objects_management/public/management_section/object_view/components/__snapshots__/not_found_errors.test.tsx.snap +++ b/src/plugins/saved_objects_management/public/management_section/object_view/components/__snapshots__/not_found_errors.test.tsx.snap @@ -35,13 +35,13 @@ exports[`NotFoundErrors component renders correctly for index-pattern type 1`] = > Saved objects APIs External link (opens in a new tab or window) @@ -87,13 +87,13 @@ exports[`NotFoundErrors component renders correctly for index-pattern-field type > Saved objects APIs External link (opens in a new tab or window) @@ -139,13 +139,13 @@ exports[`NotFoundErrors component renders correctly for search type 1`] = ` > Saved objects APIs External link (opens in a new tab or window) @@ -189,13 +189,13 @@ exports[`NotFoundErrors component renders correctly for unknown type 1`] = ` > Saved objects APIs External link (opens in a new tab or window) diff --git a/x-pack/packages/ml/data_grid/components/column_chart.tsx b/x-pack/packages/ml/data_grid/components/column_chart.tsx index 9f8b866bea930c..7ebfb6ecaf5d4e 100644 --- a/x-pack/packages/ml/data_grid/components/column_chart.tsx +++ b/x-pack/packages/ml/data_grid/components/column_chart.tsx @@ -6,40 +6,27 @@ */ import React, { type FC } from 'react'; -import { css } from '@emotion/react'; import { BarSeries, Chart, Settings, ScaleType, LEGACY_LIGHT_THEME } from '@elastic/charts'; -import { euiTextTruncate, type EuiDataGridColumn } from '@elastic/eui'; - -import { euiThemeVars } from '@kbn/ui-theme'; +import { mathWithUnits, type UseEuiTheme, type EuiDataGridColumn } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { isUnsupportedChartData, ChartData } from '../lib/field_histograms'; import { useColumnChart } from '../hooks/use_column_chart'; -const cssHistogram = css({ +const cssHistogram = ({ euiTheme }: UseEuiTheme) => ({ width: '100%', - height: `calc(${euiThemeVars.euiSizeXL} + ${euiThemeVars.euiSizeXXL})`, + height: mathWithUnits([euiTheme.size.xl, euiTheme.size.xxl], (x, y) => x + y), }); -const cssHistogramLegend = css([ - css` - ${euiTextTruncate()} - `, - { - color: euiThemeVars.euiColorMediumShade, - display: 'block', - overflowX: 'hidden', - margin: `${euiThemeVars.euiSizeXS} 0 0 0`, - fontSize: euiThemeVars.euiFontSizeXS, +const cssHistogramLegend = ({ euiTheme }: UseEuiTheme) => + ({ + color: euiTheme.colors.mediumShade, + marginTop: euiTheme.size.xs, fontStyle: 'italic', fontWeight: 'normal', - textAlign: 'left', - }, -]); - -const cssHistogramLegendNumeric = css([cssHistogramLegend, { textAlign: 'right' }]); + } as const); interface Props { chartData: ChartData; @@ -100,12 +87,17 @@ export const ColumnChart: FC = ({
)}
{legendText}
- {!hideLabel &&
{columnType.id}
} + {!hideLabel && ( +
+ {columnType.id} +
+ )}
); }; diff --git a/x-pack/packages/ml/data_grid/components/data_grid.tsx b/x-pack/packages/ml/data_grid/components/data_grid.tsx index d90fdc125e6cd2..de0f7d8ee9a341 100644 --- a/x-pack/packages/ml/data_grid/components/data_grid.tsx +++ b/x-pack/packages/ml/data_grid/components/data_grid.tsx @@ -7,7 +7,6 @@ import { isEqual } from 'lodash'; import React, { memo, useEffect, useRef, FC } from 'react'; -import { css } from '@emotion/react'; import { EuiButtonEmpty, @@ -24,6 +23,8 @@ import { EuiSpacer, EuiTitle, EuiToolTip, + UseEuiTheme, + mathWithUnits, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; @@ -35,18 +36,49 @@ import { isPopulatedObject } from '@kbn/ml-is-populated-object'; import { euiDataGridStyle, euiDataGridToolbarSettings, INDEX_STATUS } from '../lib/common'; import { UseIndexDataReturnType } from '../lib/types'; -const cssOverride = css({ - '.euiDataGridRowCell--boolean': { textTransform: 'none' }, - // Overrides to align the sorting arrow, actions icon and the column header when no chart is available, - // to the bottom of the cell when histogram charts are enabled. - // Note that overrides have to be used as currently it is not possible to add a custom class name - // for the EuiDataGridHeaderCell - see https://github.com/elastic/eui/issues/5106 - '.euiDataGridHeaderCell': { - '.euiDataGridHeaderCell__sortingArrow,.euiDataGridHeaderCell__icon,.euiPopover': { - marginTop: 'auto', +const histogramHeaderProps = { className: 'cellHeaderWithHistogramChart' }; +const cssOverride = ({ euiTheme }: UseEuiTheme) => + ({ + '.euiDataGridRowCell--boolean': { textTransform: 'none' }, + // When a histogram chart is present in the column header, absolutely position + // the sorting arrow and actions icon so that the chart can expand to the full width + // of the header + '.cellHeaderWithHistogramChart': { + '.euiDataGridHeaderCell__content': { + width: '100%', + textAlign: 'left', // Should be overridden by EuiDataGrid's base CSS for numeric & currency schema + }, + '.euiDataGridHeaderCell__sortingArrow': { + position: 'absolute', + bottom: 0, + right: euiTheme.size.base, // Positioned to the left of the actions icon + // If the arrow is visible, ensure the icon is as well + '+ .euiPopover .euiDataGridHeaderCell__icon': { + width: 'auto', + opacity: '1', + }, + }, + '.euiDataGridHeaderCell__button > .euiPopover': { + position: 'absolute', + bottom: 0, + right: 0, + }, + // Re-apply cell icon affordances manually (due to absolute positioning) + '.histogramLabel': { + transition: `margin ${euiTheme.animation.fast} ease-in`, + }, + '&:hover, &:focus-within, &:has(.euiPopover-isOpen)': { + '.histogramLabel': { + marginRight: euiTheme.size.base, + }, + }, + '&:has(.euiDataGridHeaderCell__sortingArrow)': { + '.histogramLabel': { + marginRight: mathWithUnits([euiTheme.size.xl, euiTheme.size.xxs], (x, y) => x + y), + }, + }, }, - }, -}); + } as const); export const DataGridTitle: FC<{ title: string }> = ({ title }) => ( @@ -264,6 +296,7 @@ export const DataGrid: FC = memo( aria-label={isWithHeader(props) ? props.title : ''} columns={columnsWithCharts.map((c) => { c.initialWidth = 165; + if (chartsVisible) c.displayHeaderCellProps = histogramHeaderProps; return c; })} columnVisibility={{ visibleColumns, setVisibleColumns }} diff --git a/x-pack/packages/ml/data_grid/emotion.d.ts b/x-pack/packages/ml/data_grid/emotion.d.ts new file mode 100644 index 00000000000000..213178080e5368 --- /dev/null +++ b/x-pack/packages/ml/data_grid/emotion.d.ts @@ -0,0 +1,14 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import '@emotion/react'; +import type { UseEuiTheme } from '@elastic/eui'; + +declare module '@emotion/react' { + // eslint-disable-next-line @typescript-eslint/no-empty-interface + export interface Theme extends UseEuiTheme {} +} diff --git a/x-pack/packages/ml/data_grid/tsconfig.json b/x-pack/packages/ml/data_grid/tsconfig.json index f074a13b25696a..590cb613b7bf0f 100644 --- a/x-pack/packages/ml/data_grid/tsconfig.json +++ b/x-pack/packages/ml/data_grid/tsconfig.json @@ -14,6 +14,7 @@ "include": [ "**/*.ts", "**/*.tsx", + "./emotion.d.ts", // Emotion EUI theme typing ], "exclude": [ "target/**/*" diff --git a/x-pack/packages/security-solution/data_table/components/data_table/index.tsx b/x-pack/packages/security-solution/data_table/components/data_table/index.tsx index 99f2f1006a309e..3350263513099e 100644 --- a/x-pack/packages/security-solution/data_table/components/data_table/index.tsx +++ b/x-pack/packages/security-solution/data_table/components/data_table/index.tsx @@ -118,14 +118,19 @@ const EuiDataGridContainer = styled.div<{ hideLastPage: boolean }>` ${({ hideLastPage }) => `${hideLastPage ? 'display:none' : ''}`}; } } - div .euiDataGridRowCell__contentWrapper { + div .euiDataGridRowCell { display: flex; align-items: center; } - div .euiDataGridRowCell--lastColumn .euiDataGridRowCell__content { - flex-grow: 0; + div .euiDataGridRowCell > [data-focus-lock-disabled] { + display: flex; + align-items: center; + flex-grow: 1; width: 100%; } + div .euiDataGridRowCell__content { + flex-grow: 1; + } div .siemEventsTable__trSupplement--summary { display: block; } diff --git a/x-pack/plugins/aiops/public/components/change_point_detection/fields_config.tsx b/x-pack/plugins/aiops/public/components/change_point_detection/fields_config.tsx index 0776bbba908a62..7429ad7ba9f0a3 100644 --- a/x-pack/plugins/aiops/public/components/change_point_detection/fields_config.tsx +++ b/x-pack/plugins/aiops/public/components/change_point_detection/fields_config.tsx @@ -284,7 +284,7 @@ const FieldPanel: FC = ({ disabled: caseAttachmentButtonDisabled, ...(caseAttachmentButtonDisabled ? { - toolTipPosition: 'left' as const, + toolTipProps: { position: 'left' as const }, toolTipContent: i18n.translate( 'xpack.aiops.changePointDetection.attachToCaseTooltipContent', { diff --git a/x-pack/plugins/canvas/shareable_runtime/components/__snapshots__/app.test.tsx.snap b/x-pack/plugins/canvas/shareable_runtime/components/__snapshots__/app.test.tsx.snap index b661ee6e992e7e..4b483b69445e88 100644 --- a/x-pack/plugins/canvas/shareable_runtime/components/__snapshots__/app.test.tsx.snap +++ b/x-pack/plugins/canvas/shareable_runtime/components/__snapshots__/app.test.tsx.snap @@ -1,3 +1,3 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[` App renders properly 1`] = `"
markdown mock
markdown mock

Page level controls

My Canvas Workpad

There is a new region landmark with page level controls at the end of the document.

"`; +exports[` App renders properly 1`] = `"
markdown mock
markdown mock

Page level controls

My Canvas Workpad

There is a new region landmark with page level controls at the end of the document.

"`; diff --git a/x-pack/plugins/cloud_security_posture/public/components/cloud_security_data_table/use_styles.ts b/x-pack/plugins/cloud_security_posture/public/components/cloud_security_data_table/use_styles.ts index 7823698ebd5c89..fe16f8c98df7ee 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/cloud_security_data_table/use_styles.ts +++ b/x-pack/plugins/cloud_security_posture/public/components/cloud_security_data_table/use_styles.ts @@ -27,22 +27,26 @@ export const useStyles = () => { & .euiDataGrid--headerUnderline .euiDataGridHeaderCell { border-bottom: ${euiTheme.border.width.thick} solid ${euiTheme.colors.fullShade}; } - & .euiDataGridRowCell__contentByHeight + .euiDataGridRowCell__expandActions { - padding: 0; - } & .euiButtonIcon[data-test-subj='docTableExpandToggleColumn'] { color: ${euiTheme.colors.primary}; } & .euiDataGridRowCell { font-size: ${euiTheme.size.m}; - } - & .euiDataGridRowCell__expandFlex { - align-items: center; + + // Vertically center content + .euiDataGridRowCell__content { + display: flex; + align-items: center; + } } & .euiDataGridRowCell.euiDataGridRowCell--numeric { text-align: left; } + & .euiDataGridHeaderCell--numeric .euiDataGridHeaderCell__content { + flex-grow: 0; + text-align: left; + } & .euiDataGrid__controls { gap: ${euiTheme.size.s}; } @@ -55,7 +59,7 @@ export const useStyles = () => { font-size: ${euiTheme.size.m}; font-weight: ${euiTheme.font.weight.bold}; border-right: ${euiTheme.border.thin}; - margin-right: ${euiTheme.size.s}; + margin-inline: ${euiTheme.size.s}; padding-right: ${euiTheme.size.m}; } & .euiDataGrid__rightControls { diff --git a/x-pack/plugins/cloud_security_posture/public/components/timestamp_table_cell.tsx b/x-pack/plugins/cloud_security_posture/public/components/timestamp_table_cell.tsx index 49932d6cf0de37..9b0d8f720dbfba 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/timestamp_table_cell.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/timestamp_table_cell.tsx @@ -7,11 +7,23 @@ import React from 'react'; import moment, { type MomentInput } from 'moment'; +import { css } from '@emotion/react'; import { EuiToolTip } from '@elastic/eui'; import { CSP_MOMENT_FORMAT } from '../common/constants'; +// Offset top-aligned tooltips so that cell actions are visible +const datagridToolTipOffset = css` + &[data-position='top'] { + margin-block-start: -8px; + } +`; + export const TimestampTableCell = ({ timestamp }: { timestamp: MomentInput }) => ( - + {moment(timestamp).fromNow()} ); diff --git a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/hooks/use_styles.ts b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/hooks/use_styles.ts index 9a353da63e058b..c09490d719f1f8 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/hooks/use_styles.ts +++ b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/hooks/use_styles.ts @@ -45,21 +45,24 @@ export const useStyles = () => { } & .euiDataGridRowCell { font-size: ${euiTheme.size.m}; + + // Vertically center content + .euiDataGridRowCell__content { + display: flex; + align-items: center; + } } - & .euiDataGridRowCell__actions > [data-test-subj='euiDataGridCellExpandButton'] { + /* EUI QUESTION: Why is this being done via CSS instead of setting isExpandable: false in the columns API? */ + & .euiDataGridRowCell__actions > .euiDataGridRowCell__expandCell { display: none; } - & .euiDataGridRowCell__actions--overlay { - padding: 0; - } - - & .euiDataGridRowCell__contentWrapper { - display: flex; - align-items: center; - } & .euiDataGridRowCell.euiDataGridRowCell--numeric { text-align: left; } + & .euiDataGridHeaderCell--numeric .euiDataGridHeaderCell__content { + flex-grow: 0; + text-align: left; + } `; const highlightStyle = css` diff --git a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/vulnerabilities_by_resource/severity_map.tsx b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/vulnerabilities_by_resource/severity_map.tsx index af47c20ddc50f6..78e55132714414 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/vulnerabilities_by_resource/severity_map.tsx +++ b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/vulnerabilities_by_resource/severity_map.tsx @@ -88,6 +88,7 @@ export const SeverityMap = ({ severityMap, total }: Props) => { `} anchorClassName={css` height: ${euiTheme.size.xl}; + flex-grow: 1; display: flex; align-items: center; `} 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 3a85403c5649a2..219c0547093540 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 @@ -130,13 +130,13 @@ exports[`extend index management ilm summary extension should render a phase def > Edit policy in ILM External link (opens in a new tab or window) @@ -301,13 +301,13 @@ exports[`extend index management ilm summary extension should render a step info > Edit policy in ILM External link (opens in a new tab or window) @@ -468,13 +468,13 @@ exports[`extend index management ilm summary extension should render an error pa > Edit policy in ILM External link (opens in a new tab or window) @@ -636,13 +636,13 @@ exports[`extend index management ilm summary extension should render the tab whe > Edit policy in ILM External link (opens in a new tab or window) diff --git a/x-pack/plugins/infra/public/alerting/log_threshold/components/alert_dropdown.tsx b/x-pack/plugins/infra/public/alerting/log_threshold/components/alert_dropdown.tsx index bb2dbc7afdc36b..6e3e72c5cc8de8 100644 --- a/x-pack/plugins/infra/public/alerting/log_threshold/components/alert_dropdown.tsx +++ b/x-pack/plugins/infra/public/alerting/log_threshold/components/alert_dropdown.tsx @@ -85,13 +85,13 @@ export const AlertDropdown = () => { : inlineLogViewTooltipContent : undefined } - toolTipTitle={ - !canCreateAlerts + toolTipProps={{ + title: !canCreateAlerts ? readOnly ? readOnlyUserTooltipTitle : inlineLogViewTooltipTitle - : undefined - } + : undefined, + }} > = ({ }} textProps={{ ...textProps, - className: classNames('kbnToolbarButton__text', textProps?.className), + className: classNames('kbnToolbarButton__text', textProps && textProps.className), }} {...rest} size={size} diff --git a/x-pack/plugins/license_management/__jest__/__snapshots__/request_trial_extension.test.js.snap b/x-pack/plugins/license_management/__jest__/__snapshots__/request_trial_extension.test.js.snap index db99b1a10ea8de..9456222eca7aaa 100644 --- a/x-pack/plugins/license_management/__jest__/__snapshots__/request_trial_extension.test.js.snap +++ b/x-pack/plugins/license_management/__jest__/__snapshots__/request_trial_extension.test.js.snap @@ -38,13 +38,13 @@ exports[`RequestTrialExtension component should display when enterprise license > subscription features External link (opens in a new tab or window) @@ -114,13 +114,13 @@ exports[`RequestTrialExtension component should display when license is active a > subscription features External link (opens in a new tab or window) @@ -190,13 +190,13 @@ exports[`RequestTrialExtension component should display when license is not acti > subscription features External link (opens in a new tab or window) @@ -266,13 +266,13 @@ exports[`RequestTrialExtension component should display when platinum license is > subscription features External link (opens in a new tab or window) diff --git a/x-pack/plugins/license_management/__jest__/__snapshots__/revert_to_basic.test.js.snap b/x-pack/plugins/license_management/__jest__/__snapshots__/revert_to_basic.test.js.snap index af9fc4be3f0d00..f1e5a50a309c8a 100644 --- a/x-pack/plugins/license_management/__jest__/__snapshots__/revert_to_basic.test.js.snap +++ b/x-pack/plugins/license_management/__jest__/__snapshots__/revert_to_basic.test.js.snap @@ -38,13 +38,13 @@ exports[`RevertToBasic component should display when license is about to expire > subscription features External link (opens in a new tab or window) @@ -112,13 +112,13 @@ exports[`RevertToBasic component should display when license is expired 1`] = ` > subscription features External link (opens in a new tab or window) @@ -186,13 +186,13 @@ exports[`RevertToBasic component should display when trial is active 1`] = ` > subscription features External link (opens in a new tab or window) diff --git a/x-pack/plugins/license_management/__jest__/__snapshots__/start_trial.test.js.snap b/x-pack/plugins/license_management/__jest__/__snapshots__/start_trial.test.js.snap index 9d32a3925f8527..64221ba1d1d5c7 100644 --- a/x-pack/plugins/license_management/__jest__/__snapshots__/start_trial.test.js.snap +++ b/x-pack/plugins/license_management/__jest__/__snapshots__/start_trial.test.js.snap @@ -38,13 +38,13 @@ exports[`StartTrial component when trial is allowed display for basic license 1` > subscription features External link (opens in a new tab or window) @@ -112,13 +112,13 @@ exports[`StartTrial component when trial is allowed should display for expired e > subscription features External link (opens in a new tab or window) @@ -186,13 +186,13 @@ exports[`StartTrial component when trial is allowed should display for expired p > subscription features External link (opens in a new tab or window) @@ -260,13 +260,13 @@ exports[`StartTrial component when trial is allowed should display for gold lice > subscription features External link (opens in a new tab or window) diff --git a/x-pack/plugins/monitoring/public/components/no_data/explanations/exporters/__snapshots__/exporters.test.js.snap b/x-pack/plugins/monitoring/public/components/no_data/explanations/exporters/__snapshots__/exporters.test.js.snap index dc54838631c065..b987170ab6e10e 100644 --- a/x-pack/plugins/monitoring/public/components/no_data/explanations/exporters/__snapshots__/exporters.test.js.snap +++ b/x-pack/plugins/monitoring/public/components/no_data/explanations/exporters/__snapshots__/exporters.test.js.snap @@ -87,13 +87,13 @@ Array [ > Elasticsearch Service Console External link (opens in a new tab or window) @@ -107,13 +107,13 @@ Array [ > Logs and metrics External link (opens in a new tab or window) @@ -127,13 +127,13 @@ Array [ > the documentation page. External link (opens in a new tab or window) diff --git a/x-pack/plugins/monitoring/public/components/no_data/reasons/__snapshots__/reason_found.test.js.snap b/x-pack/plugins/monitoring/public/components/no_data/reasons/__snapshots__/reason_found.test.js.snap index f0a62472dde830..029a2ebf190d36 100644 --- a/x-pack/plugins/monitoring/public/components/no_data/reasons/__snapshots__/reason_found.test.js.snap +++ b/x-pack/plugins/monitoring/public/components/no_data/reasons/__snapshots__/reason_found.test.js.snap @@ -154,13 +154,13 @@ Array [ > Elasticsearch Service Console External link (opens in a new tab or window) @@ -174,13 +174,13 @@ Array [ > Logs and metrics External link (opens in a new tab or window) @@ -194,13 +194,13 @@ Array [ > the documentation page. External link (opens in a new tab or window) diff --git a/x-pack/plugins/osquery/cypress/screens/live_query.ts b/x-pack/plugins/osquery/cypress/screens/live_query.ts index 04c56fbce44c7b..f850cbf9538ad0 100644 --- a/x-pack/plugins/osquery/cypress/screens/live_query.ts +++ b/x-pack/plugins/osquery/cypress/screens/live_query.ts @@ -14,6 +14,7 @@ export const SUBMIT_BUTTON = '#submit-button'; export const RESULTS_TABLE = 'osqueryResultsTable'; export const RESULTS_TABLE_BUTTON = 'dataGridFullScreenButton'; +export const RESULTS_TABLE_COLUMNS_BUTTON = 'dataGridColumnSelectorButton'; export const RESULTS_TABLE_CELL_WRRAPER = 'EuiDataGridHeaderCellWrapper'; export const getIdFormField = () => cy.get('input[name="id"]'); diff --git a/x-pack/plugins/osquery/cypress/tasks/saved_queries.ts b/x-pack/plugins/osquery/cypress/tasks/saved_queries.ts index b01effba17e65d..4b0e40e577674a 100644 --- a/x-pack/plugins/osquery/cypress/tasks/saved_queries.ts +++ b/x-pack/plugins/osquery/cypress/tasks/saved_queries.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { RESULTS_TABLE_BUTTON } from '../screens/live_query'; +import { RESULTS_TABLE_BUTTON, RESULTS_TABLE_COLUMNS_BUTTON } from '../screens/live_query'; import { closeToastIfVisible, generateRandomStringName } from './integrations'; import { checkResults, @@ -45,7 +45,7 @@ export const getSavedQueriesComplexTest = () => cy.contains('Exit fullscreen').should('exist'); // hidden columns - cy.contains('columns hidden').should('not.exist'); + cy.getBySel(RESULTS_TABLE_COLUMNS_BUTTON).should('have.text', 'Columns35'); cy.getBySel('dataGridHeaderCell-osquery.cmdline').click(); cy.contains(/Hide column$/).click(); cy.getBySel('dataGridHeaderCell-osquery.cwd').click(); @@ -54,10 +54,10 @@ export const getSavedQueriesComplexTest = () => cy.getBySel('dataGridHeaderCell-osquery.disk_bytes_written.number').click(); cy.contains(/Hide column$/).click(); - cy.contains('columns hidden').should('exist'); + cy.getBySel(RESULTS_TABLE_COLUMNS_BUTTON).should('have.text', 'Columns32/35'); // change pagination cy.getBySel('pagination-button-next').click().wait(500).click(); - cy.contains('columns hidden').should('exist'); + cy.getBySel(RESULTS_TABLE_COLUMNS_BUTTON).should('have.text', 'Columns32/35'); // enter fullscreen cy.getBySel(RESULTS_TABLE_BUTTON).trigger('mouseover'); @@ -69,7 +69,7 @@ export const getSavedQueriesComplexTest = () => cy.getBySel('dataGridHeaderCell-osquery.egid').click(); cy.contains(/Sort A-Z$/).click(); - cy.contains('columns hidden').should('exist'); + cy.getBySel(RESULTS_TABLE_COLUMNS_BUTTON).should('have.text', 'Columns32/35'); cy.getBySel(RESULTS_TABLE_BUTTON).trigger('mouseover'); cy.contains(/Enter fullscreen$/).should('exist'); diff --git a/x-pack/plugins/security/server/__snapshots__/prompt_page.test.tsx.snap b/x-pack/plugins/security/server/__snapshots__/prompt_page.test.tsx.snap index 8eaa66ee35be93..f24357ae373fa6 100644 --- a/x-pack/plugins/security/server/__snapshots__/prompt_page.test.tsx.snap +++ b/x-pack/plugins/security/server/__snapshots__/prompt_page.test.tsx.snap @@ -1,5 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`PromptPage renders as expected with additional scripts 1`] = `"ElasticMockedFonts

Some Title

Some Body
Action#1
Action#2
"`; +exports[`PromptPage renders as expected with additional scripts 1`] = `"ElasticMockedFonts

Some Title

Some Body
Action#1
Action#2
"`; -exports[`PromptPage renders as expected without additional scripts 1`] = `"ElasticMockedFonts

Some Title

Some Body
Action#1
Action#2
"`; +exports[`PromptPage renders as expected without additional scripts 1`] = `"ElasticMockedFonts

Some Title

Some Body
Action#1
Action#2
"`; diff --git a/x-pack/plugins/security/server/authentication/__snapshots__/unauthenticated_page.test.tsx.snap b/x-pack/plugins/security/server/authentication/__snapshots__/unauthenticated_page.test.tsx.snap index d7be0e5f720a58..fb377c8a0b9247 100644 --- a/x-pack/plugins/security/server/authentication/__snapshots__/unauthenticated_page.test.tsx.snap +++ b/x-pack/plugins/security/server/authentication/__snapshots__/unauthenticated_page.test.tsx.snap @@ -1,5 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`UnauthenticatedPage renders as expected 1`] = `"ElasticMockedFonts

We hit an authentication error

Try logging in again, and if the problem persists, contact your system administrator.

"`; +exports[`UnauthenticatedPage renders as expected 1`] = `"ElasticMockedFonts

We hit an authentication error

Try logging in again, and if the problem persists, contact your system administrator.

"`; -exports[`UnauthenticatedPage renders as expected with custom title 1`] = `"My Company NameMockedFonts

We hit an authentication error

Try logging in again, and if the problem persists, contact your system administrator.

"`; +exports[`UnauthenticatedPage renders as expected with custom title 1`] = `"My Company NameMockedFonts

We hit an authentication error

Try logging in again, and if the problem persists, contact your system administrator.

"`; diff --git a/x-pack/plugins/security/server/authorization/__snapshots__/reset_session_page.test.tsx.snap b/x-pack/plugins/security/server/authorization/__snapshots__/reset_session_page.test.tsx.snap index f66f33000de553..0146a55a9970ea 100644 --- a/x-pack/plugins/security/server/authorization/__snapshots__/reset_session_page.test.tsx.snap +++ b/x-pack/plugins/security/server/authorization/__snapshots__/reset_session_page.test.tsx.snap @@ -1,5 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`ResetSessionPage renders as expected 1`] = `"ElasticMockedFonts

You do not have permission to access the requested page

Either go back to the previous page or log in as a different user.

"`; +exports[`ResetSessionPage renders as expected 1`] = `"ElasticMockedFonts

You do not have permission to access the requested page

Either go back to the previous page or log in as a different user.

"`; -exports[`ResetSessionPage renders as expected with custom page title 1`] = `"My Company NameMockedFonts

You do not have permission to access the requested page

Either go back to the previous page or log in as a different user.

"`; +exports[`ResetSessionPage renders as expected with custom page title 1`] = `"My Company NameMockedFonts

You do not have permission to access the requested page

Either go back to the previous page or log in as a different user.

"`; diff --git a/x-pack/plugins/security_solution/public/common/components/formatted_date/index.tsx b/x-pack/plugins/security_solution/public/common/components/formatted_date/index.tsx index bf7fd230fbfc44..25b7bec6401981 100644 --- a/x-pack/plugins/security_solution/public/common/components/formatted_date/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/formatted_date/index.tsx @@ -8,6 +8,7 @@ import moment from 'moment-timezone'; import React from 'react'; import { FormattedRelative } from '@kbn/i18n-react'; +import type { EuiToolTipProps } from '@elastic/eui'; import { useDateFormat, useTimeZone, useUiSetting$ } from '../../lib/kibana'; import { getOrEmptyTagFromValue } from '../empty_value'; @@ -98,16 +99,22 @@ interface FormattedDateProps { fieldName: string; value?: string | number | null; dateFormat?: string; + tooltipProps?: Partial; } export const FormattedDate = React.memo( - ({ value, fieldName, className = '', dateFormat }): JSX.Element => { + ({ value, fieldName, className = '', dateFormat, tooltipProps }): JSX.Element => { if (value == null) { return getOrEmptyTagFromValue(value); } const maybeDate = getMaybeDate(value); return maybeDate.isValid() ? ( - + ) : ( diff --git a/x-pack/plugins/security_solution/public/common/components/localized_date_tooltip/index.tsx b/x-pack/plugins/security_solution/public/common/components/localized_date_tooltip/index.tsx index 34825dfa5ae9d3..8f4ed4d34f5c5e 100644 --- a/x-pack/plugins/security_solution/public/common/components/localized_date_tooltip/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/localized_date_tooltip/index.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { EuiFlexGroup, EuiFlexItem, EuiToolTip } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiToolTip, type EuiToolTipProps } from '@elastic/eui'; import { FormattedRelative } from '@kbn/i18n-react'; import moment from 'moment'; import React from 'react'; @@ -15,10 +15,12 @@ export const LocalizedDateTooltip = React.memo<{ date: Date; fieldName?: string; className?: string; -}>(({ children, date, fieldName, className = '' }) => ( + tooltipProps?: Partial; +}>(({ children, date, fieldName, className = '', tooltipProps }) => ( {fieldName != null ? ( diff --git a/x-pack/plugins/security_solution/public/common/components/top_n/top_n.tsx b/x-pack/plugins/security_solution/public/common/components/top_n/top_n.tsx index a93c3fd386382b..0dbd55b9bae34d 100644 --- a/x-pack/plugins/security_solution/public/common/components/top_n/top_n.tsx +++ b/x-pack/plugins/security_solution/public/common/components/top_n/top_n.tsx @@ -31,7 +31,7 @@ const CloseButton = styled(EuiButtonIcon)` top: 4px; `; -const ViewSelect = styled(EuiSuperSelect)` +const ViewSelect = styled(EuiSuperSelect)` width: 170px; `; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/use_bulk_actions.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/use_bulk_actions.tsx index 41802a4738b8df..d66f1b45feb9a4 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/use_bulk_actions.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/use_bulk_actions.tsx @@ -299,7 +299,7 @@ export const useBulkActions = ({ toolTipContent: missingActionPrivileges ? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES : undefined, - toolTipPosition: 'right', + toolTipProps: { position: 'right' }, icon: undefined, }, { @@ -311,7 +311,7 @@ export const useBulkActions = ({ toolTipContent: missingActionPrivileges ? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES : undefined, - toolTipPosition: 'right', + toolTipProps: { position: 'right' }, icon: undefined, }, { @@ -337,7 +337,7 @@ export const useBulkActions = ({ toolTipContent: !hasActionsPrivileges ? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES : undefined, - toolTipPosition: 'right', + toolTipProps: { position: 'right' }, icon: undefined, }, { @@ -349,7 +349,7 @@ export const useBulkActions = ({ toolTipContent: missingActionPrivileges ? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES : undefined, - toolTipPosition: 'right', + toolTipProps: { position: 'right' }, icon: undefined, }, { @@ -361,7 +361,7 @@ export const useBulkActions = ({ toolTipContent: missingActionPrivileges ? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES : undefined, - toolTipPosition: 'right', + toolTipProps: { position: 'right' }, icon: undefined, }, { @@ -382,7 +382,7 @@ export const useBulkActions = ({ toolTipContent: missingActionPrivileges ? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES : undefined, - toolTipPosition: 'right', + toolTipProps: { position: 'right' }, icon: undefined, }, { @@ -397,7 +397,7 @@ export const useBulkActions = ({ 'data-test-subj': 'deleteRuleBulk', disabled: isDeleteDisabled, onClick: handleDeleteAction, - toolTipPosition: 'right', + toolTipProps: { position: 'right' }, icon: undefined, }, ], @@ -415,7 +415,7 @@ export const useBulkActions = ({ toolTipContent: missingActionPrivileges ? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES : undefined, - toolTipPosition: 'right', + toolTipProps: { position: 'right' }, }, { key: i18n.BULK_ACTION_DELETE_TAGS, @@ -426,7 +426,7 @@ export const useBulkActions = ({ toolTipContent: missingActionPrivileges ? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES : undefined, - toolTipPosition: 'right', + toolTipProps: { position: 'right' }, }, ], }, @@ -443,7 +443,7 @@ export const useBulkActions = ({ toolTipContent: missingActionPrivileges ? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES : undefined, - toolTipPosition: 'right', + toolTipProps: { position: 'right' }, }, { key: i18n.BULK_ACTION_DELETE_INDEX_PATTERNS, @@ -454,7 +454,7 @@ export const useBulkActions = ({ toolTipContent: missingActionPrivileges ? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES : undefined, - toolTipPosition: 'right', + toolTipProps: { position: 'right' }, }, ], }, diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/index.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/index.tsx index 97d86deed7a486..e8ea06867c92a8 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/index.tsx @@ -71,15 +71,18 @@ const EuiDataGridContainer = styled.div` }}; } } - div .euiDataGridRowCell__contentWrapper { + div .euiDataGridRowCell { display: flex; align-items: center; } - div .euiDataGridRowCell__content { + div .euiDataGridRowCell > [data-focus-lock-disabled] { + display: flex; + align-items: center; + flex-grow: 1; width: 100%; } - div .euiDataGridRowCell--lastColumn .euiDataGridRowCell__content { - flex-grow: 0; + div .euiDataGridRowCell__content { + flex-grow: 1; } div .siemEventsTable__trSupplement--summary { display: block; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/list/policy_artifacts_list.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/list/policy_artifacts_list.tsx index 22ddd31391977e..861e407e80824a 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/list/policy_artifacts_list.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/list/policy_artifacts_list.tsx @@ -144,7 +144,7 @@ export const PolicyArtifactsList = React.memo( }, disabled: isGlobal, toolTipContent: isGlobal ? labels.listRemoveActionNotAllowedMessage : undefined, - toolTipPosition: 'top' as const, + toolTipProps: { position: 'top' as const }, 'data-test-subj': 'remove-from-policy-action', }; return { diff --git a/x-pack/plugins/security_solution/public/timelines/components/field_renderers/__snapshots__/field_renderers.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/field_renderers/__snapshots__/field_renderers.test.tsx.snap index 2f11cdf57c3a6e..270ca0c6c54b77 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/field_renderers/__snapshots__/field_renderers.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/timelines/components/field_renderers/__snapshots__/field_renderers.test.tsx.snap @@ -284,13 +284,13 @@ exports[`Field Renderers #whoisRenderer it renders correctly against snapshot 1` > iana.org External link (opens in a new tab or window) diff --git a/x-pack/plugins/security_solution/public/timelines/components/netflow/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/netflow/__snapshots__/index.test.tsx.snap index 919d237027815b..5b4bb5021a66e4 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/netflow/__snapshots__/index.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/timelines/components/netflow/__snapshots__/index.test.tsx.snap @@ -1118,13 +1118,13 @@ tr:hover .c2:focus::before { > 9987 External link (opens in a new tab or window) @@ -1957,13 +1957,13 @@ tr:hover .c2:focus::before { > 80 External link (opens in a new tab or window) @@ -2406,13 +2406,13 @@ tr:hover .c2:focus::before { > tls.fingerprints.ja3.hash-value External link (opens in a new tab or window) @@ -2504,13 +2504,13 @@ tr:hover .c2:focus::before { > tls.client_certificate.fingerprint.sha1-value External link (opens in a new tab or window) @@ -2602,13 +2602,13 @@ tr:hover .c2:focus::before { > tls.server_certificate.fingerprint.sha1-value External link (opens in a new tab or window) diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/index.test.tsx index 91d865960c8134..33d9b66f4d6c6e 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/index.test.tsx @@ -389,8 +389,11 @@ describe('StatefulOpenTimeline', () => { /> ); - wrapper.find('[data-test-subj="euiCollapsedItemActionsButton"]').first().simulate('click'); - wrapper.find('[data-test-subj="delete-timeline"]').first().simulate('click'); + wrapper + .find('button[data-test-subj="euiCollapsedItemActionsButton"]') + .first() + .simulate('click'); + wrapper.find('button[data-test-subj="delete-timeline"]').first().simulate('click'); wrapper.find('button[data-test-subj="confirmModalConfirmButton"]').first().simulate('click'); await waitFor(() => { @@ -666,16 +669,16 @@ describe('StatefulOpenTimeline', () => { /> ); - wrapper.find('[data-test-subj="euiCollapsedItemActionsButton"]').first().simulate('click'); - wrapper.find('[data-test-subj="open-duplicate"]').first().simulate('click'); - await waitFor(() => { - wrapper.update(); - - expect((queryTimelineById as jest.Mock).mock.calls[0][0].timelineId).toEqual( - mockOpenTimelineQueryResults.timeline[0].savedObjectId - ); - expect((queryTimelineById as jest.Mock).mock.calls[0][0].duplicate).toEqual(true); - }); + wrapper + .find('button[data-test-subj="euiCollapsedItemActionsButton"]') + .first() + .simulate('click'); + wrapper.find('button[data-test-subj="open-duplicate"]').first().simulate('click'); + + expect((queryTimelineById as jest.Mock).mock.calls[0][0].timelineId).toEqual( + mockOpenTimelineQueryResults.timeline[0].savedObjectId + ); + expect((queryTimelineById as jest.Mock).mock.calls[0][0].duplicate).toEqual(true); }); describe('Create rule from timeline', () => { diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/side_panel/__snapshots__/index.test.tsx.snap index 8475b548dd7954..463e4a1e2f57a8 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/__snapshots__/index.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/__snapshots__/index.test.tsx.snap @@ -855,13 +855,13 @@ exports[`Details Panel Component DetailsPanel:NetworkDetails: rendering it shoul > iana.org External link (opens in a new tab or window) diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field.tsx index ce785cd7b20cbd..7062fc7afbb78c 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field.tsx @@ -11,6 +11,7 @@ import type { EuiButtonEmpty, EuiButtonIcon } from '@elastic/eui'; import { EuiFlexGroup, EuiFlexItem, EuiToolTip } from '@elastic/eui'; import { isNumber, isEmpty } from 'lodash/fp'; import React from 'react'; +import { css } from '@emotion/css'; import { SENTINEL_ONE_AGENT_ID_FIELD } from '../../../../../common/utils/sentinelone_alert_check'; import { SentinelOneAgentStatus } from '../../../../../detections/components/host_isolation/sentinel_one_agent_status'; @@ -48,6 +49,13 @@ import { UserName } from './user_name'; // simple black-list to prevent dragging and dropping fields such as message name const columnNamesNotDraggable = [MESSAGE_FIELD_NAME]; +// Offset top-aligned tooltips so that cell actions are more visible +const dataGridToolTipOffset = css` + &[data-position='top'] { + margin-block-start: -8px; + } +`; + const FormattedFieldValueComponent: React.FC<{ asPlainText?: boolean; /** `Component` is only used with `EuiDataGrid`; the grid keeps a reference to `Component` for show / hide functionality */ @@ -109,6 +117,14 @@ const FormattedFieldValueComponent: React.FC<{ return <>{value}; } else if (fieldType === DATE_FIELD_TYPE) { const classNames = truncate ? 'eui-textTruncate eui-alignMiddle' : undefined; + const date = ( + + ); return isDraggable ? ( - + {date} ) : ( - + date ); } else if (PORT_NAMES.some((portName) => fieldName === portName)) { return ( @@ -274,6 +290,8 @@ const FormattedFieldValueComponent: React.FC<{ diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/__snapshots__/netflow_row_renderer.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/__snapshots__/netflow_row_renderer.test.tsx.snap index 803a4f84552f29..627b209f0fdbe3 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/__snapshots__/netflow_row_renderer.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/__snapshots__/netflow_row_renderer.test.tsx.snap @@ -1309,13 +1309,13 @@ tr:hover .c4:focus::before { > 9987 External link (opens in a new tab or window) @@ -2309,13 +2309,13 @@ tr:hover .c4:focus::before { > 80 External link (opens in a new tab or window) @@ -2827,13 +2827,13 @@ tr:hover .c4:focus::before { > tls.fingerprints.ja3.hash-value External link (opens in a new tab or window) @@ -2935,13 +2935,13 @@ tr:hover .c4:focus::before { > tls.client_certificate.fingerprint.sha1-value External link (opens in a new tab or window) @@ -3043,13 +3043,13 @@ tr:hover .c4:focus::before { > tls.server_certificate.fingerprint.sha1-value External link (opens in a new tab or window) diff --git a/x-pack/plugins/serverless_search/public/application/components/connectors_callout.tsx b/x-pack/plugins/serverless_search/public/application/components/connectors_callout.tsx index 85d3db211c4797..f321330eda2940 100644 --- a/x-pack/plugins/serverless_search/public/application/components/connectors_callout.tsx +++ b/x-pack/plugins/serverless_search/public/application/components/connectors_callout.tsx @@ -55,19 +55,17 @@ export const ConnectorsCallout = () => {

-

- createConnector()} - isLoading={isLoading} - > - {i18n.translate('xpack.serverlessSearch.selectClient.connectorsCallout.cta', { - defaultMessage: 'Create a connector', - })} - -

+ createConnector()} + isLoading={isLoading} + > + {i18n.translate('xpack.serverlessSearch.selectClient.connectorsCallout.cta', { + defaultMessage: 'Create a connector', + })} +
{showConnectors && @@ -85,14 +83,12 @@ export const ConnectorsCallout = () => { ))} {showConnectors && ( -

- - - -

+ + +
)}
diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 495bf957ea4904..bf8aef96fcb4f7 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -564,9 +564,6 @@ "core.euiCodeBlockAnnotations.ariaLabel": "Cliquez pour afficher une annotation de code pour la ligne {lineNumber}", "core.euiColorPickerSwatch.ariaLabel": "Sélectionner {color} comme couleur", "core.euiColumnActions.sort": "Trier {schemaLabel}", - "core.euiColumnSelector.buttonActivePlural": "{numberOfHiddenFields} colonnes masquées", - "core.euiColumnSelector.buttonActiveSingular": "{numberOfHiddenFields} colonne masquée", - "core.euiColumnSorting.buttonActive": "{numberOfSortedFields, plural, one {Champ #} many {# champs} other {# champs triés}}", "core.euiColumnSortingDraggable.activeSortLabel": "{display} trie cette grille de données", "core.euiColumnSortingDraggable.removeSortLabel": "Retirer {display} du tri de la grille de données", "core.euiColumnSortingDraggable.toggleLegend": "Sélectionner la méthode de tri pour {display}", @@ -819,8 +816,6 @@ "core.euiKeyboardShortcuts.title": "Raccourcis clavier", "core.euiKeyboardShortcuts.upArrowDescription": "Aller une cellule vers le haut", "core.euiKeyboardShortcuts.upArrowTitle": "Flèche vers le haut", - "core.euiLink.external.ariaLabel": "Lien externe", - "core.euiLink.newTarget.screenReaderOnlyText": "(s’ouvre dans un nouvel onglet ou une nouvelle fenêtre)", "core.euiLoadingChart.ariaLabel": "Chargement", "core.euiLoadingStrings.ariaLabel": "Chargement", "core.euiMark.highlightEnd": "mettre la fin en surbrillance", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index f7b993b853889d..d1592822323453 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -564,9 +564,6 @@ "core.euiCodeBlockAnnotations.ariaLabel": "クリックすると、行番号{lineNumber}のコード注釈が表示されます", "core.euiColorPickerSwatch.ariaLabel": "{color}を色として選択します", "core.euiColumnActions.sort": "{schemaLabel}の並べ替え", - "core.euiColumnSelector.buttonActivePlural": "{numberOfHiddenFields}列が非表示です", - "core.euiColumnSelector.buttonActiveSingular": "{numberOfHiddenFields}列が非表示です", - "core.euiColumnSorting.buttonActive": "{numberOfSortedFields, plural, other {#個のフィールド}}が並べ替えられました", "core.euiColumnSortingDraggable.activeSortLabel": "{display}はこのデータグリッドを並べ替えています", "core.euiColumnSortingDraggable.removeSortLabel": "データグリッドの並べ替えから{display}を削除", "core.euiColumnSortingDraggable.toggleLegend": "{display}の並べ替え方法を選択", @@ -833,8 +830,6 @@ "core.euiKeyboardShortcuts.title": "キーボードショートカット", "core.euiKeyboardShortcuts.upArrowDescription": "セルを1つ上に移動", "core.euiKeyboardShortcuts.upArrowTitle": "上向き矢印", - "core.euiLink.external.ariaLabel": "外部リンク", - "core.euiLink.newTarget.screenReaderOnlyText": "(新しいタブまたはウィンドウで開く)", "core.euiLoadingChart.ariaLabel": "読み込み中", "core.euiLoadingStrings.ariaLabel": "読み込み中", "core.euiMark.highlightEnd": "ハイライト終了", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index ea83c57f02b27e..0629f497ff7437 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -564,9 +564,6 @@ "core.euiCodeBlockAnnotations.ariaLabel": "单击以查看行 {lineNumber} 的代码注释", "core.euiColorPickerSwatch.ariaLabel": "将 {color} 选为颜色", "core.euiColumnActions.sort": "排序 {schemaLabel}", - "core.euiColumnSelector.buttonActivePlural": "{numberOfHiddenFields} 列已隐藏", - "core.euiColumnSelector.buttonActiveSingular": "{numberOfHiddenFields} 列已隐藏", - "core.euiColumnSorting.buttonActive": "{numberOfSortedFields, plural, other {# 个字段}}已排序", "core.euiColumnSortingDraggable.activeSortLabel": "{display} 正在排序此数据网格", "core.euiColumnSortingDraggable.removeSortLabel": "从数据网格排序中移除 {display}", "core.euiColumnSortingDraggable.toggleLegend": "为 {display} 选择排序方法", @@ -833,8 +830,6 @@ "core.euiKeyboardShortcuts.title": "快捷键", "core.euiKeyboardShortcuts.upArrowDescription": "上移一个单元格", "core.euiKeyboardShortcuts.upArrowTitle": "向上箭头键", - "core.euiLink.external.ariaLabel": "外部链接", - "core.euiLink.newTarget.screenReaderOnlyText": "(在新选项卡或窗口中打开)", "core.euiLoadingChart.ariaLabel": "正在加载", "core.euiLoadingStrings.ariaLabel": "正在加载", "core.euiMark.highlightEnd": "高亮显示结尾", diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_column_selector.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_column_selector.test.tsx index 60f52930ffe918..ad623631fe85e0 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_column_selector.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_column_selector.test.tsx @@ -108,8 +108,8 @@ describe('useRulesListColumnSelector', () => { { field: 'schedule.interval', name: 'Interval' }, ]); - const { getByText } = render(<>{ColumnSelector}); - expect(getByText('1 column hidden')).toBeInTheDocument(); + const { getByLabelText } = render(<>{ColumnSelector}); + expect(getByLabelText('- Active: 5 out of 6')).toBeInTheDocument(); }); it('Lets hide last lastExecutionDate, Interval and duration columns', () => { @@ -127,7 +127,7 @@ describe('useRulesListColumnSelector', () => { { field: 'notify', name: 'Html Notify' }, ]); - const { getByText } = render(<>{ColumnSelector}); - expect(getByText('3 columns hidden')).toBeInTheDocument(); + const { getByLabelText } = render(<>{ColumnSelector}); + expect(getByLabelText('- Active: 3 out of 6')).toBeInTheDocument(); }); }); diff --git a/x-pack/plugins/uptime/public/legacy_uptime/components/monitor/ping_list/__snapshots__/expanded_row.test.tsx.snap b/x-pack/plugins/uptime/public/legacy_uptime/components/monitor/ping_list/__snapshots__/expanded_row.test.tsx.snap index 60462feb48cabc..b4b7a53c69909b 100644 --- a/x-pack/plugins/uptime/public/legacy_uptime/components/monitor/ping_list/__snapshots__/expanded_row.test.tsx.snap +++ b/x-pack/plugins/uptime/public/legacy_uptime/components/monitor/ping_list/__snapshots__/expanded_row.test.tsx.snap @@ -178,13 +178,13 @@ exports[`PingListExpandedRow renders link to docs if body is not recorded but it > docs External link (opens in a new tab or window) diff --git a/x-pack/plugins/uptime/public/legacy_uptime/components/monitor/status_details/__snapshots__/monitor_status.bar.test.tsx.snap b/x-pack/plugins/uptime/public/legacy_uptime/components/monitor/status_details/__snapshots__/monitor_status.bar.test.tsx.snap index 8a4e0915d4fa3c..cae02bf400e2d9 100644 --- a/x-pack/plugins/uptime/public/legacy_uptime/components/monitor/status_details/__snapshots__/monitor_status.bar.test.tsx.snap +++ b/x-pack/plugins/uptime/public/legacy_uptime/components/monitor/status_details/__snapshots__/monitor_status.bar.test.tsx.snap @@ -65,13 +65,13 @@ Array [ > Set tags External link (opens in a new tab or window) diff --git a/x-pack/test/functional/apps/transform/actions/reauthorizing.ts b/x-pack/test/functional/apps/transform/actions/reauthorizing.ts index f256e902eac970..878a3514103967 100644 --- a/x-pack/test/functional/apps/transform/actions/reauthorizing.ts +++ b/x-pack/test/functional/apps/transform/actions/reauthorizing.ts @@ -211,7 +211,7 @@ export default function ({ getService }: FtrProviderContext) { await transform.table.assertTransformRowActionMissing(transformId, 'Reauthorize'); } else { await transform.testExecution.logTestStep('should show disabled action menu button'); - await transform.table.assertTransformRowActionsButtonEnabled(transformId, false); + await transform.table.assertTransformRowActionsEnabled(transformId, false); } await transform.table.clearSearchString(testDataList.length); }); diff --git a/x-pack/test/functional/apps/transform/creation/index_pattern/creation_index_pattern.ts b/x-pack/test/functional/apps/transform/creation/index_pattern/creation_index_pattern.ts index 9e5c1e4f1b0818..a18252b47bdbee 100644 --- a/x-pack/test/functional/apps/transform/creation/index_pattern/creation_index_pattern.ts +++ b/x-pack/test/functional/apps/transform/creation/index_pattern/creation_index_pattern.ts @@ -271,7 +271,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { legend: '7 categories', colorStats: [ { color: '#000000', percentage: 20 }, - { color: '#54B399', percentage: 75 }, + { color: '#54B399', percentage: 80 }, ], }, { diff --git a/x-pack/test/functional/apps/transform/permissions/full_transform_access.ts b/x-pack/test/functional/apps/transform/permissions/full_transform_access.ts index e5e24657789a19..5cd04c4e335772 100644 --- a/x-pack/test/functional/apps/transform/permissions/full_transform_access.ts +++ b/x-pack/test/functional/apps/transform/permissions/full_transform_access.ts @@ -97,10 +97,7 @@ export default function ({ getService }: FtrProviderContext) { await transform.table.filterWithSearchString(transformConfigWithPivot.id, 1); await transform.testExecution.logTestStep('should show the actions popover'); - await transform.table.assertTransformRowActionsButtonEnabled( - transformConfigWithPivot.id, - true - ); + await transform.table.assertTransformRowActionsEnabled(transformConfigWithPivot.id, true); await transform.table.assertTransformRowActions(transformConfigWithPivot.id, false); await transform.testExecution.logTestStep('should have the edit action enabled'); diff --git a/x-pack/test/functional/apps/transform/permissions/read_transform_access.ts b/x-pack/test/functional/apps/transform/permissions/read_transform_access.ts index 02cfcfdfba0032..216bb287f0e5e5 100644 --- a/x-pack/test/functional/apps/transform/permissions/read_transform_access.ts +++ b/x-pack/test/functional/apps/transform/permissions/read_transform_access.ts @@ -97,10 +97,7 @@ export default function ({ getService }: FtrProviderContext) { await transform.table.filterWithSearchString(transformConfigWithPivot.id, 1); await transform.testExecution.logTestStep('should display a disabled actions popover'); - await transform.table.assertTransformRowActionsButtonEnabled( - transformConfigWithPivot.id, - false - ); + await transform.table.assertTransformRowActionsEnabled(transformConfigWithPivot.id, false); await transform.testExecution.logTestStep('should show content in the expanded table row'); await transform.table.assertTransformExpandedRow(); diff --git a/x-pack/test/functional/page_objects/lens_page.ts b/x-pack/test/functional/page_objects/lens_page.ts index 2d3766c137667d..2af514b4a1fdc4 100644 --- a/x-pack/test/functional/page_objects/lens_page.ts +++ b/x-pack/test/functional/page_objects/lens_page.ts @@ -1187,6 +1187,7 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont async changeTableSortingBy(colIndex = 0, direction: 'none' | 'ascending' | 'descending') { const el = await this.getDatatableHeader(colIndex); + await el.moveMouseTo({ xOffset: 0, yOffset: -20 }); // Prevent the first data row's cell actions from overlapping/intercepting the header click await el.click(); let buttonEl; if (direction !== 'none') { diff --git a/x-pack/test/functional/page_objects/tag_management_page.ts b/x-pack/test/functional/page_objects/tag_management_page.ts index 30c6689d87b8f3..80f64243fe31ba 100644 --- a/x-pack/test/functional/page_objects/tag_management_page.ts +++ b/x-pack/test/functional/page_objects/tag_management_page.ts @@ -428,6 +428,16 @@ export class TagManagementPageObject extends FtrService { await checkbox.click(); } + /** + * Select all checkboxes + */ + async selectAllTagRows() { + const checkbox = await this.testSubjects.find( + 'tagsManagementTable table-is-ready > checkboxSelectAll' + ); + await checkbox.click(); + } + /** * Returns true if the tag bulk action menu is displayed, false otherwise. */ diff --git a/x-pack/test/functional/services/transform/transform_table.ts b/x-pack/test/functional/services/transform/transform_table.ts index 7a5f303ba155b6..48110a7ec4b21d 100644 --- a/x-pack/test/functional/services/transform/transform_table.ts +++ b/x-pack/test/functional/services/transform/transform_table.ts @@ -6,6 +6,7 @@ */ import expect from '@kbn/expect'; +import { asyncForEach } from '@kbn/std'; import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services'; @@ -426,19 +427,23 @@ export function TransformTableProvider({ getPageObject, getService }: FtrProvide }); } - public async assertTransformRowActionsButtonEnabled( - transformId: string, - expectedValue: boolean - ) { - const isEnabled = await testSubjects.isEnabled( - this.rowSelector(transformId, 'euiCollapsedItemActionsButton') - ); - expect(isEnabled).to.eql( - expectedValue, - `Expected transform row actions button to be '${ - expectedValue ? 'enabled' : 'disabled' - }' (got '${isEnabled ? 'enabled' : 'disabled'}')` + public async assertTransformRowActionsEnabled(transformId: string, expectedValue: boolean) { + await this.ensureTransformActionsMenuOpen(transformId); + + // Check whether all menu actions are disabled + let allDisabled = true; + const actions = await find.allByCssSelector('.euiBasicTable__collapsedAction'); + await asyncForEach(actions, async (action) => { + if (await action.isEnabled()) { + allDisabled = false; + } + }); + expect(allDisabled).to.eql( + !expectedValue, + `Expected all transform row actions to '${expectedValue ? 'not' : ''}' be disabled.` ); + + await this.ensureTransformActionsMenuClosed(); } public async assertTransformRowActions(transformId: string, isTransformRunning = false) { diff --git a/x-pack/test/functional_with_es_ssl/apps/cases/group2/upgrade.ts b/x-pack/test/functional_with_es_ssl/apps/cases/group2/upgrade.ts index ebbace48f6aad0..8320ac9707e3a5 100644 --- a/x-pack/test/functional_with_es_ssl/apps/cases/group2/upgrade.ts +++ b/x-pack/test/functional_with_es_ssl/apps/cases/group2/upgrade.ts @@ -340,7 +340,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => { const link = await testSubjects.find('case-table-column-external'); const upToDate = await testSubjects.find('case-table-column-external-upToDate'); - expect(await link.getVisibleText()).equal('ROC-526\n(opens in a new tab or window)'); + expect(await link.getVisibleText()).equal('ROC-526'); expect(await upToDate.getVisibleText()).equal('is up to date'); }); diff --git a/x-pack/test/saved_object_tagging/functional/tests/feature_control.ts b/x-pack/test/saved_object_tagging/functional/tests/feature_control.ts index 90b6e1d360d4e4..f2264231004511 100644 --- a/x-pack/test/saved_object_tagging/functional/tests/feature_control.ts +++ b/x-pack/test/saved_object_tagging/functional/tests/feature_control.ts @@ -43,6 +43,13 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { } }; + const unselectTags = async () => { + if (await tagManagementPage.isSelectionColumnDisplayed()) { + await tagManagementPage.selectAllTagRows(); + await tagManagementPage.selectAllTagRows(); + } + }; + const addFeatureControlSuite = ({ user, description, privileges }: FeatureControlUserSuite) => { const testPrefix = (allowed: boolean) => (allowed ? `can` : `can't`); @@ -69,6 +76,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it(`${testPrefix(privileges.delete)} bulk delete tags`, async () => { await selectSomeTags(); expect(await tagManagementPage.isBulkActionPresent('delete')).to.be(privileges.delete); + await unselectTags(); }); it(`${testPrefix(privileges.create)} create tag`, async () => { diff --git a/yarn.lock b/yarn.lock index 70df97c2fb2195..0457de5cfa53f2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1740,10 +1740,10 @@ resolved "https://registry.yarnpkg.com/@elastic/eslint-plugin-eui/-/eslint-plugin-eui-0.0.2.tgz#56b9ef03984a05cc213772ae3713ea8ef47b0314" integrity sha512-IoxURM5zraoQ7C8f+mJb9HYSENiZGgRVcG4tLQxE61yHNNRDXtGDWTZh8N1KIHcsqN1CEPETjuzBXkJYF/fDiQ== -"@elastic/eui@91.0.0-backport.0": - version "91.0.0-backport.0" - resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-91.0.0-backport.0.tgz#821306a580cc8fcf1a142106e425f3fcd1bebfbf" - integrity sha512-2T+8JiPs1Ejh2T8l7cwqv/IIlNV6I9RbXtJ60L9U4lJGtS/R8zIoikrR/2SEs8bXwyXXg4i/trhfbYbylAvZpw== +"@elastic/eui@91.3.1": + version "91.3.1" + resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-91.3.1.tgz#2289b1683f0409c043150c39f5fb7233aa7beb16" + integrity sha512-zxnhBaAsykmDqjbZ3i++CFTyv2dKZSe3UUZKSgYj5MaMnbE86uzeWGjhp3gh1b+LxJZP2672MbNZ6qxVOh1vcQ== dependencies: "@hello-pangea/dnd" "^16.3.0" "@types/lodash" "^4.14.198"