Skip to content

Commit

Permalink
[Workplace Search] Update copy and move links inline for Sync Schedul…
Browse files Browse the repository at this point in the history
…ing (#115081) (#115189)

Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>
  • Loading branch information
kibanamachine and scottybollinger authored Oct 15, 2021
1 parent cfdf8e7 commit 19344f0
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ import { ViewContentHeader } from '../../../../components/shared/view_content_he
import { NAV, RESET_BUTTON } from '../../../../constants';
import { DIFFERENT_SYNC_TYPES_DOCS_URL } from '../../../../routes';
import {
LEARN_MORE_LINK,
SOURCE_FREQUENCY_DESCRIPTION,
SOURCE_SYNC_FREQUENCY_TITLE,
BLOCKED_TIME_WINDOWS_TITLE,
SYNC_FREQUENCY_LINK_LABEL,
SYNC_UNSAVED_CHANGES_MESSAGE,
} from '../../constants';
import { SourceLogic } from '../../source_logic';
Expand Down Expand Up @@ -84,16 +84,6 @@ export const Frequency: React.FC<FrequencyProps> = ({ tabId }) => {
</EuiFlexGroup>
);

const docsLinks = (
<EuiFlexGroup>
<EuiFlexItem grow={false}>
<EuiLink href={DIFFERENT_SYNC_TYPES_DOCS_URL} external>
{SYNC_FREQUENCY_LINK_LABEL}
</EuiLink>
</EuiFlexItem>
</EuiFlexGroup>
);

return (
<SourceLayout
pageChrome={[
Expand All @@ -109,10 +99,16 @@ export const Frequency: React.FC<FrequencyProps> = ({ tabId }) => {
/>
<ViewContentHeader
title={NAV.SYNCHRONIZATION_FREQUENCY}
description={SOURCE_FREQUENCY_DESCRIPTION}
description={
<>
{SOURCE_FREQUENCY_DESCRIPTION}{' '}
<EuiLink href={DIFFERENT_SYNC_TYPES_DOCS_URL} external>
{LEARN_MORE_LINK}
</EuiLink>
</>
}
action={actions}
/>
{docsLinks}
<EuiSpacer />
<EuiTabbedContent tabs={tabs} selectedTab={tabs[tabId]} onTabClick={onSelectedTabChanged} />
</SourceLayout>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ import { ViewContentHeader } from '../../../../components/shared/view_content_he
import { NAV, RESET_BUTTON } from '../../../../constants';
import { OBJECTS_AND_ASSETS_DOCS_URL } from '../../../../routes';
import {
LEARN_MORE_LINK,
SYNC_MANAGEMENT_CONTENT_EXTRACTION_LABEL,
SYNC_MANAGEMENT_THUMBNAILS_LABEL,
SYNC_MANAGEMENT_THUMBNAILS_GLOBAL_CONFIG_LABEL,
SOURCE_OBJECTS_AND_ASSETS_DESCRIPTION,
OBJECTS_AND_ASSETS_LINK_LABEL,
SOURCE_OBJECTS_AND_ASSETS_LABEL,
SYNC_UNSAVED_CHANGES_MESSAGE,
} from '../../constants';
Expand Down Expand Up @@ -84,12 +84,16 @@ export const ObjectsAndAssets: React.FC = () => {
/>
<ViewContentHeader
title={NAV.SYNCHRONIZATION_OBJECTS_AND_ASSETS}
description={SOURCE_OBJECTS_AND_ASSETS_DESCRIPTION}
description={
<>
{SOURCE_OBJECTS_AND_ASSETS_DESCRIPTION}{' '}
<EuiLink href={OBJECTS_AND_ASSETS_DOCS_URL} external>
{LEARN_MORE_LINK}
</EuiLink>
</>
}
action={actions}
/>
<EuiLink href={OBJECTS_AND_ASSETS_DOCS_URL} external>
{OBJECTS_AND_ASSETS_LINK_LABEL}
</EuiLink>
<EuiHorizontalRule />
<EuiText size="m">{SOURCE_OBJECTS_AND_ASSETS_LABEL}</EuiText>
<EuiSpacer />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import React from 'react';

import { shallow } from 'enzyme';

import { EuiLink, EuiCallOut, EuiSwitch } from '@elastic/eui';
import { EuiCallOut, EuiSwitch } from '@elastic/eui';

import { Synchronization } from './synchronization';

Expand All @@ -28,7 +28,6 @@ describe('Synchronization', () => {
it('renders when config enabled', () => {
const wrapper = shallow(<Synchronization />);

expect(wrapper.find(EuiLink)).toHaveLength(1);
expect(wrapper.find(EuiSwitch)).toHaveLength(1);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ import { ViewContentHeader } from '../../../../components/shared/view_content_he
import { NAV } from '../../../../constants';
import { SYNCHRONIZATION_DOCS_URL } from '../../../../routes';
import {
LEARN_MORE_LINK,
SOURCE_SYNCHRONIZATION_DESCRIPTION,
SYNCHRONIZATION_DISABLED_TITLE,
SYNCHRONIZATION_DISABLED_DESCRIPTION,
SOURCE_SYNCHRONIZATION_TOGGLE_LABEL,
SOURCE_SYNCHRONIZATION_TOGGLE_DESCRIPTION,
SYNCHRONIZATION_LINK_LABEL,
} from '../../constants';
import { SourceLogic } from '../../source_logic';
import { SourceLayout } from '../source_layout';
Expand Down Expand Up @@ -65,11 +65,15 @@ export const Synchronization: React.FC = () => {
>
<ViewContentHeader
title={NAV.SYNCHRONIZATION}
description={SOURCE_SYNCHRONIZATION_DESCRIPTION}
description={
<>
{SOURCE_SYNCHRONIZATION_DESCRIPTION}{' '}
<EuiLink href={SYNCHRONIZATION_DOCS_URL} external>
{LEARN_MORE_LINK}
</EuiLink>
</>
}
/>
<EuiLink href={SYNCHRONIZATION_DOCS_URL} external>
{SYNCHRONIZATION_LINK_LABEL}
</EuiLink>
<EuiSpacer />
{isSyncConfigEnabled ? syncToggle : syncDisabledCallout}
</SourceLayout>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -531,23 +531,23 @@ export const SOURCE_SYNCHRONIZATION_DESCRIPTION = i18n.translate(
'xpack.enterpriseSearch.workplaceSearch.sources.sourceSynchronizationDescription',
{
defaultMessage:
'Synchronization provides control over data being indexed from the content source. Enable synchronization of data from the content source to Workplace Search.',
'Enable or disable synchronization of data from this content source to Workplace Search.',
}
);

export const SOURCE_FREQUENCY_DESCRIPTION = i18n.translate(
'xpack.enterpriseSearch.workplaceSearch.sources.sourceFrequencyDescription',
{
defaultMessage:
'Schedule the frequency of data synchronization between Workplace search and the content source. Indexing schedules that occur less frequently lower the burden on third-party servers, while more frequent will ensure your data is up-to-date.',
'Manage the frequency of data synchronization from Workplace search to this content source. Sync more frequently to ensure your data is up to date. Sync less frequently to reduce the burden on third party servers.',
}
);

export const SOURCE_OBJECTS_AND_ASSETS_DESCRIPTION = i18n.translate(
'xpack.enterpriseSearch.workplaceSearch.sources.sourceObjectsAndAssetsDescription',
{
defaultMessage:
'Customize the indexing rules that determine what data is synchronized from this content source to Workplace Search.',
'Customize the indexing rules that determine which objects and assets are synchronized from this content source to Workplace Search.',
}
);

Expand Down Expand Up @@ -636,13 +636,6 @@ export const BLOCKED_TIME_WINDOWS_TITLE = i18n.translate(
}
);

export const SYNCHRONIZATION_LINK_LABEL = i18n.translate(
'xpack.enterpriseSearch.workplaceSearch.sources.synchronizationLinkLabel',
{
defaultMessage: 'Learn more about synchronization',
}
);

export const SYNCHRONIZATION_DISABLED_TITLE = i18n.translate(
'xpack.enterpriseSearch.workplaceSearch.sources.synchronizationDisabledTitle',
{
Expand All @@ -657,20 +650,6 @@ export const SYNCHRONIZATION_DISABLED_DESCRIPTION = i18n.translate(
}
);

export const SYNC_FREQUENCY_LINK_LABEL = i18n.translate(
'xpack.enterpriseSearch.workplaceSearch.sources.syncFrequencyLinkLabel',
{
defaultMessage: 'Learn more about synchronization frequency',
}
);

export const OBJECTS_AND_ASSETS_LINK_LABEL = i18n.translate(
'xpack.enterpriseSearch.workplaceSearch.sources.objectsAndAssetsLinkLabel',
{
defaultMessage: 'Learn more about Objects and assets',
}
);

export const FULL_SYNC_LABEL = i18n.translate(
'xpack.enterpriseSearch.workplaceSearch.sources.fullSyncLabel',
{
Expand Down

0 comments on commit 19344f0

Please sign in to comment.