Skip to content
Merged
Show file tree
Hide file tree
Changes from 95 commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
4c2e0d0
Integrate new app menu with discover
kowalczyk-krzysztof Dec 12, 2025
db6529a
Merge branch 'main' into feat/app-menu-discover
kowalczyk-krzysztof Jan 3, 2026
f670bb7
Merge branch 'main' into feat/app-menu-discover
kowalczyk-krzysztof Jan 7, 2026
b00efee
Merge branch 'main' into feat/app-menu-discover
kowalczyk-krzysztof Jan 9, 2026
6d82cba
Merge branch 'main' into feat/app-menu-discover
kowalczyk-krzysztof Jan 13, 2026
fc51501
Initial implementation
kowalczyk-krzysztof Jan 13, 2026
fb45213
Merge branch 'main' into feat/app-menu-discover
kowalczyk-krzysztof Jan 13, 2026
27259bb
Handle single tab mode
kowalczyk-krzysztof Jan 13, 2026
cc3fd5a
Changes from node scripts/lint_ts_projects --fix
kibanamachine Jan 13, 2026
068b9c6
Changes from node scripts/regenerate_moon_projects.js --update
kibanamachine Jan 14, 2026
bddc6a5
Merge branch 'main' into feat/app-menu-discover
kowalczyk-krzysztof Jan 14, 2026
57f7010
Merge branch 'main' into feat/app-menu-discover
kowalczyk-krzysztof Jan 14, 2026
3e0c6f3
Map items
kowalczyk-krzysztof Jan 14, 2026
491b744
Handle share and export
kowalczyk-krzysztof Jan 14, 2026
821810e
Handle open
kowalczyk-krzysztof Jan 14, 2026
556f3bc
Handle alerts
kowalczyk-krzysztof Jan 14, 2026
09dd821
Cleanup
kowalczyk-krzysztof Jan 15, 2026
79651e6
Remove context_awarness examples
kowalczyk-krzysztof Jan 15, 2026
a2116d4
Changes from node scripts/lint_ts_projects --fix
kibanamachine Jan 15, 2026
ead30f3
Changes from node scripts/generate codeowners
kibanamachine Jan 15, 2026
2bb2253
Changes from node scripts/regenerate_moon_projects.js --update
kibanamachine Jan 15, 2026
36b05b0
Fix types
kowalczyk-krzysztof Jan 15, 2026
56dd091
Remove dead i18n
kowalczyk-krzysztof Jan 15, 2026
d76c396
Fix tests
kowalczyk-krzysztof Jan 15, 2026
8274b6b
Even more test fixes
kowalczyk-krzysztof Jan 15, 2026
92160d0
MOREEEE test fixes
kowalczyk-krzysztof Jan 15, 2026
e69c240
Merge branch 'main' into feat/app-menu-discover
kowalczyk-krzysztof Jan 15, 2026
28be8f4
Remove single tab handling
kowalczyk-krzysztof Jan 15, 2026
c2c1287
Merge branch 'main' into feat/app-menu-discover
kowalczyk-krzysztof Jan 15, 2026
8b5ed2e
Test changes
kowalczyk-krzysztof Jan 15, 2026
a779e92
Revert "Remove context_awarness examples"
kowalczyk-krzysztof Jan 15, 2026
d428f3d
Merge branch 'main' into feat/app-menu-discover
kowalczyk-krzysztof Jan 15, 2026
3403cb4
Add collapse and triggerElement to app menu
kowalczyk-krzysztof Jan 15, 2026
a70e699
Context awarness fixes
kowalczyk-krzysztof Jan 16, 2026
54a2355
Fix types
kowalczyk-krzysztof Jan 16, 2026
fb65e03
Add context
kowalczyk-krzysztof Jan 16, 2026
85da556
Revert flyout changes
kowalczyk-krzysztof Jan 16, 2026
c49e5d5
Context awarness fixes
kowalczyk-krzysztof Jan 16, 2026
55c62c8
Fix css
kowalczyk-krzysztof Jan 16, 2026
e4d02b9
Merge branch 'main' into feat/app-menu-discover
kowalczyk-krzysztof Jan 16, 2026
ffc204d
Fix tests
kowalczyk-krzysztof Jan 16, 2026
1c27df2
Test fixes
kowalczyk-krzysztof Jan 16, 2026
76c325a
Merge branch 'main' into feat/app-menu-discover
kowalczyk-krzysztof Jan 16, 2026
1019d3e
Merge branch 'main' into feat/app-menu-discover
kowalczyk-krzysztof Jan 16, 2026
6330c6c
Improve types and fix a11y tests
kowalczyk-krzysztof Jan 16, 2026
0c1051b
Chores
kowalczyk-krzysztof Jan 16, 2026
f4d502a
Test fixes
kowalczyk-krzysztof Jan 16, 2026
876fd2a
Merge branch 'main' into feat/app-menu-discover
kowalczyk-krzysztof Jan 16, 2026
1ff3391
Changes from node scripts/lint_ts_projects --fix
kibanamachine Jan 16, 2026
938d5ae
Changes from node scripts/regenerate_moon_projects.js --update
kibanamachine Jan 16, 2026
e1c4bcf
o11y serverless fixes
kowalczyk-krzysztof Jan 17, 2026
df77f85
Attempt at flaky test
kowalczyk-krzysztof Jan 17, 2026
02d2700
Test fix
kowalczyk-krzysztof Jan 17, 2026
e254e0c
Merge branch 'main' into feat/app-menu-discover
kowalczyk-krzysztof Jan 19, 2026
2d4fb0d
Increase browser size for _new_tab test suite
kowalczyk-krzysztof Jan 20, 2026
363b168
Fix sorting for popover items
kowalczyk-krzysztof Jan 20, 2026
5dfdb48
Make ESQL button secondary button
kowalczyk-krzysztof Jan 20, 2026
3296c71
Fix popover width within overflow button
kowalczyk-krzysztof Jan 20, 2026
5404460
Make process items accept object
kowalczyk-krzysztof Jan 20, 2026
9008415
Fix test
kowalczyk-krzysztof Jan 20, 2026
1792268
Move switch to classic button to tab menu
kowalczyk-krzysztof Jan 20, 2026
351fff9
Fix tests
kowalczyk-krzysztof Jan 20, 2026
658b747
Change button color
kowalczyk-krzysztof Jan 20, 2026
96eaa50
Remove dead translation
kowalczyk-krzysztof Jan 20, 2026
ac2c286
Fix tests
kowalczyk-krzysztof Jan 20, 2026
a06ed9d
Merge branch 'main' into feat/app-menu-discover
kowalczyk-krzysztof Jan 20, 2026
6b61f0b
Merge branch 'main' into feat/app-menu-discover
kowalczyk-krzysztof Jan 20, 2026
9edeb24
Reduce flakiness
kowalczyk-krzysztof Jan 21, 2026
fbb772e
Reduce a11y test flakiness
kowalczyk-krzysztof Jan 21, 2026
42fa70f
Flakiness fix
kowalczyk-krzysztof Jan 21, 2026
c0c4c80
Merge branch 'main' into feat/app-menu-discover
kowalczyk-krzysztof Jan 21, 2026
20d363b
Merge branch 'main' into feat/app-menu-discover
kowalczyk-krzysztof Jan 21, 2026
7347575
Flakiness fix
kowalczyk-krzysztof Jan 21, 2026
99bf416
Merge branch 'main' into feat/app-menu-discover
kowalczyk-krzysztof Jan 21, 2026
f5e4766
CR changes
kowalczyk-krzysztof Jan 22, 2026
f67b9a8
Merge branch 'main' into feat/app-menu-discover
kowalczyk-krzysztof Jan 22, 2026
2211152
CR changes
kowalczyk-krzysztof Jan 22, 2026
17e8000
Revert type change
kowalczyk-krzysztof Jan 22, 2026
84a2202
Rework onNewSearch
kowalczyk-krzysztof Jan 22, 2026
ba9dc22
Merge branch 'main' into feat/app-menu-discover
kowalczyk-krzysztof Jan 22, 2026
84316ec
Handle single tab view
kowalczyk-krzysztof Jan 22, 2026
df28c21
Improve types
kowalczyk-krzysztof Jan 22, 2026
0849402
Fix type casting
kowalczyk-krzysztof Jan 22, 2026
81351c9
Improve getting export items
kowalczyk-krzysztof Jan 22, 2026
7a7f3d4
Change selectDataViewMode to use active tab
kowalczyk-krzysztof Jan 22, 2026
89f3f01
Modify discover_topnav.test to use capabilities
kowalczyk-krzysztof Jan 22, 2026
737bd61
Add splitbutton tests
kowalczyk-krzysztof Jan 22, 2026
4dbce7d
Changes from node scripts/eslint_all_files --no-cache --fix
kibanamachine Jan 22, 2026
996033e
Fix new button
kowalczyk-krzysztof Jan 22, 2026
cd4b62c
Fix embedded conflick resolution gone wrong
kowalczyk-krzysztof Jan 22, 2026
4b963df
Add missing icon
kowalczyk-krzysztof Jan 22, 2026
8679fd2
Fix onClick behavior in app menu
kowalczyk-krzysztof Jan 22, 2026
de2d49e
Merge branch 'main' into feat/app-menu-discover
kowalczyk-krzysztof Jan 22, 2026
43c56c4
Test fixes
kowalczyk-krzysztof Jan 22, 2026
07cd156
Merge branch 'main' into feat/app-menu-discover
kowalczyk-krzysztof Jan 22, 2026
dadbe1a
Make sure the app menu renders when it should
davismcphee Jan 22, 2026
bb75ed8
Only show switch to classic for the current tab
davismcphee Jan 22, 2026
1dc3842
Put the embedded editor cancel button into the split button menu
davismcphee Jan 23, 2026
599e81f
Continue passing topNavBadges through DiscoverTopNavMenu to prevent U…
davismcphee Jan 23, 2026
be3f984
Merge pull request #15 from davismcphee/davis-app-menu-touchups
kowalczyk-krzysztof Jan 23, 2026
0e1f756
Fix example customization tests
kowalczyk-krzysztof Jan 23, 2026
5b6c922
Merge branch 'main' into feat/app-menu-discover
kowalczyk-krzysztof Jan 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,6 @@ src/platform/packages/private/kbn-tinymath @elastic/kibana-visualizations
src/platform/packages/private/kbn-transpose-utils @elastic/kibana-visualizations
src/platform/packages/private/kbn-ui-shared-deps-npm @elastic/kibana-operations
src/platform/packages/private/kbn-ui-shared-deps-src @elastic/kibana-operations
src/platform/packages/private/kbn-unsaved-changes-badge @elastic/kibana-data-discovery
src/platform/packages/private/kbn-validate-oas @elastic/kibana-core
src/platform/packages/private/opentelemetry/kbn-metrics @elastic/kibana-core @elastic/stack-monitoring
src/platform/packages/private/opentelemetry/kbn-metrics-config @elastic/kibana-core
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,6 @@
"@kbn/unified-search-plugin": "link:src/platform/plugins/shared/unified_search",
"@kbn/unified-tabs": "link:src/platform/packages/shared/kbn-unified-tabs",
"@kbn/unified-tabs-examples-plugin": "link:examples/unified_tabs_examples",
"@kbn/unsaved-changes-badge": "link:src/platform/packages/private/kbn-unsaved-changes-badge",
"@kbn/unsaved-changes-prompt": "link:src/platform/packages/shared/kbn-unsaved-changes-prompt",
"@kbn/upgrade-assistant-pkg-common": "link:x-pack/platform/packages/private/upgrade-assistant/common",
"@kbn/upgrade-assistant-pkg-public": "link:x-pack/platform/packages/private/upgrade-assistant/public",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ project:
dependsOn:
- '@kbn/split-button'
- '@kbn/i18n'
- '@kbn/router-utils'
tags:
- shared-browser
- package
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { upperFirst } from 'lodash';
import type { EuiButtonColor, PopoverAnchorPosition } from '@elastic/eui';
import { EuiButton, EuiHideFor, EuiToolTip, useEuiTheme } from '@elastic/eui';
import { css } from '@emotion/react';
import { getRouterLinkProps } from '@kbn/router-utils';
import {
APP_MENU_NOTIFICATION_INDICATOR_LEFT,
APP_MENU_NOTIFICATION_INDICATOR_TOP,
Expand Down Expand Up @@ -100,8 +101,11 @@ export const AppMenuActionButton = (props: AppMenuActionButtonProps) => {
splitButtonRun?.({ triggerElement: event.currentTarget });
};

const routerLinkProps =
href && run ? getRouterLinkProps({ href, onClick: handleClick }) : { onClick: handleClick };

const commonProps = {
onClick: href ? undefined : handleClick,
...routerLinkProps,
id: htmlId,
'data-test-subj': testId || `app-menu-action-button-${id}`,
iconType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import React, { type MouseEvent } from 'react';
import { EuiHeaderLink, EuiHideFor, EuiToolTip, useEuiTheme } from '@elastic/eui';
import { upperFirst } from 'lodash';
import { css } from '@emotion/react';
import { getRouterLinkProps } from '@kbn/router-utils';
import { getIsSelectedColor, getTooltip, isDisabled } from '../utils';
import { AppMenuPopover } from './app_menu_popover';
import type { AppMenuItemType } from '../types';
Expand Down Expand Up @@ -60,6 +61,9 @@ export const AppMenuItem = ({
run?.({ triggerElement: event.currentTarget });
};

const routerLinkProps =
href && run ? getRouterLinkProps({ href, onClick: handleClick }) : { onClick: handleClick };

const buttonCss = css`
background-color: ${isPopoverOpen
? getIsSelectedColor({
Expand All @@ -73,7 +77,6 @@ export const AppMenuItem = ({
const buttonComponent = (
<EuiHideFor sizes={hidden ?? 'none'}>
<EuiHeaderLink
onClick={href ? undefined : handleClick}
id={htmlId}
data-test-subj={testId || `app-menu-item-${id}`}
iconType={iconType}
Expand All @@ -88,6 +91,7 @@ export const AppMenuItem = ({
aria-haspopup={hasItems ? 'menu' : undefined}
isSelected={hasItems ? isPopoverOpen : undefined}
css={buttonCss}
{...routerLinkProps}
>
{itemText}
</EuiHeaderLink>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,17 +122,17 @@ interface AppMenuItemBase {

type AppMenuLinkItem = AppMenuItemBase & {
/**
* The HTML href attribute for the item. Only used if `run` and `items` are not provided.
* The HTML href attribute for the item. Only used if `items` is not provided.
*/
href: string;
/**
* The HTML target attribute for the item. Only used if `run` and `items` are not provided.
* The HTML target attribute for the item. Only used if `items` is not provided.
*/
target: string;
/**
* Function to run when the item is clicked. Only used if `items` and `href` is not provided.
* Function to run when the item is clicked. Only used if `items` is not provided.
Comment on lines +125 to +133

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This typing is confusing, you specify href, target as required, but then you say it's only used when items is not provided, but items is typed as never, I see the same thing also happen with AppMenuItemWithPopover, lets aggregate this into a discriminating union type on either on AppMenuItemBase or a simpler one that only focuses on run, target, and href for use in AppMenuLinkItem and AppMenuButtonItem since AppMenuItemWithPopover doesn't need these properties.

*/
run?: never;
run?: AppMenuRunAction;
/**
* Sub-items to show in a popover when the item is clicked. Only used if `run` and `href` is not provided.
*/
Expand All @@ -151,15 +151,15 @@ type AppMenuLinkItem = AppMenuItemBase & {

type AppMenuButtonItem = AppMenuItemBase & {
/**
* The HTML href attribute for the item. Only used if `run` and `items` are not provided.
* The HTML href attribute for the item. Only used if `items` is not provided.
*/
href?: never;
href?: string;
/**
* The HTML target attribute for the item. Only used if `run` and `items` are not provided.
* The HTML target attribute for the item. Only used if `items` is not provided.
*/
target?: never;
target?: string;
/**
* Function to run when the item is clicked. Only used if `items` and `href` is not provided.
* Function to run when the item is clicked. Only used if `items` is not provided.
*/
run: AppMenuRunAction;
/**
Expand All @@ -180,15 +180,15 @@ type AppMenuButtonItem = AppMenuItemBase & {

type AppMenuItemWithPopover = AppMenuItemBase & {
/**
* The HTML href attribute for the item. Only used if `run` and `items` are not provided.
* The HTML href attribute for the item. Only used if `items` is not provided.
*/
href?: never;
/**
* The HTML target attribute for the item. Only used if `run` and `items` are not provided.
* The HTML target attribute for the item. Only used if `items` is not provided.
*/
target?: never;
/**
* Function to run when the item is clicked. Only used if `items` and `href` is not provided.
* Function to run when the item is clicked. Only used if `items` is not provided.
*/
run?: never;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,14 +217,6 @@ describe('utils', () => {
expect(result.onClick).toBeDefined();
});

it('should not set onClick when href is provided', () => {
const item = { ...baseItem, href: 'http://example.com' };
const result = mapAppMenuItemToPanelItem(item);

expect(result.onClick).toBeUndefined();
expect(result.href).toBe('http://example.com');
});

it('should not set onClick when childPanelId is provided', () => {
const result = mapAppMenuItemToPanelItem(baseItem, 1);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
type EuiContextMenuPanelDescriptor,
type EuiContextMenuPanelItemDescriptor,
} from '@elastic/eui';
import { getRouterLinkProps } from '@kbn/router-utils';
import { AppMenuPopoverActionButtons } from './components/app_menu_popover_action_buttons';
import type {
AppMenuConfig,
Expand Down Expand Up @@ -132,11 +133,17 @@ export const mapAppMenuItemToPanelItem = (
}
};

const hasClickHandler = childPanelId === undefined;
const routerLinkProps =
item?.href && item?.run && hasClickHandler
? getRouterLinkProps({ href: item.href, onClick: handleClick })
: { onClick: hasClickHandler ? handleClick : undefined };

return {
key: item.id,
name: upperFirst(item.label),
icon: item?.iconType,
onClick: item?.href || childPanelId !== undefined ? undefined : handleClick,
...routerLinkProps,
href: item?.href,
target: item?.href ? item?.target : undefined,
disabled: isDisabled(item?.disableButton),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@
"kbn_references": [
"@kbn/split-button",
"@kbn/i18n",
"@kbn/router-utils"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@

import { i18n } from '@kbn/i18n';
import type { EuiToolTipProps } from '@elastic/eui';
import type { TopNavMenuBadgeProps } from '@kbn/navigation-plugin/public';
import type { ChromeBreadcrumbsBadge } from '@kbn/core-chrome-browser';

export const getManagedContentBadge: (
tooltipText: string,
disableTooltipProps?: boolean
) => TopNavMenuBadgeProps = (tooltipText, enableTooltipProps = true) => ({
) => ChromeBreadcrumbsBadge = (tooltipText, enableTooltipProps = true) => ({
'data-test-subj': 'managedContentBadge',
badgeText: i18n.translate('managedContentBadge.text', {
defaultMessage: 'Managed',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ project:
sourceRoot: src/platform/packages/private/kbn-managed-content-badge
dependsOn:
- '@kbn/i18n'
- '@kbn/navigation-plugin'
- '@kbn/core-chrome-browser'
tags:
- shared-browser
- package
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
],
"kbn_references": [
"@kbn/i18n",
"@kbn/navigation-plugin",
"@kbn/core-chrome-browser",
]
}

This file was deleted.

18 changes: 0 additions & 18 deletions src/platform/packages/private/kbn-unsaved-changes-badge/index.ts

This file was deleted.

This file was deleted.

This file was deleted.

48 changes: 0 additions & 48 deletions src/platform/packages/private/kbn-unsaved-changes-badge/moon.yml

This file was deleted.

This file was deleted.

Loading
Loading