Skip to content

Commit

Permalink
[Security Solution] Fixes mis-alignment in the labels of Filter contr…
Browse files Browse the repository at this point in the history
…ols on Alerts Page. (elastic#192094)

## Summary

As stated in elastic#192092 , the labels of filter controls were mis-aligned.
This was due to some changes in EUI were conflicting with our custom
styling. This PR removes the custom styling.

### Before


![grafik](https://github.com/user-attachments/assets/f167f909-6fff-442e-9ed8-a9781bb52bd1)

### Issues with Error state

It looks like recent PR elastic#190636 on 03-Sept made the controls compact but
the error state was left out. This PR fixes that. I would request
@elastic/kibana-presentation team to review it once.
 
<img width="1920" alt="grafik"
src="https://github.com/user-attachments/assets/4025c79f-2602-4221-a136-436b6759096f">


### After

Below video shows fixes in success, loading and error states.
@elastic/response-ops team, Could you please check in other areas as
well where these filters are used. Thanks.



https://github.com/user-attachments/assets/7e0f6035-171c-4a4b-99c6-116ad577a019
  • Loading branch information
logeekal authored Sep 9, 2024
1 parent 31bd6ac commit a602eed
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 32 deletions.
24 changes: 0 additions & 24 deletions packages/kbn-alerts-ui-shared/src/alert_filter_controls/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,3 @@
[id^=control-popover] .euiPopoverTitle {
display: none
}

.filter-group__wrapper {
.euiPanel.controlsWrapper {
min-height: 34px;
}

.euiFormControlLayout.euiFormControlLayout--group.controlFrame__formControlLayout {
height: 34px;
& .euiFormLabel.controlFrame__formControlLayoutLabel {
padding: 8px !important;
}

.euiButtonEmpty.euiFilterButton {
height: 32px;
}
}
.euiText.errorEmbeddableCompact__button {
padding: 8px;
.euiLink {
display:flex;
gap: 8px;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,12 @@

import React from 'react';
import { EuiButton, EuiLoadingChart } from '@elastic/eui';
import styled from '@emotion/styled';
import { TEST_IDS } from './constants';

const FilterGroupLoadingButton = styled(EuiButton)`
height: 34px;
`;

export const FilterGroupLoading = () => {
return (
<FilterGroupLoadingButton color="text">
<EuiButton color="text" size="s">
<EuiLoadingChart className="filter-group__loading" data-test-subj={TEST_IDS.FILTER_LOADING} />
</FilterGroupLoadingButton>
</EuiButton>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
.controlErrorButton {
width: 100%;
border-radius: 0 $euiBorderRadius $euiBorderRadius 0 !important;
height: $euiButtonHeightSmall;

&--content {
justify-content: left;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@

.errorEmbeddableCompact__popover {
height: 100%;
max-width: 100%;
}

.errorEmbeddableCompact__button {
height: $euiButtonHeightSmall;

:hover {
text-decoration: underline;
text-decoration-color: $euiTextSubduedColor !important;
Expand Down

0 comments on commit a602eed

Please sign in to comment.