From cbe7fd340a973a36727b44895b3d286b95bbeeb9 Mon Sep 17 00:00:00 2001 From: Aaron Caldwell Date: Tue, 13 Jul 2021 09:27:30 -0600 Subject: [PATCH] [Maps] Move new vector layer wizard card down (#104797) (#105429) --- .../classes/layers/load_layer_wizards.ts | 2 +- .../toc_entry_actions_popover.test.tsx.snap | 11 ++++++++++ .../toc_entry_actions_popover.tsx | 22 +++++++++---------- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/x-pack/plugins/maps/public/classes/layers/load_layer_wizards.ts b/x-pack/plugins/maps/public/classes/layers/load_layer_wizards.ts index 3c86c57343a067..928c6a5362c666 100644 --- a/x-pack/plugins/maps/public/classes/layers/load_layer_wizards.ts +++ b/x-pack/plugins/maps/public/classes/layers/load_layer_wizards.ts @@ -38,7 +38,6 @@ export function registerLayerWizards() { // Registration order determines display order registerLayerWizard(uploadLayerWizardConfig); - registerLayerWizard(newVectorLayerWizardConfig); registerLayerWizard(esDocumentsLayerWizardConfig); // @ts-ignore registerLayerWizard(choroplethLayerWizardConfig); @@ -51,6 +50,7 @@ export function registerLayerWizards() { registerLayerWizard(point2PointLayerWizardConfig); // @ts-ignore registerLayerWizard(emsBoundariesLayerWizardConfig); + registerLayerWizard(newVectorLayerWizardConfig); // @ts-ignore registerLayerWizard(emsBaseMapLayerWizardConfig); // @ts-ignore diff --git a/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/toc_entry/toc_entry_actions_popover/__snapshots__/toc_entry_actions_popover.test.tsx.snap b/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/toc_entry/toc_entry_actions_popover/__snapshots__/toc_entry_actions_popover.test.tsx.snap index 5d1fc8e28f993b..c7db60ae59ef94 100644 --- a/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/toc_entry/toc_entry_actions_popover/__snapshots__/toc_entry_actions_popover.test.tsx.snap +++ b/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/toc_entry/toc_entry_actions_popover/__snapshots__/toc_entry_actions_popover.test.tsx.snap @@ -535,6 +535,17 @@ exports[`TOCEntryActionsPopover should not show edit actions in read only mode 1 "onClick": [Function], "toolTipContent": null, }, + Object { + "data-test-subj": "layerSettingsButton", + "disabled": false, + "icon": , + "name": "Edit layer settings", + "onClick": [Function], + "toolTipContent": null, + }, ], "title": "Layer actions", }, diff --git a/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/toc_entry/toc_entry_actions_popover/toc_entry_actions_popover.tsx b/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/toc_entry/toc_entry_actions_popover/toc_entry_actions_popover.tsx index 83b4d2c2a756b2..2a3186f00d7cef 100644 --- a/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/toc_entry/toc_entry_actions_popover/toc_entry_actions_popover.tsx +++ b/x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/toc_entry/toc_entry_actions_popover/toc_entry_actions_popover.tsx @@ -158,6 +158,17 @@ export class TOCEntryActionsPopover extends Component { }, }, ]; + actionItems.push({ + disabled: this.props.isEditButtonDisabled, + name: EDIT_LAYER_SETTINGS_LABEL, + icon: , + 'data-test-subj': 'layerSettingsButton', + toolTipContent: null, + onClick: () => { + this._closePopover(); + this.props.openLayerSettings(); + }, + }); if (!this.props.isReadOnly) { if (this.state.supportsFeatureEditing) { @@ -186,17 +197,6 @@ export class TOCEntryActionsPopover extends Component { }, }); } - actionItems.push({ - disabled: this.props.isEditButtonDisabled, - name: EDIT_LAYER_SETTINGS_LABEL, - icon: , - 'data-test-subj': 'layerSettingsButton', - toolTipContent: null, - onClick: () => { - this._closePopover(); - this.props.openLayerSettings(); - }, - }); actionItems.push({ name: i18n.translate('xpack.maps.layerTocActions.cloneLayerTitle', { defaultMessage: 'Clone layer',