Skip to content

Commit

Permalink
[Maps] add in product help for layer group drag and drop instructions (
Browse files Browse the repository at this point in the history
…#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>
  • Loading branch information
3 people authored Nov 2, 2022
1 parent 6412057 commit 8ea2f3b
Showing 1 changed file with 38 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

import React, { ChangeEvent, Fragment } from 'react';
import {
EuiCallOut,
EuiText,
EuiTitle,
EuiPanel,
EuiFormRow,
Expand Down Expand Up @@ -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>
Expand Down

0 comments on commit 8ea2f3b

Please sign in to comment.