From 46eda4c48922569954cdec2f7ac3facd60ab620c Mon Sep 17 00:00:00 2001 From: Marta Bondyra <4283304+mbondyra@users.noreply.github.com> Date: Mon, 21 Oct 2024 18:00:00 +0200 Subject: [PATCH] [Visualizations] Show TSVB and Agg based as "legacy" when users create visualizations from the library (#195966) ## Summary Fixes https://github.com/elastic/kibana/issues/191489 Redesign of "Create Visualization" Modal To encourage users to adopt Lens and reduce reliance on Agg-based and TSVB visualizations, we've redesigned the "Create Visualization" modal. The new layout now features two distinct tabs: one highlighting recommended visualizations, and another clearly marking legacy options. This separation ensures users are well-informed about which visualization types are preferred moving forward. Screenshot 2024-10-15 at 13 15 49 ![image](https://github.com/user-attachments/assets/86c399fc-e737-453f-84e3-938d85aa22d3) --- .../vis_type_markdown/public/markdown_vis.ts | 4 +- .../timeseries/public/metrics_type.ts | 2 +- .../vis_types/vega/public/vega_type.ts | 5 +- .../agg_based_selection.test.tsx | 10 +- .../agg_based_selection.tsx | 4 +- .../visualizations/public/wizard/dialog.scss | 4 +- .../group_selection/group_selection.test.tsx | 192 +++------- .../group_selection/group_selection.tsx | 337 +++++++++--------- .../public/wizard/new_vis_modal.test.tsx | 183 +++------- .../public/wizard/new_vis_modal.tsx | 26 +- .../dashboard/group1/edit_visualizations.js | 2 +- .../apps/dashboard/group5/legacy_urls.ts | 9 +- .../markdown/_markdown_vis.ts | 13 +- .../apps/visualize/group1/_chart_types.ts | 14 +- .../visualize/group3/_visualize_listing.ts | 15 +- .../functional/page_objects/visualize_page.ts | 19 +- x-pack/plugins/lens/public/vis_type_alias.ts | 5 +- .../translations/translations/fr-FR.json | 15 - .../translations/translations/ja-JP.json | 15 - .../translations/translations/zh-CN.json | 15 - .../functional/tests/visualize_integration.ts | 13 +- 21 files changed, 346 insertions(+), 556 deletions(-) diff --git a/src/plugins/vis_type_markdown/public/markdown_vis.ts b/src/plugins/vis_type_markdown/public/markdown_vis.ts index 095dc4dee6b89..10bcf8457cab2 100644 --- a/src/plugins/vis_type_markdown/public/markdown_vis.ts +++ b/src/plugins/vis_type_markdown/public/markdown_vis.ts @@ -23,10 +23,10 @@ export const markdownVisDefinition: VisTypeDefinition = { icon: 'visText', group: VisGroups.TOOLS, titleInWizard: i18n.translate('visTypeMarkdown.markdownTitleInWizard', { - defaultMessage: 'Text', + defaultMessage: 'Markdown text', }), description: i18n.translate('visTypeMarkdown.markdownDescription', { - defaultMessage: 'Add text and images to your dashboard.', + defaultMessage: 'Add custom text or images to dashboards.', }), order: 30, toExpressionAst, diff --git a/src/plugins/vis_types/timeseries/public/metrics_type.ts b/src/plugins/vis_types/timeseries/public/metrics_type.ts index 0790694a24473..eec28bb6cf47c 100644 --- a/src/plugins/vis_types/timeseries/public/metrics_type.ts +++ b/src/plugins/vis_types/timeseries/public/metrics_type.ts @@ -102,7 +102,7 @@ export const metricsVisDefinition: VisTypeDefinition< name: VIS_TYPE, title: i18n.translate('visTypeTimeseries.kbnVisTypes.metricsTitle', { defaultMessage: 'TSVB' }), description: i18n.translate('visTypeTimeseries.kbnVisTypes.metricsDescription', { - defaultMessage: 'Perform advanced analysis of your time series data.', + defaultMessage: 'Create visualizations using time series data.', }), icon: 'visVisualBuilder', group: VisGroups.LEGACY, diff --git a/src/plugins/vis_types/vega/public/vega_type.ts b/src/plugins/vis_types/vega/public/vega_type.ts index a59358d024c75..744125fe5be2c 100644 --- a/src/plugins/vis_types/vega/public/vega_type.ts +++ b/src/plugins/vis_types/vega/public/vega_type.ts @@ -32,12 +32,9 @@ export const createVegaTypeDefinition = (): VisTypeDefinition => { title: 'Vega', getInfoMessage, description: i18n.translate('visTypeVega.type.vegaDescription', { - defaultMessage: 'Use Vega to create new types of visualizations.', + defaultMessage: 'Use the Vega syntax to create new types of visualizations.', description: 'Vega and Vega-Lite are product names and should not be translated', }), - note: i18n.translate('visTypeVega.type.vegaNote', { - defaultMessage: 'Requires knowledge of Vega syntax.', - }), icon: 'visVega', group: VisGroups.PROMOTED, titleInWizard: i18n.translate('visTypeVega.type.vegaTitleInWizard', { diff --git a/src/plugins/visualizations/public/wizard/agg_based_selection/agg_based_selection.test.tsx b/src/plugins/visualizations/public/wizard/agg_based_selection/agg_based_selection.test.tsx index 286ceecaca567..16da39c059bba 100644 --- a/src/plugins/visualizations/public/wizard/agg_based_selection/agg_based_selection.test.tsx +++ b/src/plugins/visualizations/public/wizard/agg_based_selection/agg_based_selection.test.tsx @@ -70,18 +70,18 @@ describe('AggBasedSelection', () => { jest.clearAllMocks(); }); - it('should call the toggleGroups if the user clicks the goBack link', () => { - const toggleGroups = jest.fn(); + it('should call the showMainDialog if the user clicks the goBack link', () => { + const showMainDialog = jest.fn(); const wrapper = mountWithIntl( ); const aggBasedGroupCard = wrapper.find('[data-test-subj="goBackLink"]').last(); aggBasedGroupCard.simulate('click'); - expect(toggleGroups).toHaveBeenCalled(); + expect(showMainDialog).toHaveBeenCalled(); }); describe('filter for visualization types', () => { @@ -89,7 +89,7 @@ describe('AggBasedSelection', () => { const wrapper = mountWithIntl( ); diff --git a/src/plugins/visualizations/public/wizard/agg_based_selection/agg_based_selection.tsx b/src/plugins/visualizations/public/wizard/agg_based_selection/agg_based_selection.tsx index f4a2768372125..1cb038e338f0e 100644 --- a/src/plugins/visualizations/public/wizard/agg_based_selection/agg_based_selection.tsx +++ b/src/plugins/visualizations/public/wizard/agg_based_selection/agg_based_selection.tsx @@ -39,7 +39,7 @@ interface AggBasedSelectionProps { openedAsRoot?: boolean; onVisTypeSelected: (visType: BaseVisType) => void; visTypesRegistry: TypesStart; - toggleGroups: (flag: boolean) => void; + showMainDialog: (flag: boolean) => void; } interface AggBasedSelectionState { query: string; @@ -67,7 +67,7 @@ class AggBasedSelection extends React.Component {this.props.openedAsRoot ? null : ( - this.props.toggleGroups(true)} /> + this.props.showMainDialog(true)} /> )} { const defaultVisTypeParams = { @@ -99,35 +101,34 @@ describe('GroupSelection', () => { jest.clearAllMocks(); }); - it('should render the header title', () => { - const wrapper = mountWithIntl( - - ); - expect(wrapper.find('[data-test-subj="groupModalHeader"]').at(0).text()).toBe( - 'New visualization' + const renderGroupSelectionComponent = (overrideProps?: Partial) => { + return render( + + + ); + }; + + it('should render the header title', () => { + renderGroupSelectionComponent(); + expect(screen.getByTestId('groupModalHeader')).toHaveTextContent('Create visualization'); }); - it('should not render the aggBased group card if no aggBased visualization is registered', () => { - const wrapper = mountWithIntl( - - ); - expect(wrapper.find('[data-test-subj="visGroup-aggbased"]').exists()).toBe(false); + it('should not render tabs if no legacy, tools or tsvb visualizations are registered', async () => { + renderGroupSelectionComponent(); + expect(screen.queryByRole('tab', { name: /legacy/i })).toBeNull(); + expect(screen.queryByRole('tab', { name: /recommended/i })).toBeNull(); }); - it('should render the aggBased group card if an aggBased group vis is registered', () => { + it('should render tabs and the aggBased group card if an aggBased group vis is registered', async () => { const aggBasedVisType = { name: 'visWithSearch', title: 'Vis with search', @@ -135,53 +136,18 @@ describe('GroupSelection', () => { stage: 'production', ...defaultVisTypeParams, }; - const wrapper = mountWithIntl( - - ); - expect(wrapper.find('[data-test-subj="visGroup-aggbased"]').exists()).toBe(true); - }); - - it('should not render the tools group card if no tools visualization is registered', () => { - const wrapper = mountWithIntl( - - ); - expect(wrapper.find('[data-test-subj="visGroup-tools"]').exists()).toBe(false); - }); + renderGroupSelectionComponent({ + visTypesRegistry: visTypesRegistry([..._visTypes, aggBasedVisType] as BaseVisType[]), + tab: 'legacy', + }); - it('should render the tools group card if a tools group vis is registered', () => { - const toolsVisType = { - name: 'vis3', - title: 'Vis3', - stage: 'production', - group: VisGroups.TOOLS, - ...defaultVisTypeParams, - }; - const wrapper = mountWithIntl( - - ); - expect(wrapper.find('[data-test-subj="visGroup-tools"]').exists()).toBe(true); + expect(screen.queryByRole('tab', { name: /legacy/i })).toBeInTheDocument(); + expect(screen.queryByRole('tab', { name: /recommended/i })).toBeInTheDocument(); + expect(screen.getByTestId('visType-aggbased')).toHaveTextContent('Aggregation-based'); }); - it('should call the toggleGroups if the aggBased group card is clicked', () => { - const toggleGroups = jest.fn(); + it('should call the showMainDialog if the aggBased group card is clicked', async () => { + const showMainDialog = jest.fn(); const aggBasedVisType = { name: 'visWithSearch', title: 'Vis with search', @@ -189,82 +155,26 @@ describe('GroupSelection', () => { stage: 'production', ...defaultVisTypeParams, }; - const wrapper = mountWithIntl( - - ); - const aggBasedGroupCard = wrapper.find('[data-test-subj="visGroupAggBasedExploreLink"]').last(); - aggBasedGroupCard.simulate('click'); - expect(toggleGroups).toHaveBeenCalled(); + renderGroupSelectionComponent({ + showMainDialog, + visTypesRegistry: visTypesRegistry([..._visTypes, aggBasedVisType] as BaseVisType[]), + tab: 'legacy', + }); + + await userEvent.click(screen.getByRole('button', { name: /Aggregation-based/i })); + expect(showMainDialog).toHaveBeenCalledWith(false); }); - it('should sort promoted visualizations first', () => { - const wrapper = mountWithIntl( - - ); + it('should only show promoted visualizations in recommended tab', () => { + renderGroupSelectionComponent(); - const cards = [ - ...new Set( - wrapper.find('[data-test-subj^="visType-"]').map((card) => card.prop('data-test-subj')) - ), - ]; + const cards = screen.getAllByRole('button').map((el) => el.textContent); expect(cards).toEqual([ - 'visType-visAliasWithPromotion', - 'visType-vis1', - 'visType-vis2', - 'visType-visWithAliasUrl', + 'Vis alias with promotion', + 'Vis Type 1', + 'Vis Type 2', + 'Vis with alias Url', ]); }); - - it('should not show tools experimental visualizations if showExperimentalis false', () => { - const expVis = { - name: 'visExp', - title: 'Experimental Vis', - group: VisGroups.TOOLS, - stage: 'experimental', - ...defaultVisTypeParams, - }; - const wrapper = mountWithIntl( - - ); - expect(wrapper.find('[data-test-subj="visType-visExp"]').exists()).toBe(false); - }); - - it('should show tools experimental visualizations if showExperimental is true', () => { - const expVis = { - name: 'visExp', - title: 'Experimental Vis', - group: VisGroups.TOOLS, - stage: 'experimental', - ...defaultVisTypeParams, - }; - const wrapper = mountWithIntl( - - ); - expect(wrapper.find('[data-test-subj="visType-visExp"]').exists()).toBe(true); - }); }); diff --git a/src/plugins/visualizations/public/wizard/group_selection/group_selection.tsx b/src/plugins/visualizations/public/wizard/group_selection/group_selection.tsx index 11f85c0c685a3..b730798124d5a 100644 --- a/src/plugins/visualizations/public/wizard/group_selection/group_selection.tsx +++ b/src/plugins/visualizations/public/wizard/group_selection/group_selection.tsx @@ -8,7 +8,7 @@ */ import { FormattedMessage } from '@kbn/i18n-react'; -import React, { useCallback, useMemo } from 'react'; +import React, { ReactNode, useCallback, useMemo } from 'react'; import { orderBy } from 'lodash'; import { EuiFlexGroup, @@ -20,14 +20,13 @@ import { EuiModalBody, EuiModalHeaderTitle, EuiLink, - EuiText, EuiSpacer, - EuiBetaBadge, - EuiTitle, EuiDescriptionListTitle, EuiDescriptionListDescription, EuiDescriptionList, - EuiBadge, + EuiTabs, + EuiTab, + EuiIconTip, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { DocLinksStart } from '@kbn/core/public'; @@ -36,162 +35,210 @@ import { VisGroups } from '../../vis_types/vis_groups_enum'; import type { VisTypeAlias } from '../../vis_types/vis_type_alias_registry'; import './group_selection.scss'; -interface GroupSelectionProps { +export interface GroupSelectionProps { onVisTypeSelected: (visType: BaseVisType | VisTypeAlias) => void; visTypesRegistry: TypesStart; docLinks: DocLinksStart; - toggleGroups: (flag: boolean) => void; - showExperimental: boolean; + showMainDialog: (flag: boolean) => void; + tab: 'recommended' | 'legacy'; + setTab: (tab: 'recommended' | 'legacy') => void; } interface VisCardProps { onVisTypeSelected: (visType: BaseVisType | VisTypeAlias) => void; visType: BaseVisType | VisTypeAlias; - showExperimental?: boolean | undefined; + shouldStretch?: boolean; } -function GroupSelection(props: GroupSelectionProps) { +const tabs: Array<{ id: 'recommended' | 'legacy'; label: ReactNode; dataTestSubj: string }> = [ + { + id: 'recommended', + label: i18n.translate('visualizations.newVisWizard.recommendedTab', { + defaultMessage: 'Recommended', + }), + dataTestSubj: 'groupModalRecommendedTab', + }, + { + id: 'legacy', + dataTestSubj: 'groupModalLegacyTab', + label: ( + + + {i18n.translate('visualizations.newVisWizard.legacyTab', { + defaultMessage: 'Legacy', + })} + + + + + + + ), + }, +]; + +const getVisTypesFromGroup = ( + visTypesRegistry: TypesStart, + group: VisGroups +): Array => { + return visTypesRegistry.getByGroup(group).filter(({ disableCreate }) => !disableCreate); +}; + +function GroupSelection({ + tab = 'recommended', + setTab, + visTypesRegistry, + ...props +}: GroupSelectionProps) { const visualizeGuideLink = props.docLinks.links.dashboard.guide; const promotedVisGroups = useMemo( () => orderBy( [ - ...props.visTypesRegistry.getAliases(), - ...props.visTypesRegistry.getByGroup(VisGroups.PROMOTED), - // Include so TSVB still gets displayed - ...props.visTypesRegistry.getByGroup(VisGroups.LEGACY), + ...visTypesRegistry.getAliases(), + ...visTypesRegistry.getByGroup(VisGroups.PROMOTED), ].filter((visDefinition) => { return !visDefinition.disableCreate; }), ['promotion', 'title'], ['asc', 'asc'] ), - [props.visTypesRegistry] + [visTypesRegistry] ); + const aggBasedTypes = getVisTypesFromGroup(visTypesRegistry, VisGroups.AGGBASED); + const legacyTypes = getVisTypesFromGroup(visTypesRegistry, VisGroups.LEGACY); + + const shouldDisplayLegacyTab = legacyTypes.length + aggBasedTypes.length; + + const [tsvbProps] = legacyTypes.map((visType) => ({ + visType: { + ...visType, + icon: visType.name === 'metrics' ? 'visualizeApp' : (visType.icon as string), + }, + onVisTypeSelected: props.onVisTypeSelected, + key: visType.name, + })); + return ( <> + {shouldDisplayLegacyTab && ( +
+ + {tabs.map((t) => ( + setTab(t.id)} + key={t.id} + > + {t.label} + + ))} + +
+ )} +
- - {promotedVisGroups.map((visType) => ( - - ))} - - -
-
- - - {props.visTypesRegistry.getByGroup(VisGroups.AGGBASED).filter((visDefinition) => { - return !visDefinition.disableCreate; - }).length > 0 && ( - - props.toggleGroups(false)} - title={ - - {i18n.translate('visualizations.newVisWizard.aggBasedGroupTitle', { - defaultMessage: 'Aggregation based', - })} - - } - data-test-subj="visGroup-aggbased" - description={i18n.translate( - 'visualizations.newVisWizard.aggBasedGroupDescription', - { - defaultMessage: - 'Use our classic visualize library to create charts based on aggregations.', - } - )} - icon={} - > - props.toggleGroups(false)} - > - - {i18n.translate('visualizations.newVisWizard.exploreOptionLinkText', { - defaultMessage: 'Explore options', - })}{' '} - - - - - - )} - {props.visTypesRegistry.getByGroup(VisGroups.TOOLS).length > 0 && ( - - - - - {i18n.translate('visualizations.newVisWizard.toolsGroupTitle', { - defaultMessage: 'Tools', - })} - - - -
- {props.visTypesRegistry.getByGroup(VisGroups.TOOLS).map((visType) => ( - - ))} -
-
- )} -
- - - - - - - - + {promotedVisGroups.map((visType) => ( + - - - + ))} + + ) : ( + + {tsvbProps ? : null} + { + { + props.showMainDialog(false); + }} + /> + } + + )} + +
+ +
); } -const VisGroup = ({ visType, onVisTypeSelected }: VisCardProps) => { +const ModalFooter = ({ visualizeGuideLink }: { visualizeGuideLink: string }) => { + return ( +
+ + + + + + + + + + + +
+ ); +}; + +const VisGroup = ({ visType, onVisTypeSelected, shouldStretch = false }: VisCardProps) => { const onClick = useCallback(() => { onVisTypeSelected(visType); }, [onVisTypeSelected, visType]); return ( - + { } layout="horizontal" - icon={} + icon={} /> ); }; -const ToolsGroup = ({ visType, onVisTypeSelected, showExperimental }: VisCardProps) => { - const onClick = useCallback(() => { - onVisTypeSelected(visType); - }, [onVisTypeSelected, visType]); - // hide both the hidden visualizations and, if lab mode is not enabled, the experimental visualizations - // TODO: Remove the showExperimental logic as part of https://github.com/elastic/kibana/issues/152833 - if (visType.disableCreate || (!showExperimental && visType.stage === 'experimental')) { - return null; - } - return ( - - - - - - - - - {'titleInWizard' in visType && visType.titleInWizard - ? visType.titleInWizard - : visType.title} - - - {visType.stage === 'experimental' && !visType.isDeprecated ? ( - - - - ) : ( - visType.isDeprecated && ( - - - - - - ) - )} - - - {visType.description} - - - - ); -}; - export { GroupSelection }; diff --git a/src/plugins/visualizations/public/wizard/new_vis_modal.test.tsx b/src/plugins/visualizations/public/wizard/new_vis_modal.test.tsx index 0451d606060da..adf36745b991b 100644 --- a/src/plugins/visualizations/public/wizard/new_vis_modal.test.tsx +++ b/src/plugins/visualizations/public/wizard/new_vis_modal.test.tsx @@ -8,13 +8,15 @@ */ import React from 'react'; -import { mountWithIntl } from '@kbn/test-jest-helpers'; import { TypesStart, VisGroups, BaseVisType } from '../vis_types'; -import NewVisModal from './new_vis_modal'; +import NewVisModal, { TypeSelectionProps } from './new_vis_modal'; import { ApplicationStart, DocLinksStart } from '@kbn/core/public'; import { embeddablePluginMock } from '@kbn/embeddable-plugin/public/mocks'; import { contentManagementMock } from '@kbn/content-management-plugin/public/mocks'; import { VisParams } from '../../common'; +import { render, screen } from '@testing-library/react'; +import { I18nProvider } from '@kbn/i18n-react'; +import userEvent from '@testing-library/user-event'; describe('NewVisModal', () => { const defaultVisTypeParams = { @@ -96,58 +98,9 @@ describe('NewVisModal', () => { jest.clearAllMocks(); }); - it('should show the aggbased group but not the visualization assigned to this group', () => { - const wrapper = mountWithIntl( - null} - visTypesRegistry={visTypes} - addBasePath={addBasePath} - uiSettings={uiSettings} - application={{} as ApplicationStart} - docLinks={docLinks as DocLinksStart} - contentClient={contentManagement.client} - /> - ); - expect(wrapper.find('[data-test-subj="visGroup-aggbased"]').exists()).toBe(true); - expect(wrapper.find('[data-test-subj="visType-visWithSearch"]').exists()).toBe(false); - }); - - it('should show the tools group', () => { - const wrapper = mountWithIntl( - null} - visTypesRegistry={visTypes} - addBasePath={addBasePath} - uiSettings={uiSettings} - application={{} as ApplicationStart} - docLinks={docLinks as DocLinksStart} - contentClient={contentManagement.client} - /> - ); - expect(wrapper.find('[data-test-subj="visGroup-tools"]').exists()).toBe(true); - }); - - it('should display the visualizations of the other group', () => { - const wrapper = mountWithIntl( - null} - visTypesRegistry={visTypes} - addBasePath={addBasePath} - uiSettings={uiSettings} - application={{} as ApplicationStart} - docLinks={docLinks as DocLinksStart} - contentClient={contentManagement.client} - /> - ); - expect(wrapper.find('[data-test-subj="visType-vis2"]').exists()).toBe(true); - }); - - describe('open editor', () => { - it('should open the editor for visualizations without search', () => { - const wrapper = mountWithIntl( + const renderNewVisModal = (propsOverrides?: Partial) => { + return render( + null} @@ -157,55 +110,55 @@ describe('NewVisModal', () => { application={{} as ApplicationStart} docLinks={docLinks as DocLinksStart} contentClient={contentManagement.client} + {...propsOverrides} /> - ); - const visCard = wrapper.find('[data-test-subj="visType-vis"]').last(); - visCard.simulate('click'); + + ); + }; + + it('should show the aggbased group but not the visualization assigned to this group', async () => { + renderNewVisModal(); + expect(screen.queryByText('Aggregation-based')).not.toBeInTheDocument(); + expect(screen.queryByText('Vis with search')).not.toBeInTheDocument(); + await userEvent.click(screen.getByRole('tab', { name: /Legacy/i })); + expect(screen.queryByText('Aggregation-based')).toBeInTheDocument(); + expect(screen.queryByText('Vis with search')).not.toBeInTheDocument(); + }); + + it('should display the visualizations of the other group', () => { + renderNewVisModal(); + expect(screen.queryByText('Vis Type 2')).toBeInTheDocument(); + }); + + describe('open editor', () => { + it('should open the editor for visualizations without search', async () => { + renderNewVisModal(); + await userEvent.click(screen.getByText('Vis Type 1')); expect(window.location.assign).toBeCalledWith('testbasepath/app/visualize#/create?type=vis'); }); - it('passes through editor params to the editor URL', () => { - const wrapper = mountWithIntl( - null} - visTypesRegistry={visTypes} - editorParams={['foo=true', 'bar=42']} - addBasePath={addBasePath} - uiSettings={uiSettings} - application={{} as ApplicationStart} - docLinks={docLinks as DocLinksStart} - contentClient={contentManagement.client} - /> - ); - const visCard = wrapper.find('[data-test-subj="visType-vis"]').last(); - visCard.simulate('click'); + it('passes through editor params to the editor URL', async () => { + renderNewVisModal({ + editorParams: ['foo=true', 'bar=42'], + }); + await userEvent.click(screen.getByText('Vis Type 1')); expect(window.location.assign).toBeCalledWith( 'testbasepath/app/visualize#/create?type=vis&foo=true&bar=42' ); }); - it('closes and redirects properly if visualization with alias.path and originatingApp in props', () => { + it('closes and redirects properly if visualization with alias.path and originatingApp in props', async () => { const onClose = jest.fn(); const navigateToApp = jest.fn(); const stateTransfer = embeddablePluginMock.createStartContract().getStateTransfer(); - const wrapper = mountWithIntl( - - ); - const visCard = wrapper.find('[data-test-subj="visType-visWithAliasUrl"]').last(); - visCard.simulate('click'); + renderNewVisModal({ + editorParams: ['foo=true', 'bar=42'], + onClose, + application: { navigateToApp } as unknown as ApplicationStart, + originatingApp: 'coolJestTestApp', + stateTransfer, + }); + await userEvent.click(screen.getByText('Vis with alias Url')); expect(stateTransfer.navigateToEditor).toBeCalledWith('otherApp', { path: '#/aliasUrl', state: { originatingApp: 'coolJestTestApp' }, @@ -213,48 +166,28 @@ describe('NewVisModal', () => { expect(onClose).toHaveBeenCalled(); }); - it('closes and redirects properly if visualization with aliasApp and without originatingApp in props', () => { + it('closes and redirects properly if visualization with aliasApp and without originatingApp in props', async () => { const onClose = jest.fn(); const navigateToApp = jest.fn(); - const wrapper = mountWithIntl( - - ); - const visCard = wrapper.find('[data-test-subj="visType-visWithAliasUrl"]').last(); - visCard.simulate('click'); + + renderNewVisModal({ + editorParams: ['foo=true', 'bar=42'], + onClose, + application: { navigateToApp } as unknown as ApplicationStart, + }); + await userEvent.click(screen.getByText('Vis with alias Url')); expect(navigateToApp).toBeCalledWith('otherApp', { path: '#/aliasUrl' }); expect(onClose).toHaveBeenCalled(); }); }); describe('aggBased visualizations', () => { - it('should render as expected', () => { - const wrapper = mountWithIntl( - null} - visTypesRegistry={visTypes} - addBasePath={addBasePath} - uiSettings={uiSettings} - application={{} as ApplicationStart} - docLinks={docLinks as DocLinksStart} - contentClient={contentManagement.client} - /> - ); - const aggBasedGroupCard = wrapper - .find('[data-test-subj="visGroupAggBasedExploreLink"]') - .last(); - aggBasedGroupCard.simulate('click'); - expect(wrapper.find('[data-test-subj="visType-visWithSearch"]').exists()).toBe(true); + it('should render as expected', async () => { + renderNewVisModal(); + await userEvent.click(screen.getByRole('tab', { name: /Legacy/i })); + expect(screen.queryByText('Aggregation-based')).toBeInTheDocument(); + await userEvent.click(screen.getByText('Aggregation-based')); + expect(screen.queryByText('Vis with search')).toBeInTheDocument(); }); }); }); diff --git a/src/plugins/visualizations/public/wizard/new_vis_modal.tsx b/src/plugins/visualizations/public/wizard/new_vis_modal.tsx index 2b8ea96eb4300..12fa7e1a9954d 100644 --- a/src/plugins/visualizations/public/wizard/new_vis_modal.tsx +++ b/src/plugins/visualizations/public/wizard/new_vis_modal.tsx @@ -22,7 +22,7 @@ import { AggBasedSelection } from './agg_based_selection'; import type { TypesStart, BaseVisType, VisTypeAlias } from '../vis_types'; import './dialog.scss'; -interface TypeSelectionProps { +export interface TypeSelectionProps { contentClient: ContentClient; isOpen: boolean; onClose: () => void; @@ -41,8 +41,9 @@ interface TypeSelectionProps { interface TypeSelectionState { showSearchVisModal: boolean; - showGroups: boolean; + isMainDialogShown: boolean; visType?: BaseVisType; + tab: 'recommended' | 'legacy'; } // TODO: redirect logic is specific to visualise & dashboard @@ -64,11 +65,16 @@ class NewVisModal extends React.Component { + this.setState({ tab }); + }; + public render() { if (!this.props.isOpen) { return null; @@ -82,7 +88,7 @@ class NewVisModal extends React.Component this.setState({ showGroups: flag })} + setTab={this.setTab} + tab={this.state.tab} + showMainDialog={(shouldMainBeShown: boolean) => { + this.setState({ isMainDialogShown: shouldMainBeShown }); + if (shouldMainBeShown) { + this.setTab('legacy'); + } + }} openedAsRoot={this.props.showAggsSelection && !this.props.selectedVisType} /> diff --git a/test/functional/apps/dashboard/group1/edit_visualizations.js b/test/functional/apps/dashboard/group1/edit_visualizations.js index decd7441e1d45..f065748f09b00 100644 --- a/test/functional/apps/dashboard/group1/edit_visualizations.js +++ b/test/functional/apps/dashboard/group1/edit_visualizations.js @@ -191,7 +191,7 @@ export default function ({ getService, getPageObjects }) { it('should lose its connection to the dashboard when creating new visualization', async () => { await visualize.gotoVisualizationLandingPage(); await visualize.clickNewVisualization(); - await visualize.clickMarkdownWidget(); + await visualize.clickVisualBuilder(); await visualize.notLinkedToOriginatingApp(); // return to origin should not be present in save modal diff --git a/test/functional/apps/dashboard/group5/legacy_urls.ts b/test/functional/apps/dashboard/group5/legacy_urls.ts index 62ae63baa8fc8..0056817f3465f 100644 --- a/test/functional/apps/dashboard/group5/legacy_urls.ts +++ b/test/functional/apps/dashboard/group5/legacy_urls.ts @@ -86,13 +86,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('resolves markdown link', async () => { - await visualize.navigateToNewVisualization(); - await visualize.clickMarkdownWidget(); + await dashboard.gotoDashboardLandingPage(); + await dashboard.clickNewDashboard(); + await dashboardAddPanel.clickMarkdownQuickButton(); await visEditor.setMarkdownTxt(`[abc](#/dashboard/${testDashboardId})`); await visEditor.clickGo(); - - await visualize.saveVisualizationExpectSuccess('legacy url markdown'); - + await visualize.saveVisualization('legacy url markdown', { redirectToOrigin: true }); await (await find.byLinkText('abc')).click(); await header.waitUntilLoadingHasFinished(); diff --git a/test/functional/apps/dashboard_elements/markdown/_markdown_vis.ts b/test/functional/apps/dashboard_elements/markdown/_markdown_vis.ts index 18402669293f7..33386a5cb6862 100644 --- a/test/functional/apps/dashboard_elements/markdown/_markdown_vis.ts +++ b/test/functional/apps/dashboard_elements/markdown/_markdown_vis.ts @@ -12,25 +12,26 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { visualize, visEditor, visChart, header } = getPageObjects([ - 'visualize', + const { visEditor, visChart, header, dashboard } = getPageObjects([ + 'dashboard', 'visEditor', 'visChart', 'header', ]); const find = getService('find'); const inspector = getService('inspector'); + const dashboardAddPanel = getService('dashboardAddPanel'); const markdown = ` # Heading 1

Inline HTML that should not be rendered as html

`; - describe('markdown app in visualize app', () => { + describe('markdown app', () => { before(async function () { - await visualize.initTests(); - await visualize.navigateToNewVisualization(); - await visualize.clickMarkdownWidget(); + await dashboard.initTests(); + await dashboard.clickNewDashboard(); + await dashboardAddPanel.clickMarkdownQuickButton(); await visEditor.setMarkdownTxt(markdown); await visEditor.clickGo(); }); diff --git a/test/functional/apps/visualize/group1/_chart_types.ts b/test/functional/apps/visualize/group1/_chart_types.ts index 5b38fb26173b0..a8f5b7294382a 100644 --- a/test/functional/apps/visualize/group1/_chart_types.ts +++ b/test/functional/apps/visualize/group1/_chart_types.ts @@ -22,14 +22,18 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visualize.navigateToNewVisualization(); }); - it('should show the promoted vis types for the first step', async function () { - const expectedChartTypes = ['Custom visualization', 'Lens', 'Maps', 'TSVB']; + it('should show the expected visualizations types for both recommended and legacy tabs', async function () { + const expectedRecommendedChartTypes = ['Custom visualization', 'Lens', 'Maps']; + const expectedLegacyChartTypes = ['Aggregation-based', 'TSVB']; // find all the chart types and make sure there all there - const chartTypes = (await visualize.getPromotedVisTypes()).sort(); + const chartTypes = await visualize.getVisibleVisTypes(); log.debug('returned chart types = ' + chartTypes); - log.debug('expected chart types = ' + expectedChartTypes); - expect(chartTypes).to.eql(expectedChartTypes); + log.debug('expected chart types = ' + expectedRecommendedChartTypes); + expect(chartTypes).to.eql(expectedRecommendedChartTypes); + await visualize.clickLegacyTab(); + const legacyChartTypes = await visualize.getVisibleVisTypes(); + expect(legacyChartTypes).to.eql(expectedLegacyChartTypes); }); it('should show the correct agg based chart types', async function () { diff --git a/test/functional/apps/visualize/group3/_visualize_listing.ts b/test/functional/apps/visualize/group3/_visualize_listing.ts index 7cb1b7b4b51be..19fba122b4cad 100644 --- a/test/functional/apps/visualize/group3/_visualize_listing.ts +++ b/test/functional/apps/visualize/group3/_visualize_listing.ts @@ -10,7 +10,7 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const { visualize, visEditor } = getPageObjects(['visualize', 'visEditor']); + const { visualize, visualBuilder } = getPageObjects(['visualize', 'visualBuilder']); const listingTable = getService('listingTable'); describe('visualize listing page', function describeIndexTests() { @@ -24,18 +24,18 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('create new viz', async function () { - // type markdown is used for simplicity - await visualize.createSimpleMarkdownViz(vizName); + // type tsvb is used for simplicity + await visualize.createSimpleTSVBViz(vizName); await visualize.gotoVisualizationLandingPage(); await listingTable.expectItemsCount('visualize', 1); }); it('delete all viz', async function () { - await visualize.createSimpleMarkdownViz(vizName + '1'); + await visualize.createSimpleTSVBViz(vizName + '1'); await visualize.gotoVisualizationLandingPage(); await listingTable.expectItemsCount('visualize', 2); - await visualize.createSimpleMarkdownViz(vizName + '2'); + await visualize.createSimpleTSVBViz(vizName + '2'); await visualize.gotoVisualizationLandingPage(); await listingTable.expectItemsCount('visualize', 3); @@ -48,9 +48,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { before(async function () { // create one new viz await visualize.navigateToNewVisualization(); - await visualize.clickMarkdownWidget(); - await visEditor.setMarkdownTxt('HELLO'); - await visEditor.clickGo(); + await visualize.clickVisualBuilder(); + await visualBuilder.checkVisualBuilderIsPresent(); await visualize.saveVisualization('Hello World'); await visualize.gotoVisualizationLandingPage(); }); diff --git a/test/functional/page_objects/visualize_page.ts b/test/functional/page_objects/visualize_page.ts index 64f6858a1f759..1f6c9cc11c474 100644 --- a/test/functional/page_objects/visualize_page.ts +++ b/test/functional/page_objects/visualize_page.ts @@ -41,7 +41,6 @@ export class VisualizePageObject extends FtrService { private readonly elasticChart = this.ctx.getService('elasticChart'); private readonly common = this.ctx.getPageObject('common'); private readonly header = this.ctx.getPageObject('header'); - private readonly visEditor = this.ctx.getPageObject('visEditor'); private readonly visChart = this.ctx.getPageObject('visChart'); private readonly toasts = this.ctx.getService('toasts'); @@ -106,7 +105,8 @@ export class VisualizePageObject extends FtrService { } public async clickAggBasedVisualizations() { - await this.testSubjects.click('visGroupAggBasedExploreLink'); + await this.clickLegacyTab(); + await this.testSubjects.click('visType-aggbased'); } public async goBackToGroups() { @@ -125,7 +125,7 @@ export class VisualizePageObject extends FtrService { .map((chart) => $(chart).findTestSubject('visTypeTitle').text().trim()); } - public async getPromotedVisTypes() { + public async getVisibleVisTypes() { const chartTypeField = await this.testSubjects.find('visNewDialogGroups'); const $ = await chartTypeField.parseDomContent(); const promotedVisTypes: string[] = []; @@ -137,7 +137,7 @@ export class VisualizePageObject extends FtrService { promotedVisTypes.push(title); } }); - return promotedVisTypes; + return promotedVisTypes.sort(); } public async waitForVisualizationSelectPage() { @@ -221,8 +221,8 @@ export class VisualizePageObject extends FtrService { await this.clickVisType('line'); } - public async clickMarkdownWidget() { - await this.clickVisType('markdown'); + public async clickLegacyTab() { + await this.testSubjects.click('groupModalLegacyTab'); } public async clickMetric() { @@ -254,6 +254,7 @@ export class VisualizePageObject extends FtrService { } public async clickVisualBuilder() { + await this.clickLegacyTab(); await this.clickVisType('metrics'); } @@ -281,12 +282,10 @@ export class VisualizePageObject extends FtrService { return await this.hasVisType('maps'); } - public async createSimpleMarkdownViz(vizName: string) { + public async createSimpleTSVBViz(vizName: string) { await this.gotoVisualizationLandingPage(); await this.navigateToNewVisualization(); - await this.clickMarkdownWidget(); - await this.visEditor.setMarkdownTxt(vizName); - await this.visEditor.clickGo(); + await this.clickVisualBuilder(); await this.saveVisualization(vizName); } diff --git a/x-pack/plugins/lens/public/vis_type_alias.ts b/x-pack/plugins/lens/public/vis_type_alias.ts index 90d1df663d3e4..5f08ce1b9ced6 100644 --- a/x-pack/plugins/lens/public/vis_type_alias.ts +++ b/x-pack/plugins/lens/public/vis_type_alias.ts @@ -22,10 +22,7 @@ export const getLensAliasConfig = (): VisTypeAlias => ({ }), description: i18n.translate('xpack.lens.visTypeAlias.description', { defaultMessage: - 'Create visualizations with our drag and drop editor. Switch between visualization types at any time.', - }), - note: i18n.translate('xpack.lens.visTypeAlias.note', { - defaultMessage: 'Recommended for most users.', + 'Create visualizations using an intuitive drag-and-drop interface. Smart suggestions help you follow best practices and find the chart types that best match your data.', }), order: 60, icon: 'lensApp', diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 61d08b0c81a3b..0e7b40b66924b 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -8261,8 +8261,6 @@ "visTypeMarkdown.function.help": "Visualisation Markdown", "visTypeMarkdown.function.markdown.help": "Markdown à rendre", "visTypeMarkdown.function.openLinksInNewTab.help": "Ouvre les liens dans un nouvel onglet", - "visTypeMarkdown.markdownDescription": "Ajoutez du texte et des images à votre tableau de bord.", - "visTypeMarkdown.markdownTitleInWizard": "Texte", "visTypeMarkdown.params.fontSizeLabel": "Taille de police de base en points", "visTypeMarkdown.params.helpLinkLabel": "Aide", "visTypeMarkdown.params.openLinksLabel": "Ouvrir les liens dans un nouvel onglet", @@ -8591,7 +8589,6 @@ "visTypeTimeseries.indexPatternSelect.switchModePopover.title": "Mode de vue de données", "visTypeTimeseries.indexPatternSelect.switchModePopover.useKibanaIndices": "Utiliser des vues de données Kibana", "visTypeTimeseries.indexPatternSelect.updateIndex": "Mettre à jour la visualisation avec la vue de données saisie", - "visTypeTimeseries.kbnVisTypes.metricsDescription": "Réalisez des analyses avancées de vos données temporelles.", "visTypeTimeseries.kbnVisTypes.metricsTitle": "TSVB", "visTypeTimeseries.lastValueModeIndicator.lastBucketDate": "Compartiment : {lastBucketDate}", "visTypeTimeseries.lastValueModeIndicator.lastValue": "Dernière valeur", @@ -8969,7 +8966,6 @@ "visTypeVega.mapView.resettingPropertyToMaxValueWarningMessage": "Réinitialisation de {name} sur {max}", "visTypeVega.mapView.resettingPropertyToMinValueWarningMessage": "Réinitialisation de {name} sur {min}", "visTypeVega.type.vegaDescription": "Utilisez Vega pour créer de nouveaux types de visualisations.", - "visTypeVega.type.vegaNote": "Requiert une connaissance de la syntaxe Vega.", "visTypeVega.type.vegaTitleInWizard": "Visualisation personnalisée", "visTypeVega.urlParser.dataUrlRequiresUrlParameterInFormErrorMessage": "{dataUrlParam} requiert un paramètre {urlParam} sous la forme \"{formLink}\"", "visTypeVega.urlParser.urlShouldHaveQuerySubObjectWarningMessage": "L'utilisation d'un {urlObject} requiert un sous-objet {subObjectName}", @@ -9154,7 +9150,6 @@ "visualizations.createVisualization.noIndexPatternOrSavedSearchIdErrorMessage": "Vous devez fournir un indexPattern ou un savedSearchId", "visualizations.createVisualization.noVisTypeErrorMessage": "Vous devez fournir un type de visualisation valide", "visualizations.dataView.label": "Vue de données", - "visualizations.deprecatedTag": "Déclassé", "visualizations.displayName": "visualisation", "visualizations.editor.createBreadcrumb": "Créer", "visualizations.editor.defaultEditBreadcrumbText": "Modifier la visualisation", @@ -9206,24 +9201,16 @@ "visualizations.newChart.libraryMode.new": "nouveau", "visualizations.newChart.libraryMode.old": "âge", "visualizations.newGaugeChart.notificationMessage": "La nouvelle bibliothèque de graphiques de jauge ne prend pas encore en charge l'agrégation de graphiques fractionnés. {conditionalMessage}", - "visualizations.newVisWizard.aggBasedGroupDescription": "Utilisez notre bibliothèque Visualize classique pour créer des graphiques basés sur des agrégations.", - "visualizations.newVisWizard.aggBasedGroupTitle": "Basé sur une agrégation", "visualizations.newVisWizard.chooseSourceTitle": "Choisir une source", - "visualizations.newVisWizard.experimentalTitle": "Version d'évaluation technique", - "visualizations.newVisWizard.experimentalTooltip": "Cette fonctionnalité est en version d'évaluation technique et pourra être modifiée ou retirée complètement dans une future version. Elastic s'efforcera de corriger tout problème, mais les fonctionnalités des versions d'évaluation technique ne sont pas soumises aux SLA de support des fonctionnalités officielles en disponibilité générale.", - "visualizations.newVisWizard.exploreOptionLinkText": "Explorer les options", "visualizations.newVisWizard.filterVisTypeAriaLabel": "Filtrer un type de visualisation", "visualizations.newVisWizard.goBackLink": "Sélectionner une visualisation différente", "visualizations.newVisWizard.helpTextAriaLabel": "Commencez à créer votre visualisation en sélectionnant un type pour cette visualisation. Appuyez sur Échap pour fermer ce mode. Appuyez sur Tab pour aller plus loin.", "visualizations.newVisWizard.learnMoreText": "Envie d'en savoir plus ?", "visualizations.newVisWizard.newVisTypeTitle": "Nouveau {visTypeName}", - "visualizations.newVisWizard.readDocumentationLink": "Lire la documentation", "visualizations.newVisWizard.resultsFound": "{resultCount, plural, one {type trouvé} other {types trouvés}}", "visualizations.newVisWizard.searchSelection.notFoundLabel": "Aucun recherche enregistrée ni aucun index correspondants n'ont été trouvés.", "visualizations.newVisWizard.searchSelection.savedObjectType.dataView": "Vue de données", "visualizations.newVisWizard.searchSelection.savedObjectType.search": "Recherche enregistrée", - "visualizations.newVisWizard.title": "Nouvelle visualisation", - "visualizations.newVisWizard.toolsGroupTitle": "Outils", "visualizations.noDataView.label": "vue de données", "visualizations.noMatchRoute.bannerText": "L'application Visualize ne reconnaît pas cet itinéraire : {route}.", "visualizations.noMatchRoute.bannerTitleText": "Page introuvable", @@ -25772,8 +25759,6 @@ "xpack.lens.uniqueLabel": "{label} [{num}]", "xpack.lens.unknownDatasourceType.shortMessage": "Type de source de données inconnu", "xpack.lens.unknownVisType.shortMessage": "Type de visualisation inconnu", - "xpack.lens.visTypeAlias.description": "Créez des visualisations avec notre éditeur de glisser-déposer. Basculez entre les différents types de visualisation à tout moment.", - "xpack.lens.visTypeAlias.note": "Recommandé pour la plupart des utilisateurs.", "xpack.lens.visTypeAlias.title": "Lens", "xpack.lens.visTypeAlias.type": "Lens", "xpack.lens.visualizeAggBasedLegend": "Visualiser le graphique basé sur une agrégation", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 61ad6c58ea44c..f3d9422842083 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -8015,8 +8015,6 @@ "visTypeMarkdown.function.help": "マークダウンビジュアライゼーション", "visTypeMarkdown.function.markdown.help": "レンダリングするマークダウン", "visTypeMarkdown.function.openLinksInNewTab.help": "新規タブでリンクを開きます", - "visTypeMarkdown.markdownDescription": "テキストと画像をダッシュボードに追加します。", - "visTypeMarkdown.markdownTitleInWizard": "Text", "visTypeMarkdown.params.fontSizeLabel": "ポイント単位のベースフォントサイズです。", "visTypeMarkdown.params.helpLinkLabel": "ヘルプ", "visTypeMarkdown.params.openLinksLabel": "新規タブでリンクを開く", @@ -8345,7 +8343,6 @@ "visTypeTimeseries.indexPatternSelect.switchModePopover.title": "データビューモード", "visTypeTimeseries.indexPatternSelect.switchModePopover.useKibanaIndices": "Kibanaデータビューを使用", "visTypeTimeseries.indexPatternSelect.updateIndex": "入力したデータビューで可視化を更新", - "visTypeTimeseries.kbnVisTypes.metricsDescription": "時系列データの高度な分析を実行します。", "visTypeTimeseries.kbnVisTypes.metricsTitle": "TSVB", "visTypeTimeseries.lastValueModeIndicator.lastBucketDate": "バケット:{lastBucketDate}", "visTypeTimeseries.lastValueModeIndicator.lastValue": "最終値", @@ -8722,7 +8719,6 @@ "visTypeVega.mapView.resettingPropertyToMaxValueWarningMessage": "{name} を {max} にリセットしています", "visTypeVega.mapView.resettingPropertyToMinValueWarningMessage": "{name} を {min} にリセットしています", "visTypeVega.type.vegaDescription": "Vega を使用して、新しいタイプのビジュアライゼーションを作成します。", - "visTypeVega.type.vegaNote": "Vega 構文の知識が必要です。", "visTypeVega.type.vegaTitleInWizard": "カスタムビジュアライゼーション", "visTypeVega.urlParser.dataUrlRequiresUrlParameterInFormErrorMessage": "{dataUrlParam} には「{formLink}」の形で {urlParam} パラメーターが必要です", "visTypeVega.urlParser.urlShouldHaveQuerySubObjectWarningMessage": "{urlObject} を使用するには {subObjectName} サブオブジェクトが必要です", @@ -8907,7 +8903,6 @@ "visualizations.createVisualization.noIndexPatternOrSavedSearchIdErrorMessage": "indexPatternまたはsavedSearchIdが必要です", "visualizations.createVisualization.noVisTypeErrorMessage": "有効なビジュアライゼーションタイプを指定してください", "visualizations.dataView.label": "データビュー", - "visualizations.deprecatedTag": "非推奨", "visualizations.displayName": "ビジュアライゼーション", "visualizations.editor.createBreadcrumb": "作成", "visualizations.editor.defaultEditBreadcrumbText": "ビジュアライゼーションを編集", @@ -8959,24 +8954,16 @@ "visualizations.newChart.libraryMode.new": "新規", "visualizations.newChart.libraryMode.old": "古", "visualizations.newGaugeChart.notificationMessage": "新しいゲージグラフライブラリはまだ分割グラフアグリゲーションをサポートしていません。{conditionalMessage}", - "visualizations.newVisWizard.aggBasedGroupDescription": "クラシック Visualize ライブラリを使用して、アグリゲーションに基づいてグラフを作成します。", - "visualizations.newVisWizard.aggBasedGroupTitle": "アグリゲーションに基づく", "visualizations.newVisWizard.chooseSourceTitle": "ソースの選択", - "visualizations.newVisWizard.experimentalTitle": "テクニカルプレビュー", - "visualizations.newVisWizard.experimentalTooltip": "この機能はテクニカルプレビュー中であり、将来のリリースでは変更されたり完全に削除されたりする場合があります。Elasticはすべての問題の修正に努めますが、テクニカルプレビュー中の機能には正式なGA機能のサポートSLAが適用されません。", - "visualizations.newVisWizard.exploreOptionLinkText": "探索オプション", "visualizations.newVisWizard.filterVisTypeAriaLabel": "ビジュアライゼーションのタイプでフィルタリング", "visualizations.newVisWizard.goBackLink": "別のビジュアライゼーションを選択", "visualizations.newVisWizard.helpTextAriaLabel": "タイプを選択してビジュアライゼーションの作成を始めましょう。ESC を押してこのモーダルを閉じます。Tab キーを押して次に進みます。", "visualizations.newVisWizard.learnMoreText": "詳細について", "visualizations.newVisWizard.newVisTypeTitle": "新規 {visTypeName}", - "visualizations.newVisWizard.readDocumentationLink": "ドキュメンテーションを表示", "visualizations.newVisWizard.resultsFound": "{resultCount, plural, other {個のタイプ}} が見つかりました", "visualizations.newVisWizard.searchSelection.notFoundLabel": "一致インデックスまたは保存した検索が見つかりません。", "visualizations.newVisWizard.searchSelection.savedObjectType.dataView": "データビュー", "visualizations.newVisWizard.searchSelection.savedObjectType.search": "保存検索", - "visualizations.newVisWizard.title": "新規ビジュアライゼーション", - "visualizations.newVisWizard.toolsGroupTitle": "ツール", "visualizations.noDataView.label": "データビュー", "visualizations.noMatchRoute.bannerText": "Visualizeアプリケーションはこのルートを認識できません。{route}", "visualizations.noMatchRoute.bannerTitleText": "ページが見つかりません", @@ -25520,8 +25507,6 @@ "xpack.lens.unknownDatasourceType.shortMessage": "不明なデータソースタイプ", "xpack.lens.unknownVisType.longMessage": "ビジュアライゼーションタイプ{visType}を解決できませんでした。", "xpack.lens.unknownVisType.shortMessage": "不明なビジュアライゼーションタイプ", - "xpack.lens.visTypeAlias.description": "ドラッグアンドドロップエディターでビジュアライゼーションを作成します。いつでもビジュアライゼーションタイプを切り替えることができます。", - "xpack.lens.visTypeAlias.note": "ほとんどのユーザーに推奨されます。", "xpack.lens.visTypeAlias.title": "Lens", "xpack.lens.visTypeAlias.type": "Lens", "xpack.lens.visualizeAggBasedLegend": "集約に基づくグラフを可視化", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 22061c2c36715..48712e7f2fb69 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -8031,8 +8031,6 @@ "visTypeMarkdown.function.help": "Markdown 可视化", "visTypeMarkdown.function.markdown.help": "要渲染的 Markdown", "visTypeMarkdown.function.openLinksInNewTab.help": "在新标签页中打开链接", - "visTypeMarkdown.markdownDescription": "将文本和图像添加到仪表板。", - "visTypeMarkdown.markdownTitleInWizard": "文本", "visTypeMarkdown.params.fontSizeLabel": "基础字体大小(磅)", "visTypeMarkdown.params.helpLinkLabel": "帮助", "visTypeMarkdown.params.openLinksLabel": "在新标签页中打开链接", @@ -8361,7 +8359,6 @@ "visTypeTimeseries.indexPatternSelect.switchModePopover.title": "数据视图模式", "visTypeTimeseries.indexPatternSelect.switchModePopover.useKibanaIndices": "使用 Kibana 数据视图", "visTypeTimeseries.indexPatternSelect.updateIndex": "使用输入的数据视图更新可视化", - "visTypeTimeseries.kbnVisTypes.metricsDescription": "对时间序列数据执行高级分析。", "visTypeTimeseries.kbnVisTypes.metricsTitle": "TSVB", "visTypeTimeseries.lastValueModeIndicator.lastBucketDate": "存储桶:{lastBucketDate}", "visTypeTimeseries.lastValueModeIndicator.lastValue": "最后值", @@ -8739,7 +8736,6 @@ "visTypeVega.mapView.resettingPropertyToMaxValueWarningMessage": "将 {name} 重置为 {max}", "visTypeVega.mapView.resettingPropertyToMinValueWarningMessage": "将 {name} 重置为 {min}", "visTypeVega.type.vegaDescription": "使用 Vega 创建新的可视化类型。", - "visTypeVega.type.vegaNote": "需要有 Vega 语法知识。", "visTypeVega.type.vegaTitleInWizard": "定制可视化", "visTypeVega.urlParser.dataUrlRequiresUrlParameterInFormErrorMessage": "{dataUrlParam} 需要“{formLink}”形式的 {urlParam} 参数", "visTypeVega.urlParser.urlShouldHaveQuerySubObjectWarningMessage": "使用 {urlObject} 应具有 {subObjectName} 子对象", @@ -8924,7 +8920,6 @@ "visualizations.createVisualization.noIndexPatternOrSavedSearchIdErrorMessage": "必须提供 indexPattern 或 savedSearchId", "visualizations.createVisualization.noVisTypeErrorMessage": "必须提供有效的可视化类型", "visualizations.dataView.label": "数据视图", - "visualizations.deprecatedTag": "(已过时)", "visualizations.displayName": "可视化", "visualizations.editor.createBreadcrumb": "创建", "visualizations.editor.defaultEditBreadcrumbText": "编辑可视化", @@ -8976,24 +8971,16 @@ "visualizations.newChart.libraryMode.new": "新", "visualizations.newChart.libraryMode.old": "以前", "visualizations.newGaugeChart.notificationMessage": "新的仪表盘图表库尚不支持拆分图表聚合。{conditionalMessage}", - "visualizations.newVisWizard.aggBasedGroupDescription": "使用我们的经典可视化库,基于聚合创建图表。", - "visualizations.newVisWizard.aggBasedGroupTitle": "基于聚合", "visualizations.newVisWizard.chooseSourceTitle": "选择源", - "visualizations.newVisWizard.experimentalTitle": "技术预览", - "visualizations.newVisWizard.experimentalTooltip": "此功能处于技术预览状态,在未来版本中可能会更改或完全移除。Elastic 将努力修复任何问题,但处于技术预览状态的功能不受正式 GA 功能支持 SLA 的约束。", - "visualizations.newVisWizard.exploreOptionLinkText": "浏览选项", "visualizations.newVisWizard.filterVisTypeAriaLabel": "筛留可视化类型", "visualizations.newVisWizard.goBackLink": "选择不同的可视化", "visualizations.newVisWizard.helpTextAriaLabel": "通过为该可视化选择类型,开始创建您的可视化。按 Esc 键关闭此模式。按 Tab 键继续。", "visualizations.newVisWizard.learnMoreText": "希望了解详情?", "visualizations.newVisWizard.newVisTypeTitle": "新建{visTypeName}", - "visualizations.newVisWizard.readDocumentationLink": "阅读文档", "visualizations.newVisWizard.resultsFound": "{resultCount, plural, other {类型}}已找到", "visualizations.newVisWizard.searchSelection.notFoundLabel": "未找到匹配的索引或已保存搜索。", "visualizations.newVisWizard.searchSelection.savedObjectType.dataView": "数据视图", "visualizations.newVisWizard.searchSelection.savedObjectType.search": "已保存搜索", - "visualizations.newVisWizard.title": "新建可视化", - "visualizations.newVisWizard.toolsGroupTitle": "工具", "visualizations.noDataView.label": "数据视图", "visualizations.noMatchRoute.bannerText": "Visualize 应用程序无法识别此路由:{route}。", "visualizations.noMatchRoute.bannerTitleText": "未找到页面", @@ -25555,8 +25542,6 @@ "xpack.lens.unknownDatasourceType.shortMessage": "数据源类型未知", "xpack.lens.unknownVisType.longMessage": "无法解析可视化类型 {visType}。", "xpack.lens.unknownVisType.shortMessage": "可视化类型未知", - "xpack.lens.visTypeAlias.description": "使用拖放编辑器创建可视化。随时在可视化类型之间切换。", - "xpack.lens.visTypeAlias.note": "适合绝大多数用户。", "xpack.lens.visTypeAlias.title": "Lens", "xpack.lens.visTypeAlias.type": "Lens", "xpack.lens.visualizeAggBasedLegend": "可视化基于聚合的图表", diff --git a/x-pack/test/saved_object_tagging/functional/tests/visualize_integration.ts b/x-pack/test/saved_object_tagging/functional/tests/visualize_integration.ts index 61b7a2c1e9711..c4d0df07aeb64 100644 --- a/x-pack/test/saved_object_tagging/functional/tests/visualize_integration.ts +++ b/x-pack/test/saved_object_tagging/functional/tests/visualize_integration.ts @@ -32,14 +32,12 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { } await testSubjects.click('savedObjectTitle'); }; - // creates a simple markdown vis with a tag provided. + // creates a simple tsvb vis with a tag provided. const createSimpleMarkdownVis = async (opts: Record) => { - const { visName, visText, tagName } = opts; + const { visName, tagName } = opts; await PageObjects.visualize.navigateToNewVisualization(); - await PageObjects.visualize.clickMarkdownWidget(); - await PageObjects.visEditor.setMarkdownTxt(visText); - await PageObjects.visEditor.clickGo(); + await PageObjects.visualize.clickVisualBuilder(); await PageObjects.visualize.ensureSavePanelOpen(); await PageObjects.visualize.setSaveModalValues(visName, { @@ -150,10 +148,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await PageObjects.visualize.navigateToNewVisualization(); - await PageObjects.visualize.clickMarkdownWidget(); - await PageObjects.visEditor.setMarkdownTxt('Just some markdown'); - await PageObjects.visEditor.clickGo(); - + await PageObjects.visualize.clickVisualBuilder(); await PageObjects.visualize.ensureSavePanelOpen(); await PageObjects.visualize.setSaveModalValues('vis-with-new-tag', { saveAsNew: false,