From e973f72f287eb0a0c76fe0ea24e4e5e810fb25f2 Mon Sep 17 00:00:00 2001 From: Kjell Haaland Date: Thu, 15 Feb 2024 09:17:51 +0100 Subject: [PATCH 1/3] Fixed cramped filter rows in QuickFilters --- .../src/lib/components/QuickFilter/QuickFilter.tsx | 10 +++++++--- .../components/quickFilterGroup/QuickFilterGroup.tsx | 5 +++-- .../quickFilterGroup/quickFilterGroup.styles.ts | 6 +++--- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/packages/power-bi/src/lib/components/QuickFilter/QuickFilter.tsx b/packages/power-bi/src/lib/components/QuickFilter/QuickFilter.tsx index 442013ddf..1f5c45bd6 100644 --- a/packages/power-bi/src/lib/components/QuickFilter/QuickFilter.tsx +++ b/packages/power-bi/src/lib/components/QuickFilter/QuickFilter.tsx @@ -103,10 +103,14 @@ const StyledFilterButtons = styled.div` const StyledQuickFilterWrapper = styled.div` display: grid; width: 100%; - justify-content: flex-end; - grid-template-columns: repeat(auto-fit, minmax(60px, max-content)); - gap: 2em; + justify-content: flex-start; + grid-template-columns: repeat(auto-fit, minmax(max-content, 50px)); grid-template-rows: 1fr; + gap: 10px; + align-items: center; + overflow-x: hidden; + padding-left: 10px; + padding-right: 10px; `; const FilterButtonContainer = styled.div` diff --git a/packages/power-bi/src/lib/components/quickFilterGroup/QuickFilterGroup.tsx b/packages/power-bi/src/lib/components/quickFilterGroup/QuickFilterGroup.tsx index c293583e5..bd2edd5fd 100644 --- a/packages/power-bi/src/lib/components/quickFilterGroup/QuickFilterGroup.tsx +++ b/packages/power-bi/src/lib/components/quickFilterGroup/QuickFilterGroup.tsx @@ -24,8 +24,9 @@ export const PowerBiFilterGroup = ({ if (!activeFilters) return null; const isAllChecked = activeFilters.length === 0 || activeFilters.length === group.filterVals.length; + return ( -
+ <> setIsOpen((s) => !s)} ref={anchorEl}>
{getFilterHeaderText( @@ -48,6 +49,6 @@ export const PowerBiFilterGroup = ({ onCloseMenu={() => setIsOpen(false)} /> )} -
+ ); }; diff --git a/packages/power-bi/src/lib/components/quickFilterGroup/quickFilterGroup.styles.ts b/packages/power-bi/src/lib/components/quickFilterGroup/quickFilterGroup.styles.ts index 1e2488add..f13b8bb6e 100644 --- a/packages/power-bi/src/lib/components/quickFilterGroup/quickFilterGroup.styles.ts +++ b/packages/power-bi/src/lib/components/quickFilterGroup/quickFilterGroup.styles.ts @@ -2,12 +2,12 @@ import { tokens } from '@equinor/eds-tokens'; import styled from 'styled-components'; export const StyledFilterGroupWrapper = styled.div` - height: auto; - width: auto; + height: 50px; + width: min-content; display: flex; align-items: center; cursor: pointer; - + justify-content: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; From 34fea4eaf9e377211acb6b21f03c4b8c848ad5ae Mon Sep 17 00:00:00 2001 From: Kjell Haaland Date: Thu, 15 Feb 2024 09:27:47 +0100 Subject: [PATCH 2/3] Bumped package versions --- packages/power-bi/package.json | 2 +- packages/workspace-fusion/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/power-bi/package.json b/packages/power-bi/package.json index fee7d3d85..62fa346c1 100644 --- a/packages/power-bi/package.json +++ b/packages/power-bi/package.json @@ -1,6 +1,6 @@ { "name": "@equinor/workspace-powerbi", - "version": "1.0.14", + "version": "1.0.15", "type": "module", "sideEffects": false, "license": "MIT", diff --git a/packages/workspace-fusion/package.json b/packages/workspace-fusion/package.json index 5360306d9..e35167d4f 100644 --- a/packages/workspace-fusion/package.json +++ b/packages/workspace-fusion/package.json @@ -1,6 +1,6 @@ { "name": "@equinor/workspace-fusion", - "version": "7.0.4", + "version": "7.0.5", "type": "module", "sideEffects": false, "license": "MIT", From b0f293da881c578f4cce835ccb3861253a7b0c20 Mon Sep 17 00:00:00 2001 From: Kjell Haaland Date: Thu, 15 Feb 2024 11:14:07 +0100 Subject: [PATCH 3/3] Updated hover-color for quick-filters --- packages/power-bi/package.json | 2 +- .../quickFilterGroup/QuickFilterGroup.tsx | 20 ++++++++++--------- .../quickFilterGroup.styles.ts | 9 ++++++++- packages/workspace-fusion/package.json | 2 +- 4 files changed, 21 insertions(+), 12 deletions(-) diff --git a/packages/power-bi/package.json b/packages/power-bi/package.json index 62fa346c1..6b2bc8f56 100644 --- a/packages/power-bi/package.json +++ b/packages/power-bi/package.json @@ -1,6 +1,6 @@ { "name": "@equinor/workspace-powerbi", - "version": "1.0.15", + "version": "1.0.16", "type": "module", "sideEffects": false, "license": "MIT", diff --git a/packages/power-bi/src/lib/components/quickFilterGroup/QuickFilterGroup.tsx b/packages/power-bi/src/lib/components/quickFilterGroup/QuickFilterGroup.tsx index bd2edd5fd..d43e3677d 100644 --- a/packages/power-bi/src/lib/components/quickFilterGroup/QuickFilterGroup.tsx +++ b/packages/power-bi/src/lib/components/quickFilterGroup/QuickFilterGroup.tsx @@ -5,7 +5,7 @@ import { ActiveFilter, PowerBiFilter, PowerBiFilterItem } from '../../types'; import { getFilterHeaderText } from '../../utils/getFilterHeader'; import { FilterController } from '../Filter/Filter'; import { PowerBiGroupPopoverMenu } from '../groupPopoverMenu/GroupPopoverMenu'; -import { StyledFilterGroupWrapper } from './quickFilterGroup.styles'; +import { StyledFilterGroupContent, StyledFilterGroupWrapper } from './quickFilterGroup.styles'; interface PowerBiFilterGroupProps { controller: FilterController; @@ -28,15 +28,17 @@ export const PowerBiFilterGroup = ({ return ( <> setIsOpen((s) => !s)} ref={anchorEl}> -
- {getFilterHeaderText( - isAllChecked, - group.type, - activeFilters.map((s) => s?.toString() ?? '(Blank)') - )} -
+ +
+ {getFilterHeaderText( + isAllChecked, + group.type, + activeFilters.map((s) => s?.toString() ?? '(Blank)') + )} +
- + +
{isOpen && (