-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Security Solution] Fixes mis-alignment in the labels of Filter controls on Alerts Page. #192094
Conversation
@@ -12,7 +12,7 @@ import styled from '@emotion/styled'; | |||
import { TEST_IDS } from './constants'; | |||
|
|||
const FilterGroupLoadingButton = styled(EuiButton)` | |||
height: 34px; | |||
height: 38px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe this is needed either. Instead, try setting a size="s"
on line 20. This will set a small button size which seems to match the height of the input controls once they load.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ryankeairns .. Great observation. Fixed here : 8e88547
src/plugins/controls/public/react_controls/control_group/components/control_panel.scss
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes LGTM! thank you for the quick fixes!
src/plugins/controls/public/react_controls/control_group/components/control_panel.scss
Show resolved
Hide resolved
.euiFormControlLayout.euiFormControlLayout--group.controlFrame__formControlLayout { | ||
height: 34px; | ||
& .euiFormLabel.controlFrame__formControlLayoutLabel { | ||
padding: 8px !important; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @craig-abbott,
Yes looks like the extra padding appeared after recent changes from presentation team combined with this custom padding we already had here. Now it is fixed since i have removed our custom styles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason for this padding is that we need to "simulate" left padding to accommodate toggling the drag button when switching between edit mode and view mode (see #184533).
We are currently using a small empty EuiIcon
to do this - but now that we have switched to compressed styling, this button is too big. EuiIcon
doesn't have an xs
option, so we might be forced to just do an empty div
with an enforced width of 8px
instead (to match the right padding that is now 8px
from switching to compressed styling instead of the previous 16px
) - what do you think @cqliu1 @rshen91?
Here's what that would look like:
Either way, @logeekal is correct that this is coming from our side and the fix shouldn't be done by ya'll :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We expect the padding on left and right to be the same, as it is on:
Analytics > Dashboards > [Elastic Security] Detection rule monitoring
.
It looks like there, the buttons still using the empty icon there to push the text over, but the padding on the <label>
element matches the 12px width.
Whereas in Security > Alerts
the icon is 12px but the padding on the right is 8px.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies @Heenawter it took me so long to gather the screenshots I missed your comment from 12 minutes ago where you explained the problem, and now I look like it just mansplained it back to you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great to see collaboration here. Thanks both of you.
@craig-abbott , Could you please re-review the PR and let me know if you have any more comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes!
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
Summary
As stated in #192092 , the labels of filter controls were mis-aligned. This was due to recent changes in controls plugin were conflicting with our custom styling. This PR removes the custom styling.
Before
Issues with Error state
It looks like recent PR #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.
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.
filter_controls_labels_fix.mp4