Skip to content

Commit 8fc42e2

Browse files
committed
Make height uniform, center alignment, fix map and keyword map not same size
Move styling
1 parent ed496bf commit 8fc42e2

File tree

14 files changed

+67
-52
lines changed

14 files changed

+67
-52
lines changed

x-pack/plugins/data_visualizer/public/application/common/components/expanded_row/geo_point_content/geo_point_content.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,7 @@ export const GeoPointContent: FC<FieldDataRowProps> = ({ config }) => {
6363
<ExpandedRowContent dataTestSubj={'dataVisualizerGeoPointContent'}>
6464
<DocumentStatsTable config={config} />
6565
{formattedResults && Array.isArray(formattedResults.examples) && (
66-
<EuiFlexItem>
67-
<ExamplesList examples={formattedResults.examples} />
68-
</EuiFlexItem>
66+
<ExamplesList examples={formattedResults.examples} />
6967
)}
7068
{formattedResults && Array.isArray(formattedResults.layerList) && (
7169
<EuiFlexItem

x-pack/plugins/data_visualizer/public/application/common/components/expanded_row/geo_point_content_with_map/geo_point_content_with_map.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export const GeoPointContentWithMap: FC<{
6464
<ExpandedRowContent dataTestSubj={'dataVisualizerIndexBasedMapContent'}>
6565
<DocumentStatsTable config={config} />
6666
<ExamplesList examples={stats.examples} />
67-
<EuiFlexItem className={'dataVisualizerPanelWrapper'} style={{ minHeight: 300 }}>
67+
<EuiFlexItem className={'dataVisualizerPanelWrapper dataVisualizerMapWrapper'}>
6868
<EmbeddedMapComponent layerList={layerList} />
6969
</EuiFlexItem>
7070
</ExpandedRowContent>

x-pack/plugins/data_visualizer/public/application/common/components/stats_table/_index.scss

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
$panelWidthS: 300px;
66
$panelWidthL: 600px;
7-
$panelWidthXL: 900px;
87

98
.dataVisualizerFieldExpandedRow {
109
padding-left: $euiSize * 4;
@@ -70,18 +69,20 @@ $panelWidthXL: 900px;
7069
.dataVisualizerSummaryTableWrapper {
7170
min-width: $panelWidthS;
7271
max-width: $panelWidthS;
73-
max-height: 120px;
7472
}
7573

7674
.dataVisualizerMapWrapper {
77-
min-height: 300px;
78-
min-width: $panelWidthS;
79-
max-width: $panelWidthS;
75+
min-height: 200px;
76+
min-width: 450px;
8077
}
8178

8279
.dataVisualizerTopValuesWrapper {
8380
min-width: $panelWidthS;
84-
max-width: $panelWidthL;
81+
width: fit-content;
82+
83+
&.wrapperSize--compressed {
84+
max-width: 450px;
85+
}
8586
}
8687

8788
.dataVisualizerUniformPanel {
@@ -92,15 +93,12 @@ $panelWidthXL: 900px;
9293
.dataVisualizerPanelWrapper {
9394
border-radius: $euiBorderRadius;
9495
border: 1px solid $euiBorderColor;
95-
padding: 6px;
96+
padding: 4px;
9697
margin: 3px 12px 12px 0;
97-
min-height: 120px;
98-
height: min-content;
9998
}
10099

101100
.dataVisualizerTextContent {
102-
min-width: $panelWidthS;
103-
max-width: $panelWidthXL;
101+
min-width: 450px;
104102
}
105103

106104
}

x-pack/plugins/data_visualizer/public/application/common/components/stats_table/components/expanded_row_field_header/expanded_row_field_header.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ import { EuiText } from '@elastic/eui';
99
import React from 'react';
1010

1111
export const ExpandedRowFieldHeader = ({ children }: { children: React.ReactNode }) => (
12-
<EuiText size="xs" color={'subdued'} className={'fieldDataCard__valuesTitle'}>
12+
<EuiText
13+
size="xs"
14+
color={'subdued'}
15+
className={'fieldDataCard__valuesTitle'}
16+
textAlign={'center'}
17+
>
1318
{children}
1419
</EuiText>
1520
);

x-pack/plugins/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/boolean_content.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ export const BooleanContent: FC<FieldDataRowProps> = ({ config }) => {
7171
name: '',
7272
render: (summaryItem: { display: ReactNode }) => summaryItem.display,
7373
width: '75px',
74+
align: 'right',
7475
},
7576
{
7677
field: 'value',

x-pack/plugins/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/choropleth_map.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,13 @@ export const ChoroplethMap: FC<Props> = ({ stats, suggestion }) => {
105105
return (
106106
<EuiFlexItem
107107
data-test-subj={'fileDataVisualizerChoroplethMapTopValues'}
108-
className={'dataVisualizerPanelWrapper'}
109-
style={{ minHeight: 300 }}
108+
className={'dataVisualizerPanelWrapper dataVisualizerMapWrapper'}
110109
>
111110
<EmbeddedMapComponent layerList={layerList} />
112111
{isTopValuesSampled === true && (
113112
<>
114113
<EuiSpacer size="xs" />
115-
<EuiText size="xs" textAlign={'left'}>
114+
<EuiText size="xs" textAlign={'center'}>
116115
<FormattedMessage
117116
id="xpack.dataVisualizer.dataGrid.fieldExpandedRow.choroplethMapTopValues.calculatedFromSampleDescription"
118117
defaultMessage="Calculated from sample of {topValuesSamplerShardSize} documents per shard"

x-pack/plugins/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/date_content.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export const DateContent: FC<FieldDataRowProps> = ({ config }) => {
6262
name: '',
6363
render: (summaryItem: { display: ReactNode }) => summaryItem.display,
6464
width: '75px',
65+
align: 'right',
6566
},
6667
{
6768
field: 'value',

x-pack/plugins/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/document_stats.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const metaTableColumns = [
1818
name: '',
1919
render: (metaItem: { display: ReactNode }) => metaItem.display,
2020
width: '75px',
21+
align: 'right',
2122
},
2223
{
2324
field: 'value',

x-pack/plugins/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/expanded_row_content.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export const ExpandedRowContent: FC<Props> = ({ children, dataTestSubj }) => {
1818
data-test-subj={dataTestSubj}
1919
gutterSize={'s'}
2020
className={'dataVisualizerExpandedRow'}
21+
responsive={true}
2122
>
2223
{children}
2324
</EuiFlexGroup>

x-pack/plugins/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/ip_content.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const IpContent: FC<FieldDataRowProps> = ({ config }) => {
2121
return (
2222
<ExpandedRowContent dataTestSubj={'dataVisualizerIPContent'}>
2323
<DocumentStatsTable config={config} />
24-
<TopValues stats={stats} fieldFormat={fieldFormat} barColor="secondary" />
24+
<TopValues stats={stats} fieldFormat={fieldFormat} barColor="secondary" compressed={true} />
2525
</ExpandedRowContent>
2626
);
2727
};

0 commit comments

Comments
 (0)