[Maps] add in product help for layer group drag and drop instructions (#144259)

* [Maps] add in product help for layer group drag and drop instructions

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* render callout above panel

* review feedback on copy

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* Update x-pack/plugins/maps/public/connected_components/edit_layer_panel/layer_settings/layer_settings.tsx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update x-pack/plugins/maps/public/connected_components/edit_layer_panel/layer_settings/layer_settings.tsx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update x-pack/plugins/maps/public/connected_components/edit_layer_panel/layer_settings/layer_settings.tsx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* update title

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
This commit is contained in:
Nathan Reese 2022-11-02 10:04:21 -06:00 committed by GitHub
parent 6412057399
commit 8ea2f3b715
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,6 +7,8 @@
import React, { ChangeEvent, Fragment } from 'react';
import {
EuiCallOut,
EuiText,
EuiTitle,
EuiPanel,
EuiFormRow,
@ -242,8 +244,44 @@ export function LayerSettings(props: Props) {
);
};
const renderLayerGroupInstructions = () => {
return isLayerGroup(props.layer) ? (
<>
<EuiCallOut
title={i18n.translate('xpack.maps.layerPanel.settingsPanel.layerGroupCalloutTitle', {
defaultMessage: 'Drag layers in and out of the group',
})}
iconType="layers"
>
<EuiText>
<ul>
<li>
{i18n.translate('xpack.maps.layerPanel.settingsPanel.layerGroupAddToFront', {
defaultMessage: 'To add your first layer, drag it onto the group name.',
})}
</li>
<li>
{i18n.translate('xpack.maps.layerPanel.settingsPanel.layerGroupAddToPosition', {
defaultMessage:
'To add another layer, drag it anywhere above the last layer in the group.',
})}
</li>
<li>
{i18n.translate('xpack.maps.layerPanel.settingsPanel.layerGroupRemove', {
defaultMessage: 'To remove a layer, drag it above or below the group.',
})}
</li>
</ul>
</EuiText>
</EuiCallOut>
<EuiSpacer size="m" />
</>
) : null;
};
return (
<Fragment>
{renderLayerGroupInstructions()}
<EuiPanel>
<EuiTitle size="xs">
<h5>