From a746bcec5f3348190a11407c5e4f312c39739705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20C=C3=B4t=C3=A9?= Date: Mon, 11 Nov 2019 18:26:12 -0500 Subject: [PATCH] Add "Get Help" and "Kibana Feedback" links to the help popover (#49797) * Initial work * Move links to constants * Update UI based on design and copy * Apply PR feedback * Remove unused translations * Apply requested changes * Remove some icons --- src/core/public/chrome/chrome_service.tsx | 1 + src/core/public/chrome/constants.ts | 23 ++++++ src/core/public/chrome/ui/header/header.tsx | 6 +- .../chrome/ui/header/header_help_menu.tsx | 77 +++++++++++++------ .../translations/translations/ja-JP.json | 2 - .../translations/translations/zh-CN.json | 2 - 6 files changed, 81 insertions(+), 30 deletions(-) create mode 100644 src/core/public/chrome/constants.ts diff --git a/src/core/public/chrome/chrome_service.tsx b/src/core/public/chrome/chrome_service.tsx index 87389d2c10f0..a5532faec19e 100644 --- a/src/core/public/chrome/chrome_service.tsx +++ b/src/core/public/chrome/chrome_service.tsx @@ -129,6 +129,7 @@ export class ChromeService {
void; + isCloudEnabled: boolean; } interface State { @@ -296,6 +297,7 @@ class HeaderUI extends Component { kibanaVersion, onIsLockedUpdate, legacyMode, + isCloudEnabled, } = this.props; const { appTitle, @@ -394,7 +396,9 @@ class HeaderUI extends Component { - + diff --git a/src/core/public/chrome/ui/header/header_help_menu.tsx b/src/core/public/chrome/ui/header/header_help_menu.tsx index 688d76c9d75d..c04fbaa07ba7 100644 --- a/src/core/public/chrome/ui/header/header_help_menu.tsx +++ b/src/core/public/chrome/ui/header/header_help_menu.tsx @@ -17,30 +17,29 @@ * under the License. */ +import * as Rx from 'rxjs'; import { FormattedMessage } from '@kbn/i18n/react'; import React, { Component, Fragment } from 'react'; -import * as Rx from 'rxjs'; - +import { InjectedIntl, injectI18n } from '@kbn/i18n/react'; import { - // TODO: add type annotations - // @ts-ignore - EuiButton, - // @ts-ignore + EuiButtonEmpty, EuiFlexGroup, - // @ts-ignore EuiFlexItem, - // @ts-ignore EuiHeaderSectionItemButton, EuiIcon, EuiPopover, EuiPopoverTitle, EuiSpacer, - EuiText, } from '@elastic/eui'; -import { InjectedIntl, injectI18n } from '@kbn/i18n/react'; import { HeaderExtension } from './header_extension'; import { ChromeHelpExtension } from '../../chrome_service'; +import { + ELASTIC_SUPPORT_LINK, + GITHUB_CREATE_ISSUE_LINK, + KIBANA_ASK_ELASTIC_LINK, + KIBANA_FEEDBACK_LINK, +} from '../../constants'; interface Props { helpExtension$: Rx.Observable; @@ -48,6 +47,7 @@ interface Props { kibanaVersion: string; useDefaultContent?: boolean; kibanaDocLink: string; + isCloudEnabled: boolean; } interface State { @@ -90,23 +90,50 @@ class HeaderHelpMenuUI extends Component { const defaultContent = useDefaultContent ? ( - -

- -

-
- - - - + - + + + + + + + + + + + + + + + + + + +
) : null; diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 057ae6e2ce99..f5727b483436 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -581,8 +581,6 @@ "core.ui.overlays.banner.closeButtonLabel": "閉じる", "core.ui.chrome.headerGlobalNav.goHomePageIconAriaLabel": "ホームページに移動", "core.ui.chrome.headerGlobalNav.helpMenuButtonAriaLabel": "ヘルプメニュー", - "core.ui.chrome.headerGlobalNav.helpMenuGoToDocumentation": "ドキュメントに移動", - "core.ui.chrome.headerGlobalNav.helpMenuHelpDescription": "不明な点、アップデートなどの情報はドキュメントをご覧ください。", "core.ui.chrome.headerGlobalNav.helpMenuTitle": "ヘルプ", "core.ui.chrome.headerGlobalNav.helpMenuVersion": "v {version}", "core.ui.chrome.sideGlobalNav.viewRecentItemsFlyoutTitle": "最近のアイテム", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 8a0e3d78139b..04f00d945b67 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -582,8 +582,6 @@ "core.ui.overlays.banner.closeButtonLabel": "关闭", "core.ui.chrome.headerGlobalNav.goHomePageIconAriaLabel": "前往主页", "core.ui.chrome.headerGlobalNav.helpMenuButtonAriaLabel": "帮助菜单", - "core.ui.chrome.headerGlobalNav.helpMenuGoToDocumentation": "前往文档", - "core.ui.chrome.headerGlobalNav.helpMenuHelpDescription": "在我们的文档中获取更新、信息以及答案。", "core.ui.chrome.headerGlobalNav.helpMenuTitle": "帮助", "core.ui.chrome.headerGlobalNav.helpMenuVersion": "v {version}", "core.ui.chrome.sideGlobalNav.viewRecentItemsFlyoutTitle": "最近项",