From dea749a930f3eb66cf2750efa488d61d15aac541 Mon Sep 17 00:00:00 2001 From: Guido Modarelli Date: Mon, 7 Oct 2024 08:44:14 -0300 Subject: [PATCH 1/3] Adjust max-width media query margin for mobile view --- plugins/main/public/styles/common.scss | 1 - plugins/main/public/styles/media-queries.scss | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/main/public/styles/common.scss b/plugins/main/public/styles/common.scss index a6fbe6be15..b9e4429542 100644 --- a/plugins/main/public/styles/common.scss +++ b/plugins/main/public/styles/common.scss @@ -1439,7 +1439,6 @@ div.euiPopover__panel.euiPopover__panel-isOpen.euiPopover__panel--bottom.wz-menu } .globalFilterGroup__wrapper { - max-height: 100px; height: auto !important; } diff --git a/plugins/main/public/styles/media-queries.scss b/plugins/main/public/styles/media-queries.scss index 1e32884ace..18af6680d5 100644 --- a/plugins/main/public/styles/media-queries.scss +++ b/plugins/main/public/styles/media-queries.scss @@ -124,4 +124,10 @@ margin-top: 10px; } } + + @media only screen and (max-width: 574px) { + .globalFilterGroup__wrapper-isVisible { + margin-top: -6px; + } + } } From 5d9a1fc1b870231bb6d2da10edc4063bbab1e297 Mon Sep 17 00:00:00 2001 From: Guido Modarelli Date: Mon, 7 Oct 2024 08:48:10 -0300 Subject: [PATCH 2/3] Fix filter management prevent hiding when adding multiple filters --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8f3be31da..08337fc7e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ All notable changes to the Wazuh app project will be documented in this file. - Fixed no-agent-alert spawn with selected agent in agent-welcome view [#7029](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7029) - Fixed security policy exception when it contained deprecated actions [#7042](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7042) - Fix export formatted csv data with special characters from tables [#7048](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7048) +- Fixed filter management to prevent hiding when adding multiple filters [#7077](https://github.com/wazuh/wazuh-dashboard-plugins/pull/7077) ### Removed From 48c74df314762c094bdc579e346ff2ecd81eeec3 Mon Sep 17 00:00:00 2001 From: Guido Modarelli Date: Wed, 9 Oct 2024 10:54:34 -0300 Subject: [PATCH 3/3] Refactor search bar styles for responsiveness --- .../components/common/modules/module.scss | 4 -- .../common/search-bar/search-bar.scss | 66 +++++++++++++++++-- .../common/search-bar/search-bar.tsx | 5 +- plugins/main/public/styles/media-queries.scss | 45 ------------- 4 files changed, 65 insertions(+), 55 deletions(-) diff --git a/plugins/main/public/components/common/modules/module.scss b/plugins/main/public/components/common/modules/module.scss index fd906406cd..8182b3d601 100644 --- a/plugins/main/public/components/common/modules/module.scss +++ b/plugins/main/public/components/common/modules/module.scss @@ -106,10 +106,6 @@ discover-app-w .sidebar-container { margin-top: -160px; } - .wz-module-header-nav { - padding-bottom: 16px; - } - .wz-module-body-agent-info > .euiFlexGroup > .euiFlexItem { max-width: unset !important; } diff --git a/plugins/main/public/components/common/search-bar/search-bar.scss b/plugins/main/public/components/common/search-bar/search-bar.scss index f45d922c38..badec25a41 100644 --- a/plugins/main/public/components/common/search-bar/search-bar.scss +++ b/plugins/main/public/components/common/search-bar/search-bar.scss @@ -1,8 +1,8 @@ -.wz-search-bar-no-padding .globalQueryBar:not(:empty) { - padding: 0px !important; -} - .wz-search-bar { + &.no-padding .globalQueryBar:not(:empty) { + padding: 0px !important; + } + > .euiFlexGroup { &:first-child { #GlobalFilterGroup { @@ -10,4 +10,62 @@ } } } + + &-query { + .osdQueryBar--withDatePicker { + align-items: flex-end; + + > :first-child { + margin-top: 8px; + margin-bottom: 4px !important; + + @media only screen and (max-width: 574px) { + margin-top: -8px; + } + } + } + } + + @media only screen and (min-width: 575px) and (max-width: 767px) { + .globalFilterGroup__filterBar { + margin-top: 4px; + } + + .globalFilterGroup__wrapper-isVisible { + margin-top: 0; + } + + .euiFlexGroup--responsive > .euiFlexItem { + margin-bottom: 0 !important; + } + } + + @media only screen and (max-width: 767px) { + .euiFlexGroup--responsive { + -webkit-flex-wrap: wrap; + flex-wrap: wrap; + margin-left: 0; + margin-right: 0; + margin-bottom: 1px; + } + } + + @media only screen and (max-width: 574px) { + .globalFilterGroup__wrapper-isVisible { + margin-top: -6px; + } + + .euiFlexGroup--responsive { + margin-bottom: -3px; + } + + > .euiFlexGroup.euiFlexGroup--gutterSmall.euiFlexGroup--directionRow.euiFlexGroup--responsive + > .euiFlexItem.euiFlexItem--flexGrowZero { + margin-bottom: 6px !important; + } + + .osdQueryBar--withDatePicker > :first-child { + margin-top: -8px; + } + } } diff --git a/plugins/main/public/components/common/search-bar/search-bar.tsx b/plugins/main/public/components/common/search-bar/search-bar.tsx index c6cc9a4bf9..e12a317b76 100644 --- a/plugins/main/public/components/common/search-bar/search-bar.tsx +++ b/plugins/main/public/components/common/search-bar/search-bar.tsx @@ -35,7 +35,7 @@ export const WzSearchBar = ({ return ( {showQuery ? ( ) : null} {showFilters ? ( - + {hideFixedFilters ? null : ( .euiFlexItem { - margin-bottom: 0 !important; - } - } - - @media only screen and (min-width: 575px) and (max-width: 767px) { - .globalFilterGroup__wrapper-isVisible { - .euiFlexItem.euiFlexItem--flexGrowZero { - margin-bottom: 0px; - } - } - } - - @media only screen and (min-width: 575px) and (max-width: 767px) { - .euiFlexGroup--responsive { - -webkit-flex-wrap: wrap; - flex-wrap: wrap; - margin-left: 0; - margin-right: 0; - margin-bottom: 6px; - margin-top: 10px; - } - } - - @media only screen and (max-width: 574px) { - .globalFilterGroup__wrapper-isVisible { - margin-top: -6px; - } - } -}