From 88a5cc0294facdc56e6beb39f40dff0362101a3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kjell=20H=C3=A5land?= Date: Thu, 15 Feb 2024 09:30:27 +0100 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=90=9B=20:=20Fixed=20cramped=20filter?= =?UTF-8?q?=20columns=20in=20QuickFilters=20(#586)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fixed cramped filter rows in QuickFilters * Bumped package versions --- packages/power-bi/package.json | 2 +- .../src/lib/components/QuickFilter/QuickFilter.tsx | 10 +++++++--- .../components/quickFilterGroup/QuickFilterGroup.tsx | 5 +++-- .../quickFilterGroup/quickFilterGroup.styles.ts | 6 +++--- packages/workspace-fusion/package.json | 2 +- 5 files changed, 15 insertions(+), 10 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/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; 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 2b506fde0285df80fe0e7c0a43caf773a9d0bf7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kjell=20H=C3=A5land?= Date: Thu, 15 Feb 2024 12:03:13 +0100 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=90=9B=20Fixed=20cramped=20filter=20c?= =?UTF-8?q?olumns=20in=20QuickFilters=20(#587)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fixed cramped filter rows in QuickFilters * Bumped package versions * Updated hover-color for quick-filters --- packages/power-bi/package.json | 2 +- .../quickFilterGroup/QuickFilterGroup.tsx | 20 ++++++++++--------- .../quickFilterGroup.styles.ts | 7 +++++++ packages/workspace-fusion/package.json | 2 +- 4 files changed, 20 insertions(+), 11 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 && (