Skip to content

Commit

Permalink
Merge branch 'main' into ftr_in_staging_gate
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Watson authored Sep 26, 2023
2 parents de17f67 + d86eebd commit 97d95bd
Show file tree
Hide file tree
Showing 157 changed files with 2,841 additions and 1,357 deletions.
22 changes: 10 additions & 12 deletions .buildkite/pipelines/on_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,18 +154,16 @@ steps:
- exit_status: '-1'
limit: 3

- command: .buildkite/scripts/steps/check_types_commits.sh
label: 'Check Types Commit Diff'
# TODO: Enable in #166813 after fixing types
# - command: .buildkite/scripts/steps/check_types.sh
# label: 'Check Types'
agents:
queue: n2-16-spot
timeout_in_minutes: 60
retry:
automatic:
- exit_status: '-1'
limit: 3
# TODO: Enable in #166813 after fixing types
# - command: .buildkite/scripts/steps/check_types.sh
# label: 'Check Types'
# agents:
# queue: n2-16-spot
# timeout_in_minutes: 60
# retry:
# automatic:
# - exit_status: '-1'
# limit: 3

- command: .buildkite/scripts/steps/storybooks/build_and_upload.sh
label: 'Build Storybooks'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@
"del": "^6.1.0",
"elastic-apm-node": "^4.0.0",
"email-addresses": "^5.0.0",
"execa": "^4.0.2",
"execa": "^5.1.1",
"expiry-js": "0.1.7",
"extract-zip": "^2.0.1",
"fast-deep-equal": "^3.1.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,26 @@
import { i18n } from '@kbn/i18n';

import { Subscription } from 'rxjs';
import type { AnalyticsServiceStart, AnalyticsServiceSetup } from '@kbn/core-analytics-browser';
import type { ThemeServiceStart } from '@kbn/core-theme-browser';
import type { I18nStart } from '@kbn/core-i18n-browser';
import type { IUiSettingsClient } from '@kbn/core-ui-settings-browser';
import type { OverlayStart } from '@kbn/core-overlays-browser';
import type { NotificationsSetup, NotificationsStart } from '@kbn/core-notifications-browser';
import type { PublicMethodsOf } from '@kbn/utility-types';
import { showErrorDialog, ToastsService } from './toasts';
import { EventReporter, eventTypes } from './toasts/telemetry';

export interface SetupDeps {
analytics: AnalyticsServiceSetup;
uiSettings: IUiSettingsClient;
}

export interface StartDeps {
i18n: I18nStart;
overlays: OverlayStart;
theme: ThemeServiceStart;
analytics: AnalyticsServiceStart;
targetDomElement: HTMLElement;
}

Expand All @@ -38,7 +42,11 @@ export class NotificationsService {
this.toasts = new ToastsService();
}

public setup({ uiSettings }: SetupDeps): NotificationsSetup {
public setup({ uiSettings, analytics }: SetupDeps): NotificationsSetup {
eventTypes.forEach((eventType) => {
analytics.registerEventType(eventType);
});

const notificationSetup = { toasts: this.toasts.setup({ uiSettings }) };

this.uiSettingsErrorSubscription = uiSettings.getUpdateErrors$().subscribe((error: Error) => {
Expand All @@ -54,6 +62,7 @@ export class NotificationsService {
}

public start({
analytics,
i18n: i18nDep,
overlays,
theme,
Expand All @@ -63,8 +72,11 @@ export class NotificationsService {
const toastsContainer = document.createElement('div');
targetDomElement.appendChild(toastsContainer);

const eventReporter = new EventReporter({ analytics });

return {
toasts: this.toasts.start({
eventReporter,
i18n: i18nDep,
overlays,
theme,
Expand Down

This file was deleted.

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

Loading

0 comments on commit 97d95bd

Please sign in to comment.