From 647353bf7968d6c32f2c16e476a7249ff2e6d667 Mon Sep 17 00:00:00 2001 From: Marta Bondyra Date: Wed, 1 Apr 2020 17:37:35 +0200 Subject: [PATCH 1/2] fix: setBreadcrumbs at home when coming back from tutorial --- src/plugins/home/public/application/components/home.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/home/public/application/components/home.js b/src/plugins/home/public/application/components/home.js index 6d00b1c6a5d14..77cde6a574aec 100644 --- a/src/plugins/home/public/application/components/home.js +++ b/src/plugins/home/public/application/components/home.js @@ -36,6 +36,7 @@ import { EuiPageBody, EuiScreenReaderOnly, } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; import { Welcome } from './welcome'; import { getServices } from '../kibana_services'; @@ -69,6 +70,9 @@ export class Home extends Component { componentDidMount() { this._isMounted = true; this.fetchIsNewKibanaInstance(); + + const homeTitle = i18n.translate('home.breadcrumbs.homeTitle', { defaultMessage: 'Home' }); + getServices().chrome.setBreadcrumbs([{ text: homeTitle }]); } fetchIsNewKibanaInstance = async () => { From a3b7f5394e8ecc34ba460d239ec5f08abd790613 Mon Sep 17 00:00:00 2001 From: Marta Bondyra Date: Thu, 2 Apr 2020 09:33:22 +0200 Subject: [PATCH 2/2] test: fix tests --- src/plugins/home/public/application/components/home.test.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/home/public/application/components/home.test.js b/src/plugins/home/public/application/components/home.test.js index ca8297800b53e..99722df18e069 100644 --- a/src/plugins/home/public/application/components/home.test.js +++ b/src/plugins/home/public/application/components/home.test.js @@ -29,6 +29,9 @@ jest.mock('../kibana_services', () => ({ getBasePath: () => 'path', tutorialVariables: () => ({}), homeConfig: { disableWelcomeScreen: false }, + chrome: { + setBreadcrumbs: () => {}, + }, }), }));