Skip to content

Commit 753e8c7

Browse files
Add "Give feedback" button (#180942)
## Summary Closes #180825 ![image](https://github.com/elastic/kibana/assets/82822460/12a5a362-28c3-4837-b7ca-d33640333ac7) ### Checklist Delete any items that are not applicable to this PR. - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [x] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [x] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) ### For maintainers - [x] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
1 parent a695f52 commit 753e8c7

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

x-pack/plugins/serverless/public/plugin.tsx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@
55
* 2.0.
66
*/
77

8+
import { EuiButton } from '@elastic/eui';
89
import { InternalChromeStart } from '@kbn/core-chrome-browser-internal';
910
import { CoreSetup, CoreStart, Plugin, PluginInitializerContext } from '@kbn/core/public';
11+
import { i18n } from '@kbn/i18n';
12+
import { toMountPoint } from '@kbn/react-kibana-mount';
1013
import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render';
1114
import { ProjectSwitcher, ProjectSwitcherKibanaProvider } from '@kbn/serverless-project-switcher';
1215
import { ProjectType } from '@kbn/serverless-types';
@@ -77,6 +80,27 @@ export class ServerlessPlugin
7780
const activeNavigationNodes$ = project.getActiveNavigationNodes$();
7881
const navigationTreeUi$ = project.getNavigationTreeUi$();
7982

83+
core.chrome.navControls.registerRight({
84+
order: 1,
85+
mount: toMountPoint(
86+
<KibanaRenderContextProvider i18n={core.i18n} theme={core.theme}>
87+
<EuiButton
88+
href="https://ela.st/serverless-feedback"
89+
size={'s'}
90+
color={'warning'}
91+
iconType={'popout'}
92+
iconSide={'right'}
93+
target={'_blank'}
94+
>
95+
{i18n.translate('xpack.serverless.header.giveFeedbackBtn.label', {
96+
defaultMessage: 'Give feedback',
97+
})}
98+
</EuiButton>
99+
</KibanaRenderContextProvider>,
100+
{ ...core }
101+
),
102+
});
103+
80104
return {
81105
setSideNavComponentDeprecated: (sideNavigationComponent) =>
82106
project.setSideNavComponent(sideNavigationComponent),

x-pack/plugins/serverless/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"@kbn/shared-ux-chrome-navigation",
2727
"@kbn/i18n",
2828
"@kbn/management-cards-navigation",
29+
"@kbn/react-kibana-mount",
2930
"@kbn/react-kibana-context-render",
3031
]
3132
}

0 commit comments

Comments
 (0)