mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Add "Give feedback" button (#180942)
## Summary
Closes https://github.com/elastic/kibana/issues/180825

### 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>
This commit is contained in:
parent
a695f528c0
commit
753e8c7917
2 changed files with 25 additions and 0 deletions
|
@ -5,8 +5,11 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { EuiButton } from '@elastic/eui';
|
||||
import { InternalChromeStart } from '@kbn/core-chrome-browser-internal';
|
||||
import { CoreSetup, CoreStart, Plugin, PluginInitializerContext } from '@kbn/core/public';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { toMountPoint } from '@kbn/react-kibana-mount';
|
||||
import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render';
|
||||
import { ProjectSwitcher, ProjectSwitcherKibanaProvider } from '@kbn/serverless-project-switcher';
|
||||
import { ProjectType } from '@kbn/serverless-types';
|
||||
|
@ -77,6 +80,27 @@ export class ServerlessPlugin
|
|||
const activeNavigationNodes$ = project.getActiveNavigationNodes$();
|
||||
const navigationTreeUi$ = project.getNavigationTreeUi$();
|
||||
|
||||
core.chrome.navControls.registerRight({
|
||||
order: 1,
|
||||
mount: toMountPoint(
|
||||
<KibanaRenderContextProvider i18n={core.i18n} theme={core.theme}>
|
||||
<EuiButton
|
||||
href="https://ela.st/serverless-feedback"
|
||||
size={'s'}
|
||||
color={'warning'}
|
||||
iconType={'popout'}
|
||||
iconSide={'right'}
|
||||
target={'_blank'}
|
||||
>
|
||||
{i18n.translate('xpack.serverless.header.giveFeedbackBtn.label', {
|
||||
defaultMessage: 'Give feedback',
|
||||
})}
|
||||
</EuiButton>
|
||||
</KibanaRenderContextProvider>,
|
||||
{ ...core }
|
||||
),
|
||||
});
|
||||
|
||||
return {
|
||||
setSideNavComponentDeprecated: (sideNavigationComponent) =>
|
||||
project.setSideNavComponent(sideNavigationComponent),
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
"@kbn/shared-ux-chrome-navigation",
|
||||
"@kbn/i18n",
|
||||
"@kbn/management-cards-navigation",
|
||||
"@kbn/react-kibana-mount",
|
||||
"@kbn/react-kibana-context-render",
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue