Skip to content

Commit 2f445a0

Browse files
[Maps] 7.9 design improvements (#71563)
* Design improvements * more improvements * Updated snapshots * Removing unecessary flex item * Updated snapshot * Addressing pr review Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
1 parent 6a67ed9 commit 2f445a0

10 files changed

Lines changed: 43 additions & 35 deletions

File tree

x-pack/plugins/maps/public/classes/sources/ems_tms_source/ems_base_map_layer_wizard.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
import React from 'react';
77
import { i18n } from '@kbn/i18n';
8+
import { EuiPanel } from '@elastic/eui';
89
import { LayerWizard, RenderWizardArguments } from '../../layers/layer_wizard_registry';
910
// @ts-ignore
1011
import { EMSTMSSource, sourceTitle } from './ems_tms_source';
@@ -32,7 +33,11 @@ export const emsBaseMapLayerWizardConfig: LayerWizard = {
3233
previewLayers([layerDescriptor]);
3334
};
3435

35-
return <TileServiceSelect onTileSelect={onSourceConfigChange} />;
36+
return (
37+
<EuiPanel>
38+
<TileServiceSelect onTileSelect={onSourceConfigChange} />
39+
</EuiPanel>
40+
);
3641
},
3742
title: sourceTitle,
3843
};

x-pack/plugins/maps/public/classes/sources/ems_tms_source/tile_service_select.js

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66

77
import React from 'react';
8-
import { EuiSelect, EuiFormRow, EuiPanel } from '@elastic/eui';
8+
import { EuiSelect, EuiFormRow } from '@elastic/eui';
99

1010
import { getEmsTmsServices } from '../../../meta';
1111
import { getEmsUnavailableMessage } from '../../../components/ems_unavailable_message';
@@ -71,25 +71,23 @@ export class TileServiceSelect extends React.Component {
7171
}
7272

7373
return (
74-
<EuiPanel>
75-
<EuiFormRow
76-
label={i18n.translate('xpack.maps.source.emsTile.label', {
77-
defaultMessage: 'Tile service',
78-
})}
79-
helpText={helpText}
80-
display="columnCompressed"
81-
>
82-
<EuiSelect
83-
hasNoInitialSelection={!selectedId}
84-
value={selectedId}
85-
options={this.state.emsTmsOptions}
86-
onChange={this._onChange}
87-
isLoading={!this.state.hasLoaded}
88-
disabled={this.state.hasLoaded && this.state.emsTmsOptions.length === 0}
89-
compressed
90-
/>
91-
</EuiFormRow>
92-
</EuiPanel>
74+
<EuiFormRow
75+
label={i18n.translate('xpack.maps.source.emsTile.label', {
76+
defaultMessage: 'Tile service',
77+
})}
78+
helpText={helpText}
79+
display="columnCompressed"
80+
>
81+
<EuiSelect
82+
hasNoInitialSelection={!selectedId}
83+
value={selectedId}
84+
options={this.state.emsTmsOptions}
85+
onChange={this._onChange}
86+
isLoading={!this.state.hasLoaded}
87+
disabled={this.state.hasLoaded && this.state.emsTmsOptions.length === 0}
88+
compressed
89+
/>
90+
</EuiFormRow>
9391
);
9492
}
9593
}

x-pack/plugins/maps/public/classes/sources/ems_tms_source/update_source_editor.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ export function UpdateSourceEditor({ onChange, config }) {
2626
/>
2727
</h5>
2828
</EuiTitle>
29-
3029
<EuiSpacer size="m" />
31-
3230
<TileServiceSelect onTileSelect={_onTileSelect} config={config} />
3331
</EuiPanel>
3432

x-pack/plugins/maps/public/classes/styles/vector/components/color/color_map_select.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export class ColorMapSelect extends Component {
161161

162162
return (
163163
<Fragment>
164-
<EuiFlexGroup gutterSize={'none'}>
164+
<EuiFlexGroup gutterSize={'xs'}>
165165
{toggle}
166166
<EuiFlexItem>
167167
<EuiColorPalettePicker

x-pack/plugins/maps/public/connected_components/add_layer_panel/flyout_body/__snapshots__/layer_wizard_select.test.tsx.snap

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/plugins/maps/public/connected_components/add_layer_panel/flyout_body/layer_wizard_select.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export class LayerWizardSelect extends Component<Props, State> {
115115
});
116116

117117
return (
118-
<EuiFacetGroup layout="horizontal">
118+
<EuiFacetGroup layout="horizontal" gutterSize="s">
119119
<EuiFacetButton
120120
key="all"
121121
isSelected={!this.state.selectedCategory}
@@ -154,6 +154,7 @@ export class LayerWizardSelect extends Component<Props, State> {
154154
<EuiFlexItem key={layerWizard.title}>
155155
<EuiCard
156156
title={layerWizard.title}
157+
titleSize="xs"
157158
icon={icon}
158159
onClick={onClick}
159160
description={layerWizard.description}
@@ -166,6 +167,7 @@ export class LayerWizardSelect extends Component<Props, State> {
166167
return (
167168
<>
168169
{this._renderCategoryFacets()}
170+
169171
<EuiSpacer size="s" />
170172
<EuiFlexGrid columns={2} gutterSize="m">
171173
{wizardCards}

x-pack/plugins/maps/public/connected_components/layer_panel/join_editor/__snapshots__/join_editor.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/plugins/maps/public/connected_components/layer_panel/join_editor/join_editor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export function JoinEditor({ joins, layer, onChange, leftJoinFields, layerDispla
8585
<EuiButtonEmpty
8686
onClick={addJoin}
8787
size="xs"
88-
iconType="plusInCircle"
88+
iconType="plusInCircleFilled"
8989
aria-label={i18n.translate('xpack.maps.layerPanel.joinEditor.addJoinAriaLabel', {
9090
defaultMessage: 'Add join',
9191
})}

x-pack/plugins/maps/public/connected_components/layer_panel/join_editor/resources/_join.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
position: relative;
33
background: tintOrShade($euiColorLightShade, 85%, 0);
44
border-radius: $euiBorderRadius;
5-
padding: $euiSizeXS;
5+
padding: $euiSizeS $euiSizeXS;
66

77
.mapJoinItem__inner {
88
@include euiScrollBar;

x-pack/plugins/maps/public/connected_components/layer_panel/join_editor/resources/join.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,15 @@ export class Join extends Component {
148148
</EuiFlexItem>
149149
);
150150
globalFilterCheckbox = (
151-
<GlobalFilterCheckbox
152-
applyGlobalQuery={right.applyGlobalQuery}
153-
setApplyGlobalQuery={this._onApplyGlobalQueryChange}
154-
label={i18n.translate('xpack.maps.layerPanel.join.applyGlobalQueryCheckboxLabel', {
155-
defaultMessage: `Apply global filter to join`,
156-
})}
157-
/>
151+
<EuiFlexItem>
152+
<GlobalFilterCheckbox
153+
applyGlobalQuery={right.applyGlobalQuery}
154+
setApplyGlobalQuery={this._onApplyGlobalQueryChange}
155+
label={i18n.translate('xpack.maps.layerPanel.join.applyGlobalQueryCheckboxLabel', {
156+
defaultMessage: `Apply global filter to join`,
157+
})}
158+
/>
159+
</EuiFlexItem>
158160
);
159161
}
160162

0 commit comments

Comments
 (0)