Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More spacing fixes #2

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,3 @@
@import 'datapanel';
@import 'field_item';

@import 'dimension_panel/index';
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,11 @@
top: 0;
left: $euiSize; /* 1 */
right: $euiSizeXS; /* 1 */
}

/* EUI-TODO: Allow passing a classname to this component */
.euiAccordion__childWrapper {
// Quick fix for making sure the shadow and focus rings are visible outside the accordion bounds
padding: $euiSizeXS;
}
.lnsInnerIndexPatternDataPanel__fieldItems {
// Quick fix for making sure the shadow and focus rings are visible outside the accordion bounds
padding: $euiSizeXS $euiSizeXS 0;
}

.lnsInnerIndexPatternDataPanel__textField {
Expand Down
75 changes: 39 additions & 36 deletions x-pack/plugins/lens/public/indexpattern_datasource/datapanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

import './datapanel.scss';
import { uniq, indexBy, groupBy } from 'lodash';
import React, { useState, useEffect, memo, useCallback } from 'react';
import {
Expand Down Expand Up @@ -487,22 +488,24 @@ export const InnerIndexPatternDataPanel = function InnerIndexPatternDataPanel({
}
>
<EuiSpacer size="s" />
{paginatedAvailableFields.map((field: IndexPatternField) => {
return (
<FieldItem
core={core}
data={data}
indexPattern={currentIndexPattern}
key={field.name}
field={field}
highlight={hilight}
exists={true}
dateRange={dateRange}
query={query}
filters={filters}
/>
);
})}
<div className="lnsInnerIndexPatternDataPanel__fieldItems">
{paginatedAvailableFields.map((field: IndexPatternField) => {
return (
<FieldItem
core={core}
data={data}
indexPattern={currentIndexPattern}
key={field.name}
field={field}
highlight={hilight}
exists={true}
dateRange={dateRange}
query={query}
filters={filters}
/>
);
})}
</div>

{paginatedAvailableFields.length === 0 && (
<EuiCallOut
Expand Down Expand Up @@ -572,9 +575,8 @@ export const InnerIndexPatternDataPanel = function InnerIndexPatternDataPanel({
)}
</EuiCallOut>
)}
<EuiSpacer size="s" />
</EuiAccordion>
<EuiSpacer size="s" />
<EuiSpacer size="m" />
<EuiAccordion
initialIsOpen={false}
id="emptyFieldsLabel"
Expand Down Expand Up @@ -602,25 +604,26 @@ export const InnerIndexPatternDataPanel = function InnerIndexPatternDataPanel({
}
>
<EuiSpacer size="s" />
{paginatedEmptyFields.map((field: IndexPatternField) => {
return (
<FieldItem
core={core}
data={data}
indexPattern={currentIndexPattern}
key={field.name}
field={field}
highlight={hilight}
exists={false}
dateRange={dateRange}
query={query}
filters={filters}
/>
);
})}
<EuiSpacer size="s" />
<div className="lnsInnerIndexPatternDataPanel__fieldItems">
{paginatedEmptyFields.map((field: IndexPatternField) => {
return (
<FieldItem
core={core}
data={data}
indexPattern={currentIndexPattern}
key={field.name}
field={field}
highlight={hilight}
exists={false}
dateRange={dateRange}
query={query}
filters={filters}
/>
);
})}
</div>
</EuiAccordion>
<EuiSpacer size="l" />
<EuiSpacer size="m" />
</div>
</div>
</EuiFlexItem>
Expand Down