Skip to content

Commit

Permalink
Merge branch '8.x' into update-bundled-packages-20250108110104
Browse files Browse the repository at this point in the history
  • Loading branch information
juliaElastic authored Jan 9, 2025
2 parents 462014c + 61e783a commit fae5978
Show file tree
Hide file tree
Showing 206 changed files with 3,329 additions and 2,065 deletions.
2 changes: 0 additions & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,6 @@ packages/kbn-find-used-node-modules @elastic/kibana-operations
x-pack/platform/plugins/shared/fleet @elastic/fleet
packages/kbn-flot-charts @elastic/kibana-operations
x-pack/test/ui_capabilities/common/plugins/foo_plugin @elastic/kibana-security
packages/kbn-formatters @elastic/obs-ux-logs-team
src/platform/plugins/private/ftr_apis @elastic/kibana-core
packages/kbn-ftr-common-functional-services @elastic/kibana-operations @elastic/appex-qa
packages/kbn-ftr-common-functional-ui-services @elastic/appex-qa
Expand Down Expand Up @@ -748,7 +747,6 @@ src/platform/packages/private/kbn-reporting/server @elastic/appex-sharedux
src/platform/packages/shared/kbn-resizable-layout @elastic/kibana-data-discovery
examples/resizable_layout_examples @elastic/kibana-data-discovery
x-pack/test/plugin_functional/plugins/resolver_test @elastic/security-solution
packages/response-ops/feature_flag_service @elastic/response-ops
packages/response-ops/rule_form @elastic/response-ops
src/platform/packages/shared/response-ops/rule_params @elastic/response-ops
examples/response_stream @elastic/ml-ui
Expand Down
10 changes: 5 additions & 5 deletions api_docs/kbn_avc_banner.devdocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"functions": [
{
"parentPluginId": "@kbn/avc-banner",
"id": "def-public.AVCResultsBanner2024",
"id": "def-public.AVCResultsBanner",
"type": "Function",
"tags": [],
"label": "AVCResultsBanner2024",
"label": "AVCResultsBanner",
"description": [],
"signature": [
"({ onDismiss }: React.PropsWithChildren<{ onDismiss: () => void; }>) => JSX.Element"
Expand All @@ -19,8 +19,8 @@
"children": [
{
"parentPluginId": "@kbn/avc-banner",
"id": "def-public.AVCResultsBanner2024.$1",
"type": "CompoundType",
"id": "def-public.AVCResultsBanner.$1",
"type": "Object",
"tags": [],
"label": "{ onDismiss }",
"description": [],
Expand Down Expand Up @@ -75,4 +75,4 @@
"misc": [],
"objects": []
}
}
}
2 changes: 1 addition & 1 deletion docs/spaces/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The `kibana_admin` role or equivalent is required to manage **Spaces**.
=== Create a space

[[spaces-control-feature-visibility]]
You can have up to 100 spaces.
You can have up to 1,000 spaces by default. The maximum number of spaces can be configured by the `xpack.spaces.maxSpaces` setting (refer to <<spaces-settings-kb, Spaces settings in {kib}>>).

. Select *Create space* and provide a name, description, and URL identifier.
+
Expand Down
2 changes: 2 additions & 0 deletions examples/grid_example/kibana.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"type": "plugin",
"id": "@kbn/grid-example-plugin",
"owner": "@elastic/kibana-presentation",
"group": "platform",
"visibility": "private",
"description": "Temporary example app used to build out the new Dashboard layout system",
"plugin": {
"id": "gridExample",
Expand Down
12 changes: 4 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -539,11 +539,9 @@
"@kbn/fleet-plugin": "link:x-pack/platform/plugins/shared/fleet",
"@kbn/flot-charts": "link:packages/kbn-flot-charts",
"@kbn/foo-plugin": "link:x-pack/test/ui_capabilities/common/plugins/foo_plugin",
"@kbn/formatters": "link:packages/kbn-formatters",
"@kbn/ftr-apis-plugin": "link:src/platform/plugins/private/ftr_apis",
"@kbn/functional-with-es-ssl-cases-test-plugin": "link:x-pack/test/functional_with_es_ssl/plugins/cases",
"@kbn/gen-ai-streaming-response-example-plugin": "link:x-pack/examples/gen_ai_streaming_response_example",
"@kbn/generate-console-definitions": "link:packages/kbn-generate-console-definitions",
"@kbn/generate-csv": "link:src/platform/packages/private/kbn-generate-csv",
"@kbn/global-search-bar-plugin": "link:x-pack/platform/plugins/private/global_search_bar",
"@kbn/global-search-plugin": "link:x-pack/platform/plugins/shared/global_search",
Expand Down Expand Up @@ -718,7 +716,6 @@
"@kbn/paertial-results-example-plugin": "link:examples/partial_results_example",
"@kbn/painless-lab-plugin": "link:x-pack/platform/plugins/private/painless_lab",
"@kbn/panel-loader": "link:src/platform/packages/private/kbn-panel-loader",
"@kbn/plugin-check": "link:packages/kbn-plugin-check",
"@kbn/portable-dashboards-example": "link:examples/portable_dashboards_example",
"@kbn/preboot-example-plugin": "link:examples/preboot_example",
"@kbn/presentation-containers": "link:src/platform/packages/shared/presentation/presentation_containers",
Expand Down Expand Up @@ -760,7 +757,6 @@
"@kbn/resizable-layout": "link:src/platform/packages/shared/kbn-resizable-layout",
"@kbn/resizable-layout-examples-plugin": "link:examples/resizable_layout_examples",
"@kbn/resolver-test-plugin": "link:x-pack/test/plugin_functional/plugins/resolver_test",
"@kbn/response-ops-feature-flag-service": "link:packages/response-ops/feature_flag_service",
"@kbn/response-ops-rule-form": "link:packages/response-ops/rule_form",
"@kbn/response-ops-rule-params": "link:src/platform/packages/shared/response-ops/rule_params",
"@kbn/response-stream-plugin": "link:examples/response_stream",
Expand Down Expand Up @@ -873,7 +869,6 @@
"@kbn/serverless-types": "link:packages/serverless/types",
"@kbn/session-notifications-plugin": "link:test/plugin_functional/plugins/session_notifications",
"@kbn/session-view-plugin": "link:x-pack/solutions/security/plugins/session_view",
"@kbn/set-map": "link:packages/kbn-set-map",
"@kbn/share-examples-plugin": "link:examples/share_examples",
"@kbn/share-plugin": "link:src/platform/plugins/shared/share",
"@kbn/shared-svg": "link:src/platform/packages/shared/kbn-shared-svg",
Expand Down Expand Up @@ -947,7 +942,6 @@
"@kbn/streams-plugin": "link:x-pack/solutions/observability/plugins/streams",
"@kbn/streams-schema": "link:x-pack/packages/kbn-streams-schema",
"@kbn/synthetics-plugin": "link:x-pack/solutions/observability/plugins/synthetics",
"@kbn/synthetics-private-location": "link:x-pack/packages/kbn-synthetics-private-location",
"@kbn/task-manager-fixture-plugin": "link:x-pack/test/alerting_api_integration/common/plugins/task_manager_fixture",
"@kbn/task-manager-performance-plugin": "link:x-pack/test/plugin_api_perf/plugins/task_manager_performance",
"@kbn/task-manager-plugin": "link:x-pack/platform/plugins/shared/task_manager",
Expand Down Expand Up @@ -1253,7 +1247,6 @@
"react-router-dom": "^5.3.4",
"react-router-dom-v5-compat": "^6.12.0",
"react-shortcuts": "^2.1.0",
"react-syntax-highlighter": "^15.3.1",
"react-use": "^15.3.8",
"react-virtualized": "^9.22.5",
"react-window": "^1.8.10",
Expand Down Expand Up @@ -1464,6 +1457,7 @@
"@kbn/ftr-screenshot-filename": "link:packages/kbn-ftr-screenshot-filename",
"@kbn/gen-ai-functional-testing": "link:packages/kbn-gen-ai-functional-testing",
"@kbn/generate": "link:packages/kbn-generate",
"@kbn/generate-console-definitions": "link:packages/kbn-generate-console-definitions",
"@kbn/get-repo-files": "link:packages/kbn-get-repo-files",
"@kbn/import-locator": "link:packages/kbn-import-locator",
"@kbn/import-resolver": "link:packages/kbn-import-resolver",
Expand All @@ -1489,6 +1483,7 @@
"@kbn/peggy-loader": "link:packages/kbn-peggy-loader",
"@kbn/performance-testing-dataset-extractor": "link:packages/kbn-performance-testing-dataset-extractor",
"@kbn/picomatcher": "link:packages/kbn-picomatcher",
"@kbn/plugin-check": "link:packages/kbn-plugin-check",
"@kbn/plugin-generator": "link:packages/kbn-plugin-generator",
"@kbn/plugin-helpers": "link:packages/kbn-plugin-helpers",
"@kbn/product-doc-artifact-builder": "link:x-pack/packages/ai-infra/product-doc-artifact-builder",
Expand All @@ -1503,12 +1498,14 @@
"@kbn/scout-reporting": "link:packages/kbn-scout-reporting",
"@kbn/security-api-integration-helpers": "link:x-pack/test/security_api_integration/packages/helpers",
"@kbn/serverless-storybook-config": "link:packages/serverless/storybook/config",
"@kbn/set-map": "link:packages/kbn-set-map",
"@kbn/some-dev-log": "link:packages/kbn-some-dev-log",
"@kbn/sort-package-json": "link:packages/kbn-sort-package-json",
"@kbn/spec-to-console": "link:packages/kbn-spec-to-console",
"@kbn/stdio-dev-helpers": "link:packages/kbn-stdio-dev-helpers",
"@kbn/storybook": "link:packages/kbn-storybook",
"@kbn/synthetics-e2e": "link:x-pack/solutions/observability/plugins/synthetics/e2e",
"@kbn/synthetics-private-location": "link:x-pack/packages/kbn-synthetics-private-location",
"@kbn/telemetry-tools": "link:packages/kbn-telemetry-tools",
"@kbn/test": "link:packages/kbn-test",
"@kbn/test-eui-helpers": "link:packages/kbn-test-eui-helpers",
Expand Down Expand Up @@ -1652,7 +1649,6 @@
"@types/react-router": "^5.1.20",
"@types/react-router-config": "^5.0.7",
"@types/react-router-dom": "^5.3.3",
"@types/react-syntax-highlighter": "^15.4.0",
"@types/react-test-renderer": "^17.0.2",
"@types/react-virtualized": "^9.21.30",
"@types/react-window": "^1.8.8",
Expand Down
4 changes: 3 additions & 1 deletion packages/kbn-calculate-auto/kibana.jsonc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"type": "shared-common",
"id": "@kbn/calculate-auto",
"owner": "@elastic/obs-ux-management-team"
"owner": "@elastic/obs-ux-management-team",
"group": "platform",
"visibility": "shared"
}
3 changes: 0 additions & 3 deletions packages/kbn-formatters/REASDME.md

This file was deleted.

10 changes: 0 additions & 10 deletions packages/kbn-formatters/index.ts

This file was deleted.

5 changes: 0 additions & 5 deletions packages/kbn-formatters/kibana.jsonc

This file was deleted.

6 changes: 0 additions & 6 deletions packages/kbn-formatters/package.json

This file was deleted.

37 changes: 0 additions & 37 deletions packages/kbn-formatters/src/bytes_formatter/index.test.ts

This file was deleted.

20 changes: 0 additions & 20 deletions packages/kbn-formatters/src/bytes_formatter/index.ts

This file was deleted.

17 changes: 0 additions & 17 deletions packages/kbn-formatters/tsconfig.json

This file was deleted.

3 changes: 2 additions & 1 deletion packages/kbn-generate-console-definitions/kibana.jsonc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"type": "shared-common",
"id": "@kbn/generate-console-definitions",
"owner": "@elastic/kibana-management"
"owner": "@elastic/kibana-management",
"devOnly": true
}
62 changes: 52 additions & 10 deletions packages/kbn-grid-layout/grid/grid_layout.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ import { GridLayout, GridLayoutProps } from './grid_layout';
import { gridSettings, mockRenderPanelContents } from './test_utils/mocks';
import { cloneDeep } from 'lodash';

class TouchEventFake extends Event {
constructor(public touches: Array<{ clientX: number; clientY: number }>) {
super('touchmove');
this.touches = [{ clientX: 256, clientY: 128 }];
}
}

describe('GridLayout', () => {
const renderGridLayout = (propsOverrides: Partial<GridLayoutProps> = {}) => {
const defaultProps: GridLayoutProps = {
Expand All @@ -38,17 +45,30 @@ describe('GridLayout', () => {
.getAllByRole('button', { name: /panelId:panel/i })
.map((el) => el.getAttribute('aria-label')?.replace(/panelId:/g, ''));

const startDragging = (handle: HTMLElement, options = { clientX: 0, clientY: 0 }) => {
const mouseStartDragging = (handle: HTMLElement, options = { clientX: 0, clientY: 0 }) => {
fireEvent.mouseDown(handle, options);
};

const moveTo = (options = { clientX: 256, clientY: 128 }) => {
const mouseMoveTo = (options = { clientX: 256, clientY: 128 }) => {
fireEvent.mouseMove(document, options);
};

const drop = (handle: HTMLElement) => {
const mouseDrop = (handle: HTMLElement) => {
fireEvent.mouseUp(handle);
};
const touchStart = (handle: HTMLElement, options = { touches: [{ clientX: 0, clientY: 0 }] }) => {
fireEvent.touchStart(handle, options);
};
const touchMoveTo = (options = { touches: [{ clientX: 256, clientY: 128 }] }) => {
const realTouchEvent = window.TouchEvent;
// @ts-expect-error
window.TouchEvent = TouchEventFake;
fireEvent.touchMove(document, new TouchEventFake(options.touches));
window.TouchEvent = realTouchEvent;
};
const touchEnd = (handle: HTMLElement) => {
fireEvent.touchEnd(handle);
};

const assertTabThroughPanel = async (panelId: string) => {
await userEvent.tab(); // tab to drag handle
Expand Down Expand Up @@ -81,11 +101,11 @@ describe('GridLayout', () => {
jest.clearAllMocks();

const panel1DragHandle = screen.getAllByRole('button', { name: /drag to move/i })[0];
startDragging(panel1DragHandle);
moveTo({ clientX: 256, clientY: 128 });
mouseStartDragging(panel1DragHandle);
mouseMoveTo({ clientX: 256, clientY: 128 });
expect(mockRenderPanelContents).toHaveBeenCalledTimes(0); // renderPanelContents should not be called during dragging

drop(panel1DragHandle);
mouseDrop(panel1DragHandle);
expect(mockRenderPanelContents).toHaveBeenCalledTimes(0); // renderPanelContents should not be called after reordering
});

Expand All @@ -107,12 +127,34 @@ describe('GridLayout', () => {
renderGridLayout();

const panel1DragHandle = screen.getAllByRole('button', { name: /drag to move/i })[0];
startDragging(panel1DragHandle);
mouseStartDragging(panel1DragHandle);

mouseMoveTo({ clientX: 256, clientY: 128 });
expect(getAllThePanelIds()).toEqual(expectedInitialOrder); // the panels shouldn't be reordered till we mouseDrop

moveTo({ clientX: 256, clientY: 128 });
expect(getAllThePanelIds()).toEqual(expectedInitialOrder); // the panels shouldn't be reordered till we drop
mouseDrop(panel1DragHandle);
expect(getAllThePanelIds()).toEqual([
'panel2',
'panel5',
'panel3',
'panel7',
'panel1',
'panel8',
'panel6',
'panel4',
'panel9',
'panel10',
]);
});
it('after reordering some panels via touch events', async () => {
renderGridLayout();

const panel1DragHandle = screen.getAllByRole('button', { name: /drag to move/i })[0];
touchStart(panel1DragHandle);
touchMoveTo({ touches: [{ clientX: 256, clientY: 128 }] });
expect(getAllThePanelIds()).toEqual(expectedInitialOrder); // the panels shouldn't be reordered till we mouseDrop

drop(panel1DragHandle);
touchEnd(panel1DragHandle);
expect(getAllThePanelIds()).toEqual([
'panel2',
'panel5',
Expand Down
Loading

0 comments on commit fae5978

Please sign in to comment.