diff --git a/package.json b/package.json index ff45581d6bfc2..c27dad71b2603 100644 --- a/package.json +++ b/package.json @@ -141,8 +141,8 @@ "@elastic/elasticsearch": "9.3.4", "@elastic/ems-client": "8.6.3", "@elastic/esql": "1.7.0", - "@elastic/eui": "113.3.0", - "@elastic/eui-theme-borealis": "6.2.0", + "@elastic/eui": "114.0.0", + "@elastic/eui-theme-borealis": "7.0.0", "@elastic/filesaver": "1.1.2", "@elastic/kibana-d3-color": "npm:@elastic/kibana-d3-color@2.0.1", "@elastic/monaco-esql": "3.2.2", @@ -1573,7 +1573,7 @@ "@cypress/debugging-proxy": "2.0.1", "@cypress/grep": "5.1.0", "@cypress/webpack-preprocessor": "6.0.2", - "@elastic/eslint-plugin-eui": "2.10.0", + "@elastic/eslint-plugin-eui": "2.11.0", "@elastic/makelogs": "6.1.1", "@emotion/babel-preset-css-prop": "11.11.0", "@emotion/jest": "11.11.0", diff --git a/src/core/packages/i18n/browser-internal/src/__snapshots__/i18n_service.test.tsx.snap b/src/core/packages/i18n/browser-internal/src/__snapshots__/i18n_service.test.tsx.snap index 8065292e03733..84758fc577fea 100644 --- a/src/core/packages/i18n/browser-internal/src/__snapshots__/i18n_service.test.tsx.snap +++ b/src/core/packages/i18n/browser-internal/src/__snapshots__/i18n_service.test.tsx.snap @@ -34,6 +34,7 @@ exports[`#start() returns \`Context\` component 1`] = ` \\"euiCollapsibleNavKibanaSolution.switcherAriaLabel\\": \\"- click to switch to another solution\\", \\"euiCollapsibleNavKibanaSolution.groupLabel\\": \\"Navigate to solution\\", \\"euiColorPicker.alphaLabel\\": \\"Alpha channel (opacity) value\\", + \\"euiColorPicker.ariaLabel\\": \\"Select a color\\", \\"euiColorPicker.colorLabel\\": \\"Color value\\", \\"euiColorPicker.colorErrorMessage\\": \\"Invalid color value\\", \\"euiColorPicker.transparent\\": \\"Transparent\\", diff --git a/src/core/packages/i18n/browser-internal/src/i18n_eui_mapping.tsx b/src/core/packages/i18n/browser-internal/src/i18n_eui_mapping.tsx index 013d3a2aa0542..d4fb0165ad0c4 100644 --- a/src/core/packages/i18n/browser-internal/src/i18n_eui_mapping.tsx +++ b/src/core/packages/i18n/browser-internal/src/i18n_eui_mapping.tsx @@ -213,6 +213,10 @@ export const getEuiContextMapping = (): EuiTokensObject => { defaultMessage: 'Alpha channel (opacity) value', description: 'Label describing color alpha channel', }), + 'euiColorPicker.ariaLabel': i18n.translate('core.euiColorPicker.ariaLabel', { + defaultMessage: 'Select a color', + description: 'ARIA label for the color picker button', + }), 'euiColorPicker.colorLabel': i18n.translate('core.euiColorPicker.colorLabel', { defaultMessage: 'Color value', }), diff --git a/src/platform/packages/private/kbn-ui-shared-deps-npm/version_dependencies.txt b/src/platform/packages/private/kbn-ui-shared-deps-npm/version_dependencies.txt index 77f438554b689..bf05f4b3fe1c8 100644 --- a/src/platform/packages/private/kbn-ui-shared-deps-npm/version_dependencies.txt +++ b/src/platform/packages/private/kbn-ui-shared-deps-npm/version_dependencies.txt @@ -16,9 +16,9 @@ @elastic/apm-rum-core@5.25.1 @elastic/charts@71.3.0 @elastic/esql@1.7.0 -@elastic/eui-theme-borealis@6.2.0 -@elastic/eui-theme-common@8.1.0 -@elastic/eui@113.3.0 +@elastic/eui-theme-borealis@7.0.0 +@elastic/eui-theme-common@9.0.0 +@elastic/eui@114.0.0 @elastic/numeral@2.5.1 @elastic/prismjs-esql@1.1.2 @emotion/babel-plugin@11.13.5 diff --git a/src/platform/plugins/shared/discover/test/scout/ui/fixtures/flyout_stability/constants.ts b/src/platform/plugins/shared/discover/test/scout/ui/fixtures/flyout_stability/constants.ts deleted file mode 100644 index a8952d007f03c..0000000000000 --- a/src/platform/plugins/shared/discover/test/scout/ui/fixtures/flyout_stability/constants.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -export const LOGSTASH = { - DEFAULT_START_TIME: 'Sep 19, 2015 @ 06:31:44.000', - DEFAULT_END_TIME: 'Sep 23, 2015 @ 18:31:44.000', - DATA_VIEW_NAME: 'logstash-*', - KBN_ARCHIVE: - 'src/platform/plugins/shared/discover/test/scout/ui/fixtures/flyout_stability/kbn_archives/logstash_data_view.json', -}; diff --git a/src/platform/plugins/shared/discover/test/scout/ui/fixtures/flyout_stability/index.ts b/src/platform/plugins/shared/discover/test/scout/ui/fixtures/flyout_stability/index.ts deleted file mode 100644 index 48ca368ab9884..0000000000000 --- a/src/platform/plugins/shared/discover/test/scout/ui/fixtures/flyout_stability/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* - * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -export { LOGSTASH } from './constants'; -export { setupFlyoutStability, teardownFlyoutStability } from './setup'; diff --git a/src/platform/plugins/shared/discover/test/scout/ui/fixtures/flyout_stability/kbn_archives/logstash_data_view.json b/src/platform/plugins/shared/discover/test/scout/ui/fixtures/flyout_stability/kbn_archives/logstash_data_view.json deleted file mode 100644 index 5bf476490dc1f..0000000000000 --- a/src/platform/plugins/shared/discover/test/scout/ui/fixtures/flyout_stability/kbn_archives/logstash_data_view.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "attributes": { - "name": "logstash-*", - "timeFieldName": "@timestamp", - "title": "logstash-*" - }, - "coreMigrationVersion": "8.8.0", - "created_at": "2025-01-01T00:00:00.000Z", - "id": "logstash-data-view", - "managed": false, - "references": [], - "type": "index-pattern", - "typeMigrationVersion": "7.11.0", - "updated_at": "2025-01-01T00:00:00.000Z" -} diff --git a/src/platform/plugins/shared/discover/test/scout/ui/fixtures/flyout_stability/setup.ts b/src/platform/plugins/shared/discover/test/scout/ui/fixtures/flyout_stability/setup.ts deleted file mode 100644 index 2b24d296ab8a1..0000000000000 --- a/src/platform/plugins/shared/discover/test/scout/ui/fixtures/flyout_stability/setup.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import type { ScoutParallelWorkerFixtures } from '@kbn/scout'; -import { LOGSTASH } from './constants'; - -export async function setupFlyoutStability(scoutSpace: ScoutParallelWorkerFixtures['scoutSpace']) { - await scoutSpace.savedObjects.load(LOGSTASH.KBN_ARCHIVE); - await scoutSpace.uiSettings.setDefaultIndex(LOGSTASH.DATA_VIEW_NAME); - await scoutSpace.uiSettings.setDefaultTime({ - from: LOGSTASH.DEFAULT_START_TIME, - to: LOGSTASH.DEFAULT_END_TIME, - }); -} - -export async function teardownFlyoutStability( - scoutSpace: ScoutParallelWorkerFixtures['scoutSpace'] -) { - await scoutSpace.uiSettings.unset('defaultIndex', 'timepicker:timeDefaults'); - await scoutSpace.savedObjects.cleanStandardList(); -} diff --git a/src/platform/plugins/shared/discover/test/scout/ui/fixtures/traces_experience/page_objects/apm.ts b/src/platform/plugins/shared/discover/test/scout/ui/fixtures/traces_experience/page_objects/apm.ts index d6d0362abd3d3..7bbb70df5f12e 100644 --- a/src/platform/plugins/shared/discover/test/scout/ui/fixtures/traces_experience/page_objects/apm.ts +++ b/src/platform/plugins/shared/discover/test/scout/ui/fixtures/traces_experience/page_objects/apm.ts @@ -43,7 +43,7 @@ export function createApmPage(page: ScoutPage): ApmPage { ? page.testSubj.locator(tableTestSubj) : page.locator('table'); - await container.getByText(linkText).click(); + await container.getByRole('link', { name: linkText }).click(); }, async clickWaterfallItem(itemName: string) { diff --git a/src/platform/plugins/shared/discover/test/scout/ui/parallel_tests/flyout_stability/flyout_emotion_cache.spec.ts b/src/platform/plugins/shared/discover/test/scout/ui/parallel_tests/flyout_stability/flyout_emotion_cache.spec.ts deleted file mode 100644 index 535a2e691f60a..0000000000000 --- a/src/platform/plugins/shared/discover/test/scout/ui/parallel_tests/flyout_stability/flyout_emotion_cache.spec.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* - * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { tags, spaceTest } from '@kbn/scout'; -import { expect } from '@kbn/scout/ui'; -import { setupFlyoutStability, teardownFlyoutStability } from '../../fixtures/flyout_stability'; - -spaceTest.describe('Flyout system Emotion cache stability', { tag: tags.stateful.classic }, () => { - spaceTest.beforeAll(async ({ scoutSpace }) => { - await setupFlyoutStability(scoutSpace); - }); - - spaceTest.beforeEach(async ({ browserAuth, pageObjects }) => { - await browserAuth.loginAsViewer(); - await pageObjects.discover.goto(); - }); - - spaceTest.afterAll(async ({ scoutSpace }) => { - await teardownFlyoutStability(scoutSpace); - }); - - spaceTest( - 'opening a flyout after a cascade close does not corrupt the Emotion style cache', - async ({ page, pageObjects }) => { - const consoleErrors: string[] = []; - page.on('console', (msg) => { - if (msg.type() === 'error') { - consoleErrors.push(msg.text()); - } - }); - - await spaceTest.step('open a document flyout', async () => { - await pageObjects.discover.waitUntilSearchingHasFinished(); - await pageObjects.discover.openDocumentDetails({ rowIndex: 0 }); - await expect(pageObjects.overlays.docViewerFlyout).toBeVisible(); - }); - - await spaceTest.step('open a second flyout from a different domain', async () => { - await pageObjects.overlays.openNewsfeedFlyout(); - }); - - await spaceTest.step('close the second flyout, triggering a cascade close', async () => { - await pageObjects.overlays.closeNewsfeedFlyout(); - await expect(pageObjects.overlays.docViewerFlyout).toBeHidden(); - }); - - await spaceTest.step('open a new flyout after the cascade close', async () => { - await pageObjects.discover.openDocumentDetails({ rowIndex: 0 }); - await expect(pageObjects.overlays.docViewerFlyout).toBeVisible(); - }); - - await spaceTest.step( - 'verify no insertBefore errors from stale Emotion cache refs', - async () => { - await expect(page.testSubj.locator('discoverDocumentsTable')).toBeVisible(); - - const hasInsertBeforeError = consoleErrors.some((msg) => msg.includes('insertBefore')); - expect(hasInsertBeforeError).toBe(false); - } - ); - } - ); -}); diff --git a/src/platform/plugins/shared/discover/test/scout/ui/parallel_tests/traces_experience/flyout_cascade_close.spec.ts b/src/platform/plugins/shared/discover/test/scout/ui/parallel_tests/traces_experience/flyout_cascade_close.spec.ts new file mode 100644 index 0000000000000..de20c5d036ab2 --- /dev/null +++ b/src/platform/plugins/shared/discover/test/scout/ui/parallel_tests/traces_experience/flyout_cascade_close.spec.ts @@ -0,0 +1,104 @@ +/* + * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side + * Public License v 1"; you may not use this file except in compliance with, at + * your election, the "Elastic License 2.0", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +import { tags } from '@kbn/scout'; +import { expect } from '@kbn/scout/ui'; +import type { PageObjects } from '@kbn/scout'; +import { + spaceTest, + TRACES, + RICH_TRACE, + setupTracesExperience, + teardownTracesExperience, +} from '../../fixtures/traces_experience'; +import type { TracesFlyout } from '../../fixtures/traces_experience/page_objects/flyout'; + +type DiscoverPage = PageObjects['discover']; + +const openDocViewerAndTraceTimeline = async (pageObjects: { + discover: DiscoverPage; + tracesExperience: { + openOverviewTab: (d: DiscoverPage) => Promise; + flyout: TracesFlyout; + }; +}) => { + await pageObjects.discover.writeAndSubmitEsqlQuery( + `${TRACES.ESQL_QUERY} | WHERE transaction.name == "${RICH_TRACE.TRANSACTION_NAME}"` + ); + await pageObjects.tracesExperience.openOverviewTab(pageObjects.discover); + await pageObjects.tracesExperience.flyout.traceSummary.fullScreenButton.click(); + await expect(pageObjects.tracesExperience.flyout.waterfallFlyout.container).toBeVisible(); +}; + +spaceTest.describe( + 'Traces in Discover - Flyout cascade-close Emotion cache stability', + { + tag: [...tags.stateful.all, ...tags.serverless.observability.complete], + }, + () => { + spaceTest.beforeAll(async ({ scoutSpace, config }) => { + await setupTracesExperience(scoutSpace, config); + }); + + spaceTest.beforeEach(async ({ browserAuth, pageObjects, page }) => { + await browserAuth.loginAsViewer(); + await pageObjects.discover.goto(); + // Suppress the tour so it does not overlap the waterfall flyout interactions. + await page.evaluate(() => localStorage.setItem('fullscreenWaterfallTourDismissed', 'true')); + }); + + spaceTest.afterAll(async ({ scoutSpace }) => { + await teardownTracesExperience(scoutSpace); + }); + + spaceTest( + 'closing the Trace Timeline flyout navigates back to the Document Viewer without corrupting the Emotion style cache', + async ({ page, pageObjects }) => { + const { flyout } = pageObjects.tracesExperience; + const docViewerFlyout = page.testSubj.locator('docViewerFlyout'); + + const consoleErrors: string[] = []; + page.on('console', (msg) => { + if (msg.type() === 'error') { + consoleErrors.push(msg.text()); + } + }); + + await spaceTest.step('open the Document Viewer and Trace Timeline flyouts', async () => { + await pageObjects.discover.waitUntilSearchingHasFinished(); + await openDocViewerAndTraceTimeline(pageObjects); + }); + + await spaceTest.step('close the Trace Timeline flyout via the Back button', async () => { + await flyout.waterfallFlyout.backButton.click(); + await expect(flyout.waterfallFlyout.container).toBeHidden(); + // The Document Viewer remains visible — it was not cascade-closed because + // both flyouts share the same EUI flyout-manager historyKey. + await expect(docViewerFlyout).toBeVisible(); + }); + + await spaceTest.step( + 're-open the Trace Timeline flyout after navigating back', + async () => { + await flyout.traceSummary.fullScreenButton.click(); + await expect(flyout.waterfallFlyout.container).toBeVisible(); + } + ); + + await spaceTest.step( + 'verify no insertBefore errors from stale Emotion cache refs', + async () => { + const hasInsertBeforeError = consoleErrors.some((msg) => msg.includes('insertBefore')); + expect(hasInsertBeforeError).toBe(false); + } + ); + } + ); + } +); diff --git a/src/platform/plugins/shared/unified_doc_viewer/public/components/doc_viewer_flyout/doc_viewer_flyout.tsx b/src/platform/plugins/shared/unified_doc_viewer/public/components/doc_viewer_flyout/doc_viewer_flyout.tsx index 3bd0a0d5ff4c0..7d20f63b2ef39 100644 --- a/src/platform/plugins/shared/unified_doc_viewer/public/components/doc_viewer_flyout/doc_viewer_flyout.tsx +++ b/src/platform/plugins/shared/unified_doc_viewer/public/components/doc_viewer_flyout/doc_viewer_flyout.tsx @@ -33,6 +33,7 @@ import useObservable from 'react-use/lib/useObservable'; import type { ChromeStart } from '@kbn/core/public'; import type { DocViewFilterFn, DocViewRenderProps } from '@kbn/unified-doc-viewer/types'; import type { DocViewerProps } from '@kbn/unified-doc-viewer'; +import { FlyoutHistoryKeyContext } from './flyout_history_key_context'; import { UnifiedDocViewer } from '../lazy_doc_viewer'; import { useFlyoutA11y } from './use_flyout_a11y'; @@ -256,87 +257,96 @@ export function UnifiedDocViewerFlyout({ const currentFlyoutTitle = flyoutTitle ?? defaultFlyoutTitle; const { a11yProps, screenReaderDescription } = useFlyoutA11y({ isXlScreen }); + // Shared history key for the EUI flyout manager: this symbol groups the + // Document Viewer flyout and any nested flyouts (e.g. Trace Waterfall) into + // the same back-button navigation history, enabling "Back" to return the user + // from the Trace Waterfall to the Document Viewer. + const historyKey = useMemo(() => Symbol('docViewerFlyout'), []); + return ( - - - {screenReaderDescription} - {renderSubheader && ( - <> - - {activePage !== -1 && ( - - - - )} - - {isEsqlQuery || !flyoutActions ? null : <>{flyoutActions}} - - - - - )} - - {renderCustomHeader && ( + + + + {screenReaderDescription} + {renderSubheader && ( <> - {renderCustomHeader(docViewRenderProps)} - + + {activePage !== -1 && ( + + + + )} + + {isEsqlQuery || !flyoutActions ? null : <>{flyoutActions}} + + + )} - - - {renderCustomFooter && ( - {renderCustomFooter(docViewRenderProps)} - )} - - + + {renderCustomHeader && ( + <> + {renderCustomHeader(docViewRenderProps)} + + + )} + + + {renderCustomFooter && ( + {renderCustomFooter(docViewRenderProps)} + )} + + + ); } diff --git a/src/platform/plugins/shared/unified_doc_viewer/public/components/doc_viewer_flyout/flyout_history_key_context.ts b/src/platform/plugins/shared/unified_doc_viewer/public/components/doc_viewer_flyout/flyout_history_key_context.ts new file mode 100644 index 0000000000000..8cf610b60c15c --- /dev/null +++ b/src/platform/plugins/shared/unified_doc_viewer/public/components/doc_viewer_flyout/flyout_history_key_context.ts @@ -0,0 +1,27 @@ +/* + * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side + * Public License v 1"; you may not use this file except in compliance with, at + * your election, the "Elastic License 2.0", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +import { createContext, useContext } from 'react'; + +/** + * Provides the EUI flyout `historyKey` symbol shared between the Document Viewer + * flyout and any nested flyouts (e.g. Trace Waterfall) that should participate + * in the same back-button navigation history group. + * + * The context is provided by `UnifiedDocViewerFlyout` and consumed by + * `FullScreenWaterfall` so that the two flyouts share a history stack, + * enabling the "Back" button on the Trace Waterfall to return the user to + * the Document Viewer. + */ +export const FlyoutHistoryKeyContext = createContext(undefined); + +export const useFlyoutHistoryKey = () => { + // Don't be strict: if the context wasn't provided, just return undefined. + return useContext(FlyoutHistoryKeyContext); +}; diff --git a/src/platform/plugins/shared/unified_doc_viewer/public/components/observability/traces/components/full_screen_waterfall/index.test.tsx b/src/platform/plugins/shared/unified_doc_viewer/public/components/observability/traces/components/full_screen_waterfall/index.test.tsx index 5d03cd566ed37..abbaf94bf3bc2 100644 --- a/src/platform/plugins/shared/unified_doc_viewer/public/components/observability/traces/components/full_screen_waterfall/index.test.tsx +++ b/src/platform/plugins/shared/unified_doc_viewer/public/components/observability/traces/components/full_screen_waterfall/index.test.tsx @@ -18,6 +18,13 @@ import { import { setUnifiedDocViewerServices } from '../../../../../plugin'; import type { UnifiedDocViewerServices } from '../../../../../types'; import { mockUnifiedDocViewerServices } from '../../../../../__mocks__'; +import { FlyoutHistoryKeyContext } from '../../../../doc_viewer_flyout/flyout_history_key_context'; + +const testHistoryKey = Symbol('testHistoryKey'); +const renderWithHistoryKey = (ui: React.ReactElement) => + render( + {ui} + ); jest.mock('./waterfall_flyout/span_flyout', () => ({ spanFlyoutId: 'spanDetailFlyout', @@ -106,14 +113,14 @@ describe('FullScreenWaterfall', () => { }); it('should not display nested flyouts initially', () => { - render(); + renderWithHistoryKey(); expect(screen.queryByTestId('spanFlyout')).not.toBeInTheDocument(); expect(screen.queryByTestId('logsFlyout')).not.toBeInTheDocument(); }); it('delays rendering the full trace waterfall on standard open to preserve the flyout animation', () => { - render(); + renderWithHistoryKey(); expect(screen.queryByTestId('fullTraceWaterfall')).not.toBeInTheDocument(); @@ -126,7 +133,7 @@ describe('FullScreenWaterfall', () => { describe('when service name is undefined', () => { it('renders the full trace waterfall after the delay', () => { - render(); + renderWithHistoryKey(); act(() => { jest.advanceTimersByTime(FULL_TRACE_WATERFALL_RENDER_DELAY_MS); @@ -138,13 +145,13 @@ describe('FullScreenWaterfall', () => { describe('animation suppression', () => { it('renders the full trace waterfall immediately when restoring previously-open state', () => { - render(); + renderWithHistoryKey(); expect(screen.getByTestId('fullTraceWaterfall')).toBeInTheDocument(); }); it('injects a style scoped to traceWaterfallFlyout when skipOpenAnimation is true', () => { - render(); + renderWithHistoryKey(); const style = document.getElementById('flyout-skip-open-animation'); expect(style).toBeInTheDocument(); @@ -153,13 +160,13 @@ describe('FullScreenWaterfall', () => { }); it('does not inject the animation-suppression style when skipOpenAnimation is false', () => { - render(); + renderWithHistoryKey(); expect(document.getElementById('flyout-skip-open-animation')).not.toBeInTheDocument(); }); it('removes the animation-suppression style after the timeout', () => { - render(); + renderWithHistoryKey(); expect(document.getElementById('flyout-skip-open-animation')).toBeInTheDocument(); @@ -171,7 +178,7 @@ describe('FullScreenWaterfall', () => { }); it('passes the nested flyout test subject to the restored document flyout', () => { - render( + renderWithHistoryKey( { describe('highlight state management', () => { it('passes initial highlightedSpanId to FullTraceWaterfall', () => { - render( + renderWithHistoryKey( { }); it('updates highlightedSpanId when a node is clicked', () => { - render(); + renderWithHistoryKey(); act(() => { capturedWaterfallProps.onNodeClick?.('clicked-span'); @@ -212,7 +219,7 @@ describe('FullScreenWaterfall', () => { }); it('clears highlightedSpanId when the document flyout is closed', () => { - render( + renderWithHistoryKey( { }); it('sets highlightedSpanId to docId when onErrorClick fires with multiple errors', () => { - render(); + renderWithHistoryKey(); act(() => { capturedWaterfallProps.onErrorClick?.({ @@ -251,7 +258,7 @@ describe('FullScreenWaterfall', () => { }); it('clears highlightedSpanId when onErrorClick fires with a single error', () => { - render( + renderWithHistoryKey( { + const historyKey = useFlyoutHistoryKey(); const { analytics, discoverShared } = getUnifiedDocViewerServices(); const FullTraceWaterfall = discoverShared.features.registry.getById( 'observability-full-trace-waterfall' @@ -188,6 +190,7 @@ export const FullScreenWaterfall = ({ renders without crashing 1`] = ` "primary": "#61A2FF", "primaryText": "#61A2FF", "severity": Object { - "assistance": "#B386F9", "danger": "#EE4C48", "neutral": "#B5E5F2", "risk": "#FF995E", @@ -228,8 +227,6 @@ exports[` renders without crashing 1`] = ` "vis": Object { "euiColorVis0": "#16C5C0", "euiColorVis1": "#A6EDEA", - "euiColorVis10": "#B386F9", - "euiColorVis11": "#E2D3FE", "euiColorVis2": "#61A2FF", "euiColorVis3": "#BFDBFF", "euiColorVis4": "#EE72A6", @@ -238,12 +235,9 @@ exports[` renders without crashing 1`] = ` "euiColorVis7": "#FFC9C2", "euiColorVis8": "#EAAE01", "euiColorVis9": "#FCD883", - "euiColorVisAssistance": "#B386F9", "euiColorVisBase0": "#F6F9FC", "euiColorVisBehindText0": "#16C5C0", "euiColorVisBehindText1": "#A6EDEA", - "euiColorVisBehindText10": "#B386F9", - "euiColorVisBehindText11": "#E2D3FE", "euiColorVisBehindText2": "#61A2FF", "euiColorVisBehindText3": "#BFDBFF", "euiColorVisBehindText4": "#EE72A6", @@ -271,8 +265,6 @@ exports[` renders without crashing 1`] = ` "euiColorVisSuccess1": "#AEE8D2", "euiColorVisText0": "#16C5C0", "euiColorVisText1": "#A6EDEA", - "euiColorVisText10": "#B386F9", - "euiColorVisText11": "#E2D3FE", "euiColorVisText2": "#61A2FF", "euiColorVisText3": "#BFDBFF", "euiColorVisText4": "#EE72A6", @@ -393,7 +385,6 @@ exports[` renders without crashing 1`] = ` "primary": "#0B64DD", "primaryText": "#1750BA", "severity": Object { - "assistance": "#B386F9", "danger": "#EE4C48", "neutral": "#B5E5F2", "risk": "#FF995E", @@ -426,8 +417,6 @@ exports[` renders without crashing 1`] = ` "vis": Object { "euiColorVis0": "#16C5C0", "euiColorVis1": "#A6EDEA", - "euiColorVis10": "#B386F9", - "euiColorVis11": "#E2D3FE", "euiColorVis2": "#61A2FF", "euiColorVis3": "#BFDBFF", "euiColorVis4": "#EE72A6", @@ -436,12 +425,9 @@ exports[` renders without crashing 1`] = ` "euiColorVis7": "#FFC9C2", "euiColorVis8": "#EAAE01", "euiColorVis9": "#FCD883", - "euiColorVisAssistance": "#B386F9", "euiColorVisBase0": "#F6F9FC", "euiColorVisBehindText0": "#16C5C0", "euiColorVisBehindText1": "#A6EDEA", - "euiColorVisBehindText10": "#B386F9", - "euiColorVisBehindText11": "#E2D3FE", "euiColorVisBehindText2": "#61A2FF", "euiColorVisBehindText3": "#BFDBFF", "euiColorVisBehindText4": "#EE72A6", @@ -469,8 +455,6 @@ exports[` renders without crashing 1`] = ` "euiColorVisSuccess1": "#AEE8D2", "euiColorVisText0": "#065B58", "euiColorVisText1": "#047471", - "euiColorVisText10": "#52357E", - "euiColorVisText11": "#8144CC", "euiColorVisText2": "#154399", "euiColorVisText3": "#0B64DD", "euiColorVisText4": "#A11262", @@ -2311,8 +2295,6 @@ exports[` renders without crashing 1`] = ` "vis": Object { "euiColorVis0": "#065B58", "euiColorVis1": "#009E99", - "euiColorVis10": "#B386F9", - "euiColorVis11": "#E2D3FE", "euiColorVis2": "#154399", "euiColorVis3": "#2476F0", "euiColorVis4": "#831652", @@ -2321,12 +2303,9 @@ exports[` renders without crashing 1`] = ` "euiColorVis7": "#DA3737", "euiColorVis8": "#6A4906", "euiColorVis9": "#AD7E00", - "euiColorVisAssistance": "#B386F9", "euiColorVisBase0": "#F6F9FC", "euiColorVisBehindText0": "#065B58", "euiColorVisBehindText1": "#009E99", - "euiColorVisBehindText10": "#B386F9", - "euiColorVisBehindText11": "#E2D3FE", "euiColorVisBehindText2": "#154399", "euiColorVisBehindText3": "#2476F0", "euiColorVisBehindText4": "#831652", @@ -2354,8 +2333,6 @@ exports[` renders without crashing 1`] = ` "euiColorVisSuccess1": "#00996B", "euiColorVisText0": "#065B58", "euiColorVisText1": "#047471", - "euiColorVisText10": "#52357E", - "euiColorVisText11": "#8144CC", "euiColorVisText2": "#154399", "euiColorVisText3": "#0B64DD", "euiColorVisText4": "#A11262", diff --git a/yarn.lock b/yarn.lock index 17bd00a5a1e49..6e0cbe6ae0c15 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2377,10 +2377,10 @@ semver "^7.6.3" topojson-client "^3.1.0" -"@elastic/eslint-plugin-eui@2.10.0": - version "2.10.0" - resolved "https://registry.yarnpkg.com/@elastic/eslint-plugin-eui/-/eslint-plugin-eui-2.10.0.tgz#e03738608457dfa1718394e51eb6879a00586d6e" - integrity sha512-kVk1YOZZt3QaSMfQ+pXM+xAQLtAmsDqTW5YL17SsKZUUX6YKsF4s1GS2szwrx2Q/UAyaaxmtOSn4RM/qopUbvw== +"@elastic/eslint-plugin-eui@2.11.0": + version "2.11.0" + resolved "https://registry.yarnpkg.com/@elastic/eslint-plugin-eui/-/eslint-plugin-eui-2.11.0.tgz#27abb0d3a86879f7629f0aef24342bf3359ec3d4" + integrity sha512-P+1njt18ong32ucBiXI3+c0/sKjoX3ffsArcHhmsJW5y9+rvdzZ9rtgWLtRhhtJnpiBI0fyDabEff/ISCU7tZg== "@elastic/esql@1.7.0": version "1.7.0" @@ -2391,29 +2391,29 @@ tree-dump "1.1.0" tslib "2.8.1" -"@elastic/eui-theme-borealis@6.2.0": - version "6.2.0" - resolved "https://registry.yarnpkg.com/@elastic/eui-theme-borealis/-/eui-theme-borealis-6.2.0.tgz#85d0477559be21f06a6e3a09527b30b6c9060d0b" - integrity sha512-SdUMAQt7dGIqVzNsIReRuG8LVdxsLHeqranjglkKgwbDAytuyTY8NmRDUva38HkI3ElVKfRP06aUFTmosaOCMA== +"@elastic/eui-theme-borealis@7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@elastic/eui-theme-borealis/-/eui-theme-borealis-7.0.0.tgz#31ce6eabacb51a29f0dd159ad2b34f7dfbb9acd7" + integrity sha512-UiwpCmMxx7fWosNUi2JMnR+bAQBppHHOI0lIfLBrP7uYqDg+3JFV5Mhg8Wc3kdfaxoVaW1/IUMmLxJ5eTulSnA== dependencies: - "@elastic/eui-theme-common" "8.1.0" + "@elastic/eui-theme-common" "9.0.0" chroma-js "^2.4.2" -"@elastic/eui-theme-common@8.1.0": - version "8.1.0" - resolved "https://registry.yarnpkg.com/@elastic/eui-theme-common/-/eui-theme-common-8.1.0.tgz#85428f7ddb3af96e111baa3b27e38d22663f400f" - integrity sha512-zSmSiCJuXn8eGi5txqP0a+MorJS2YBav9vuzz41ngo9Rwedmm9opvyjOMbz8f5SrXjE6tt6gl25pundY79OMsQ== +"@elastic/eui-theme-common@9.0.0": + version "9.0.0" + resolved "https://registry.yarnpkg.com/@elastic/eui-theme-common/-/eui-theme-common-9.0.0.tgz#df57056b2195c24fb32eff1eaa60c67483da8c68" + integrity sha512-0Vxu6coC2KccsU3HLPhDhqJam0PCwyVZpqS9hJ65mFst/jutVYVx8RBKNGq10R2qr0wgO20aJLA5OzaniJ56/A== dependencies: "@types/lodash" "^4.14.202" chroma-js "^2.4.2" lodash "^4.17.21" -"@elastic/eui@113.3.0": - version "113.3.0" - resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-113.3.0.tgz#8c95f606d0bfa22e52b15d82ecbea2826d137ab9" - integrity sha512-fscElzkTj5Wbl+d+SuBRDrClCVqVbdPLictzh7uG5lXZm3TOficYt/CrXMqO9NwiPcmFzIy7IgMpDCTkKaJ0hg== +"@elastic/eui@114.0.0": + version "114.0.0" + resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-114.0.0.tgz#643f0020d7d00cd8ec8fa2e66f1435f21eca6a09" + integrity sha512-wozSyxPpDTM5oMoldWBds6NdjCa+nf0FilTl0BoL3rgYaEGGvbEg3rWR7ff2P7SKWI40GPbKE6pGCaX66swq7A== dependencies: - "@elastic/eui-theme-common" "8.1.0" + "@elastic/eui-theme-common" "9.0.0" "@elastic/prismjs-esql" "^1.1.2" "@hello-pangea/dnd" "^16.6.0" "@types/lodash" "^4.14.202"