Skip to content

Commit

Permalink
[Security Solution] Fix broken Rule Details page when filters are ext…
Browse files Browse the repository at this point in the history
…remely long (elastic#153338)

Fixes elastic#145076

## Summary

When creating a rule that has a **filter** which is extremely long, the
Rules Detail UI breaks and information is lost, out of view of the user,
due to a broken layout. See connected issue for examples, or below.

This PR fixes this bug via a a couple simple CSS fixes in the related
components.

# Screenshots

## Desktop

**Before**
<img width="1713" alt="image"
src="https://user-images.githubusercontent.com/5354282/226470618-b4835d2f-1343-4e94-8b42-c0ebae064f1c.png">


**After**
<img width="1723" alt="image"
src="https://user-images.githubusercontent.com/5354282/226470507-07d3d482-0ece-4ecb-9e19-03b18e2803ea.png">

## Mobile

**Before**
<img width="481" alt="image"
src="https://user-images.githubusercontent.com/5354282/226470744-f16aca4f-b547-4601-ac6c-c95a641752a8.png">


**After**
<img width="486" alt="image"
src="https://user-images.githubusercontent.com/5354282/226470790-e6d06b09-0c7f-49eb-bf8f-07f34b6303e4.png">


### Checklist

Delete any items that are not applicable to this PR.

- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
  • Loading branch information
jpdjere committed Mar 23, 2023
1 parent b0d4d2e commit 39efe02
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export const buildQueryBarDescription = ({
description: (
<EuiFlexGroup wrap responsive={false} gutterSize="xs">
{filterManager.getFilters().map((filter, index) => (
<EuiFlexItem grow={false} key={`${field}-filter-${index}`}>
<EuiFlexItem grow={false} key={`${field}-filter-${index}`} css={{ width: '100%' }}>
<EuiBadgeWrap color="hollow">
{indexPatterns != null ? (
<FilterBadgeGroup filters={[filter]} dataViews={[indexPatterns]} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ import { useLicense } from '../../../../common/hooks/use_license';
import type { LicenseService } from '../../../../../common/license';

const DescriptionListContainer = styled(EuiDescriptionList)`
max-width: 600px;
&.euiDescriptionList--column .euiDescriptionList__title {
width: 30%;
}
Expand Down

0 comments on commit 39efe02

Please sign in to comment.