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

[Amsterdam theme] Fix issues Index management #103465

Merged
merged 5 commits into from
Jun 30, 2021
Merged
Show file tree
Hide file tree
Changes from 3 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,6 +1,7 @@

/**
* [1] Will center vertically the empty search result
* [2] Align the height with the search input height
*/

$heightHeader: $euiSizeL * 2;
Expand All @@ -22,10 +23,22 @@ $heightHeader: $euiSizeL * 2;
&__searchBox {
border-bottom: $euiBorderThin;
border-top: $euiBorderThin;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
box-shadow: none;
max-width: initial;
}

&__filterListButton {
border-bottom: $euiBorderThin;
border-top: $euiBorderThin;
sebelga marked this conversation as resolved.
Show resolved Hide resolved
border-left: $euiBorderThin;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
box-shadow: none;
height: 40px; /* [2] */
sebelga marked this conversation as resolved.
Show resolved Hide resolved
}

&__listWrapper {
height: calc(100% - #{$heightHeader});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.componentTemplatesListItem {
background-color: $euiColorGhost;
background-color: $euiPageBackgroundColor;
padding: $euiSizeM;
border-bottom: $euiBorderThin;
position: relative;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import React, { useState } from 'react';
import { FormattedMessage } from '@kbn/i18n/react';
import { EuiFilterButton, EuiPopover, EuiFilterSelectItem } from '@elastic/eui';
import { EuiFilterButton, EuiPopover, EuiFilterSelectItem, EuiFilterGroup } from '@elastic/eui';

interface Filter {
name: string;
Expand Down Expand Up @@ -67,26 +67,28 @@ export function FilterListButton({ onChange, filters }: Props) {
);

return (
<EuiPopover
ownFocus
button={button}
isOpen={isPopoverOpen}
closePopover={closePopover}
panelPaddingSize="none"
data-test-subj="filterList"
>
<div className="euiFilterSelect__items">
{Object.entries(filters).map(([filter, item], index) => (
<EuiFilterSelectItem
checked={(item as Filter).checked}
key={index}
onClick={() => toggleFilter(filter)}
data-test-subj="filterItem"
>
{(item as Filter).name}
</EuiFilterSelectItem>
))}
</div>
</EuiPopover>
<EuiFilterGroup className="componentTemplates__filterListButton">
<EuiPopover
ownFocus
button={button}
isOpen={isPopoverOpen}
closePopover={closePopover}
panelPaddingSize="none"
data-test-subj="filterList"
>
<div className="euiFilterSelect__items">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We normally don't use EUI classes directly here. But I noticed that this was already there and with the time we have left until 7.14 it's ok.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure why this class was added. I can have a look into it. Will try to merge this first though.

{Object.entries(filters).map(([filter, item], index) => (
<EuiFilterSelectItem
checked={(item as Filter).checked}
key={index}
onClick={() => toggleFilter(filter)}
data-test-subj="filterItem"
>
{(item as Filter).name}
</EuiFilterSelectItem>
))}
</div>
</EuiPopover>
</EuiFilterGroup>
);
}