Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.mapFeatureTooltip_table {
width: 100%;
td {
padding: $euiSizeXS;
}
Expand Down
36 changes: 16 additions & 20 deletions x-pack/legacy/plugins/maps/public/components/map/feature_tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import React, { Fragment } from 'react';
import {
EuiButtonIcon,
EuiText,
EuiTextAlign,
EuiPagination,
EuiSelect,
EuiIconTip,
Expand Down Expand Up @@ -159,6 +158,7 @@ export class FeatureTooltip extends React.Component {
options={options}
onChange={this._onLayerChange}
valueOfSelected={this.state.layerIdFilter}
compressed
aria-label={i18n.translate('xpack.maps.tooltip.layerFilterLabel', {
defaultMessage: 'Filter results by layer'
})}
Expand All @@ -172,7 +172,7 @@ export class FeatureTooltip extends React.Component {
return null;
}

const divider = (this.state.uniqueLayers && this.state.uniqueLayers.length > 1) ? <EuiHorizontalRule /> : null;
const divider = (this.state.uniqueLayers && this.state.uniqueLayers.length > 1) ? <EuiHorizontalRule margin="xs" /> : null;
return (
<Fragment>
<EuiFlexGroup justifyContent="spaceBetween">
Expand All @@ -196,7 +196,7 @@ export class FeatureTooltip extends React.Component {

return (
<Fragment>
<EuiHorizontalRule />
<EuiHorizontalRule margin="xs" />
{this._renderPagination(filteredFeatures)}
</Fragment>
);
Expand All @@ -207,16 +207,14 @@ export class FeatureTooltip extends React.Component {
return null;
}
return (
<EuiTextAlign textAlign="center">
<EuiButtonIcon
onClick={this._onCloseTooltip}
iconType="cross"
aria-label={i18n.translate('xpack.maps.tooltip.closeAriaLabel', {
defaultMessage: 'Close tooltip'
})}
data-test-subj="mapTooltipCloseButton"
/>
</EuiTextAlign>
<EuiButtonIcon
onClick={this._onCloseTooltip}
iconType="cross"
aria-label={i18n.translate('xpack.maps.tooltip.closeAriaLabel', {
defaultMessage: 'Close tooltip'
})}
data-test-subj="mapTooltipCloseButton"
/>
);
}

Expand All @@ -242,9 +240,7 @@ export class FeatureTooltip extends React.Component {
_renderPagination(filteredFeatures) {

const pageNumberReadout = (
<EuiTextAlign textAlign="center">
<EuiText><b>{(this.state.pageNumber + 1)}</b> of <b>{filteredFeatures.length}</b></EuiText>
</EuiTextAlign>
<EuiText size="s"><b>{(this.state.pageNumber + 1)}</b> of <b>{filteredFeatures.length}</b></EuiText>
);

let cycleArrows;
Expand All @@ -262,18 +258,18 @@ export class FeatureTooltip extends React.Component {
const hint = this.props.showFeatureList ? (<EuiIconTip
type="iInCircle"
content={i18n.translate('xpack.maps.tooltip.infoIconHelp', {
defaultMessage: 'Use the query bar on top to filter down the results.'
defaultMessage: 'Use the query bar to filter results.'
})}
/>) : null;

return (
<Fragment>
<EuiFlexGroup justifyContent="spaceBetween">
<EuiFlexGroup gutterSize="s" justifyContent="spaceBetween" alignItems="center">
<EuiFlexItem grow={false}>
{pageNumberReadout}
{hint}
</EuiFlexItem>
<EuiFlexItem>
{hint}
{pageNumberReadout}
</EuiFlexItem>
<EuiFlexItem grow={false}>
{cycleArrows}
Expand Down