[Drift] Revert adding Chat to Management (#159896)

## Summary

Partially revert https://github.com/elastic/kibana/pull/159121
Reverts adding Drift chat to management. Part of
https://github.com/elastic/kibana/issues/158835

We decided to revert to adding to management for now because we realized
that there are a lot of cases in the Management app when Drift Chat can
overlap buttons on the page 😢

Here are some examples: 

<img width="600" alt="Screenshot 2023-06-15 at 16 20 43"
src="980916dc-b463-45f4-b5c1-bdce9f3f8336">
<img width="600" alt="Screenshot 2023-06-15 at 16 20 43"
src="ec74332b-5c91-4175-bde6-8e736d8bb4fa">
<img width="600" alt="Screenshot 2023-06-15 at 16 20 50"
src="5753b05d-7abc-409f-9a06-9f19a910461a">
This commit is contained in:
Anton Dosov 2023-06-19 15:39:16 +02:00 committed by GitHub
parent c87e4e983d
commit cfa46e473a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 4 additions and 22 deletions

View file

@ -10,8 +10,7 @@
"share"
],
"optionalPlugins": [
"home",
"cloudChatProvider"
"home"
],
"requiredBundles": [
"kibanaReact",

View file

@ -16,7 +16,6 @@ import { AppMountParameters, ChromeBreadcrumb, ScopedHistory } from '@kbn/core/p
import { reactRouterNavigate, KibanaThemeProvider } from '@kbn/kibana-react-plugin/public';
import { KibanaPageTemplate, KibanaPageTemplateProps } from '@kbn/shared-ux-page-kibana-template';
import type { CloudChatProviderPluginStart } from '@kbn/cloud-chat-provider-plugin/public';
import useObservable from 'react-use/lib/useObservable';
import {
ManagementSection,
@ -39,11 +38,10 @@ export interface ManagementAppDependencies {
kibanaVersion: string;
setBreadcrumbs: (newBreadcrumbs: ChromeBreadcrumb[]) => void;
isSidebarEnabled$: BehaviorSubject<boolean>;
cloudChat?: CloudChatProviderPluginStart;
}
export const ManagementApp = ({ dependencies, history, theme$ }: ManagementAppProps) => {
const { setBreadcrumbs, isSidebarEnabled$, cloudChat } = dependencies;
const { setBreadcrumbs, isSidebarEnabled$ } = dependencies;
const [selectedId, setSelectedId] = useState<string>('');
const [sections, setSections] = useState<ManagementSection[]>();
const isSidebarEnabled = useObservable(isSidebarEnabled$);
@ -116,7 +114,6 @@ export const ManagementApp = ({ dependencies, history, theme$ }: ManagementAppPr
dependencies={dependencies}
/>
</KibanaPageTemplate>
{cloudChat?.Chat ? <cloudChat.Chat /> : null}
</KibanaThemeProvider>
</I18nProvider>
);

View file

@ -10,7 +10,6 @@ import { i18n } from '@kbn/i18n';
import { BehaviorSubject } from 'rxjs';
import type { SharePluginSetup, SharePluginStart } from '@kbn/share-plugin/public';
import { HomePublicPluginSetup } from '@kbn/home-plugin/public';
import { CloudChatProviderPluginStart } from '@kbn/cloud-chat-provider-plugin/public';
import {
CoreSetup,
CoreStart,
@ -40,7 +39,6 @@ interface ManagementSetupDependencies {
interface ManagementStartDependencies {
share: SharePluginStart;
cloudChatProvider?: CloudChatProviderPluginStart;
}
export class ManagementPlugin
@ -113,14 +111,13 @@ export class ManagementPlugin
updater$: this.appUpdater,
async mount(params: AppMountParameters) {
const { renderApp } = await import('./application');
const [coreStart, plugins] = await core.getStartServices();
const [coreStart] = await core.getStartServices();
return renderApp(params, {
sections: getSectionsServiceStartPrivate(),
kibanaVersion,
setBreadcrumbs: coreStart.chrome.setBreadcrumbs,
isSidebarEnabled$: managementPlugin.isSidebarEnabled$,
cloudChat: plugins.cloudChatProvider,
});
},
});

View file

@ -19,8 +19,7 @@
"@kbn/i18n",
"@kbn/i18n-react",
"@kbn/shared-ux-page-kibana-template",
"@kbn/shared-ux-router",
"@kbn/cloud-chat-provider-plugin",
"@kbn/shared-ux-router"
],
"exclude": [
"target/**/*",

View file

@ -36,16 +36,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await testSubjects.existOrFail('cloud-chat');
});
it('chat widget is present on management page', async () => {
await PageObjects.common.navigateToApp('management');
await testSubjects.existOrFail('cloud-chat');
});
it('chat widget is present on management page', async () => {
PageObjects.common.navigateToApp('management');
await testSubjects.existOrFail('cloud-chat');
});
it('chat widget is present on observability/overview page', async () => {
await PageObjects.common.navigateToUrl('observability', '/overview', {
useActualUrl: true,