Skip to content

Commit

Permalink
Merge branch 'main' into 168825-move-total-hits
Browse files Browse the repository at this point in the history
  • Loading branch information
jughosta committed Jan 10, 2024
2 parents 125e9d7 + 1181251 commit 5d10a7d
Show file tree
Hide file tree
Showing 61 changed files with 1,497 additions and 858 deletions.
1 change: 1 addition & 0 deletions .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ enabled:
- x-pack/test_serverless/functional/test_suites/observability/common_configs/config.group5.ts
- x-pack/test_serverless/functional/test_suites/observability/common_configs/config.group6.ts
- x-pack/test_serverless/functional/test_suites/observability/config.screenshots.ts
- x-pack/test_serverless/functional/test_suites/security/config.screenshots.ts
- x-pack/test_serverless/functional/test_suites/search/config.ts
- x-pack/test_serverless/functional/test_suites/search/config.examples.ts
- x-pack/test_serverless/functional/test_suites/search/config.screenshots.ts
Expand Down
10 changes: 6 additions & 4 deletions .buildkite/pipelines/flaky_tests/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,9 @@ for (const testSuite of testSuites) {
},
depends_on: 'build',
timeout_in_minutes: 150,
cancel_on_build_failing: true,
retry: {
automatic: [
{ exit_status: '-1', limit: 3 },
// { exit_status: '*', limit: 1 },
],
automatic: [{ exit_status: '-1', limit: 3 }],
},
});
continue;
Expand All @@ -173,6 +171,10 @@ for (const testSuite of testSuites) {
concurrency,
concurrency_group: process.env.UUID,
concurrency_method: 'eager',
cancel_on_build_failing: true,
retry: {
automatic: [{ exit_status: '-1', limit: 3 }],
},
env: {
// disable split of test cases between parallel jobs when running them in flaky test runner
// by setting chunks vars to value 1, which means all test will run in one job
Expand Down
260 changes: 260 additions & 0 deletions docs/CHANGELOG.asciidoc

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions examples/discover_customization_examples/public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
EuiFlexItem,
EuiPopover,
EuiWrappingPopover,
IconType,
} from '@elastic/eui';
import {
AppNavLinkStatus,
Expand Down Expand Up @@ -401,6 +402,28 @@ export class DiscoverCustomizationExamplesPlugin implements Plugin {
},
});

customizations.set({
id: 'flyout',
size: '60%',
title: 'Example custom flyout',
actions: {
getActionItems: () =>
Array.from({ length: 5 }, (_, i) => {
const index = i + 1;
return {
id: `action-item-${index}`,
enabled: true,
label: `Action ${index}`,
iconType: ['faceHappy', 'faceNeutral', 'faceSad', 'infinity', 'bell'].at(
i
) as IconType,
dataTestSubj: `customActionItem${index}`,
onClick: () => alert(index),
};
}),
},
});

return () => {
// eslint-disable-next-line no-console
console.log('Cleaning up Logs explorer customizations');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.3.1",
"@elastic/eui": "92.0.0-backport.0",
"@elastic/filesaver": "1.1.2",
"@elastic/node-crypto": "1.2.1",
"@elastic/numeral": "^2.5.1",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -371,22 +371,6 @@ export const getEuiContextMapping = (): EuiTokensObject => {
'euiCommonlyUsedTimeRanges.legend': i18n.translate('core.euiCommonlyUsedTimeRanges.legend', {
defaultMessage: 'Commonly used',
}),
'euiControlBar.screenReaderHeading': i18n.translate('core.euiControlBar.screenReaderHeading', {
defaultMessage: 'Page level controls',
}),
'euiControlBar.screenReaderAnnouncement': i18n.translate(
'core.euiControlBar.screenReaderAnnouncement',
{
defaultMessage:
'There is a new region landmark with page level controls at the end of the document.',
}
),
'euiControlBar.customScreenReaderAnnouncement': ({ landmarkHeading }: EuiValues) =>
i18n.translate('core.euiControlBar.customScreenReaderAnnouncement', {
defaultMessage:
'There is a new region landmark called {landmarkHeading} with page level controls at the end of the document.',
values: { landmarkHeading },
}),
'euiGlobalToastList.clearAllToastsButtonAriaLabel': i18n.translate(
'core.euiGlobalToastList.clearAllToastsButtonAriaLabel',
{
Expand Down Expand Up @@ -938,56 +922,10 @@ export const getEuiContextMapping = (): EuiTokensObject => {
'euiModal.closeModal': i18n.translate('core.euiModal.closeModal', {
defaultMessage: 'Closes this modal window',
}),
'euiNotificationEventMessages.accordionButtonText': ({ messagesLength }: EuiValues) =>
i18n.translate('core.euiNotificationEventMessages.accordionButtonText', {
defaultMessage: '+ {messagesLength} more',
values: { messagesLength },
}),
'euiErrorBoundary.error': i18n.translate('core.euiErrorBoundary.error', {
defaultMessage: 'Error',
description: 'Error boundary for uncaught exceptions when rendering part of the application',
}),
'euiNotificationEventMessages.accordionAriaLabelButtonText': ({
messagesLength,
eventName,
}: EuiValues) =>
i18n.translate('core.euiNotificationEventMessages.accordionAriaLabelButtonText', {
defaultMessage: '+ {messagesLength} messages for {eventName}',
values: { messagesLength, eventName },
}),
'euiNotificationEventMeta.contextMenuButton': ({ eventName }: EuiValues) =>
i18n.translate('core.euiNotificationEventMeta.contextMenuButton', {
defaultMessage: 'Menu for {eventName}',
values: { eventName },
}),
'euiNotificationEventReadButton.markAsReadAria': ({ eventName }: EuiValues) =>
i18n.translate('core.euiNotificationEventReadButton.markAsReadAria', {
defaultMessage: 'Mark {eventName} as read',
values: { eventName },
}),
'euiNotificationEventReadButton.markAsUnreadAria': ({ eventName }: EuiValues) =>
i18n.translate('core.euiNotificationEventReadButton.markAsUnreadAria', {
defaultMessage: 'Mark {eventName} as unread',
values: { eventName },
}),
'euiNotificationEventReadButton.markAsRead': i18n.translate(
'core.euiNotificationEventReadButton.markAsRead',
{
defaultMessage: 'Mark as read',
}
),
'euiNotificationEventReadButton.markAsUnread': i18n.translate(
'core.euiNotificationEventReadButton.markAsUnread',
{
defaultMessage: 'Mark as unread',
}
),
'euiNotificationEventMessages.accordionHideText': i18n.translate(
'core.euiNotificationEventMessages.accordionHideText',
{
defaultMessage: 'hide',
}
),
'euiPagination.pageOfTotalCompressed': ({ page, total }: EuiValues) => (
<FormattedMessage
id="core.euiPagination.pageOfTotalCompressed"
Expand Down Expand Up @@ -1802,25 +1740,6 @@ export const getEuiContextMapping = (): EuiTokensObject => {
defaultMessage: 'You can quickly navigate this list using arrow keys.',
}
),
'euiNotificationEventReadIcon.read': i18n.translate('core.euiNotificationEventReadIcon.read', {
defaultMessage: 'Read',
}),
'euiNotificationEventReadIcon.readAria': ({ eventName }: EuiValues) =>
i18n.translate('core.euiNotificationEventReadIcon.readAria', {
defaultMessage: '{eventName} is read',
values: { eventName },
}),
'euiNotificationEventReadIcon.unread': i18n.translate(
'core.euiNotificationEventReadIcon.unread',
{
defaultMessage: 'Unread',
}
),
'euiNotificationEventReadIcon.unreadAria': ({ eventName }: EuiValues) =>
i18n.translate('core.euiNotificationEventReadIcon.unreadAria', {
defaultMessage: '{eventName} is unread',
values: { eventName },
}),
'euiSkeletonLoading.loadingAriaText': ({ contentAriaLabel }: EuiValues) =>
i18n.translate('core.euiSkeletonLoading.loadingAriaText', {
defaultMessage: 'Loading {contentAriaLabel}',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,6 @@
min-height: 0;
}

.unifiedDataTable__flyoutHeader {
white-space: nowrap;
}

.unifiedDataTable__flyoutDocumentNavigation {
justify-content: flex-end;
}

// We only truncate if the cell is not a control column.
.euiDataGridHeader {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const popoverTitleStyle = css`
`;
const filterButtonStyle = css`
&,
& .euiFilterButton__textShift {
& .euiFilterButton__text {
min-width: 0;
line-height: 1;
}
Expand Down
2 changes: 1 addition & 1 deletion src/dev/license_checker/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.3.1': ['SSPL-1.0 OR Elastic License 2.0'],
'@elastic/eui@92.0.0-backport.0': ['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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
* Side Public License, v 1.
*/

import React, { FC, useRef } from 'react';
import React, { FC } from 'react';
import { EuiInputPopover } from '@elastic/eui';
import { FROM_INDEX, TO_INDEX } from '../time_utils';
import { EuiDualRangeRef } from './time_slider_sliding_window_range';
import { getRoundedTimeRangeBounds } from '../time_slider_selectors';
import { useTimeSlider } from '../embeddable/time_slider_embeddable';
import { TimeSliderPopoverButton } from './time_slider_popover_button';
Expand Down Expand Up @@ -41,12 +40,6 @@ export const TimeSlider: FC<Props> = (props: Props) => {
return state.componentState.isOpen;
});

const rangeRef = useRef<EuiDualRangeRef>(null);

const onPanelResize = (width: number) => {
rangeRef.current?.onResize(width);
};

const from = value ? value[FROM_INDEX] : timeRangeMin;
const to = value ? value[TO_INDEX] : timeRangeMax;

Expand All @@ -67,10 +60,8 @@ export const TimeSlider: FC<Props> = (props: Props) => {
isOpen={isOpen}
closePopover={() => timeSlider.dispatch.setIsOpen({ isOpen: false })}
panelPaddingSize="s"
onPanelResize={onPanelResize}
>
<TimeSliderPopoverContent
rangeRef={rangeRef}
value={[from, to]}
onChange={props.onChange}
stepSize={stepSize}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
* Side Public License, v 1.
*/

import React, { Ref } from 'react';
import React from 'react';
import { EuiButtonIcon, EuiRangeTick, EuiFlexGroup, EuiFlexItem, EuiToolTip } from '@elastic/eui';

import { getIsAnchored } from '../time_slider_selectors';
import { TimeSliderStrings } from './time_slider_strings';
import { useTimeSlider } from '../embeddable/time_slider_embeddable';
import { TimeSliderAnchoredRange } from './time_slider_anchored_range';
import { EuiDualRangeRef, TimeSliderSlidingWindowRange } from './time_slider_sliding_window_range';
import { TimeSliderSlidingWindowRange } from './time_slider_sliding_window_range';

interface Props {
value: [number, number];
Expand All @@ -22,7 +22,6 @@ interface Props {
ticks: EuiRangeTick[];
timeRangeMin: number;
timeRangeMax: number;
rangeRef?: Ref<EuiDualRangeRef>;
}

export function TimeSliderPopoverContent(props: Props) {
Expand Down Expand Up @@ -55,7 +54,6 @@ export function TimeSliderPopoverContent(props: Props) {
value={props.value}
onChange={props.onChange}
stepSize={props.stepSize}
rangeRef={props.rangeRef}
ticks={ticks}
timeRangeMin={props.timeRangeMin}
timeRangeMax={props.timeRangeMax}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@
* Side Public License, v 1.
*/

import React, { Ref, ComponentProps } from 'react';
import React from 'react';
import { EuiDualRange, EuiRangeTick } from '@elastic/eui';
import type { EuiDualRangeClass } from '@elastic/eui/src/components/form/range/dual_range';

// Unfortunately, wrapping EuiDualRange in `withEuiTheme` has created a super annoying/verbose typing
export type EuiDualRangeRef = EuiDualRangeClass & ComponentProps<typeof EuiDualRange>;

interface Props {
value: [number, number];
Expand All @@ -20,7 +16,6 @@ interface Props {
ticks: EuiRangeTick[];
timeRangeMin: number;
timeRangeMax: number;
rangeRef?: Ref<EuiDualRangeRef>;
}

export function TimeSliderSlidingWindowRange(props: Props) {
Expand All @@ -30,7 +25,6 @@ export function TimeSliderSlidingWindowRange(props: Props) {

return (
<EuiDualRange
ref={props.rangeRef}
fullWidth={true}
value={props.value}
onChange={onChange}
Expand Down
Loading

0 comments on commit 5d10a7d

Please sign in to comment.