Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Visualizations] Remove kui usage #82810

Merged
merged 5 commits into from
Nov 10, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/core/public/doc_links/doc_links_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ export class DocLinksService {
management: {
kibanaSearchSettings: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/advanced-options.html#kibana-search-settings`,
dashboardSettings: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/advanced-options.html#kibana-dashboard-settings`,
visualizationSettings: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/advanced-options.html#kibana-visualization-settings`,
},
visualize: {
guide: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/visualize.html`,
Expand Down
1 change: 0 additions & 1 deletion src/plugins/visualizations/public/embeddable/_index.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
@import 'visualize_lab_disabled';
@import 'embeddables';

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,39 @@
* under the License.
*/

import { FormattedMessage } from '@kbn/i18n/react';
import { FormattedMessage, I18nProvider } from '@kbn/i18n/react';
import { EuiEmptyPrompt, EuiLink } from '@elastic/eui';
import React from 'react';
import { getDocLinks } from '../services';

export function DisabledLabVisualization({ title }: { title: string }) {
const advancedSettingsLink = getDocLinks().links.management.visualizationSettings;
return (
<div className="visDisabledLabVisualization">
<div
className="kuiVerticalRhythm visDisabledLabVisualization__icon kuiIcon fa-flask"
aria-hidden="true"
<I18nProvider>
<EuiEmptyPrompt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: can we add a titleSize="xs" prop to EuiEmptyPrompt?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I addressed them both! Thank you 🙂
Screenshot 2020-11-09 at 5 47 44 PM

title={
<FormattedMessage
stratoula marked this conversation as resolved.
Show resolved Hide resolved
id="visualizations.disabledLabVisualizationTitle"
defaultMessage="{title} is a lab visualization."
values={{ title }}
/>
}
iconType="beaker"
body={
<FormattedMessage
id="visualizations.disabledLabVisualizationMessage"
defaultMessage="Please turn on lab-mode in the advanced settings to see lab visualizations."
/>
}
actions={
<EuiLink target="_blank" external href={advancedSettingsLink}>
<FormattedMessage
id="visualizations.disabledLabVisualizationLink"
defaultMessage="Read documentation"
/>
</EuiLink>
}
/>
<div className="kuiVerticalRhythm">
<FormattedMessage
id="visualizations.disabledLabVisualizationTitle"
defaultMessage="{title} is a lab visualization."
values={{ title: <em className="visDisabledLabVisualization__title">{title}</em> }}
/>
</div>
<div className="kuiVerticalRhythm">
<FormattedMessage
id="visualizations.disabledLabVisualizationMessage"
defaultMessage="Please turn on lab-mode in the advanced settings to see lab visualizations."
/>
</div>
</div>
</I18nProvider>
);
}