From 589900bb4bf508c52db55dcaeb0ec056ec58f0ef Mon Sep 17 00:00:00 2001 From: idrisbo <112471345+idrisbo@users.noreply.github.com> Date: Fri, 17 Nov 2023 11:59:32 +0100 Subject: [PATCH 1/7] Remove min width so search icon and text doesnt overlap --- .../src/lib/components/filterItems/filterItems.styles.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/power-bi/src/lib/components/filterItems/filterItems.styles.ts b/packages/power-bi/src/lib/components/filterItems/filterItems.styles.ts index 97c972c76..e63aa5a74 100644 --- a/packages/power-bi/src/lib/components/filterItems/filterItems.styles.ts +++ b/packages/power-bi/src/lib/components/filterItems/filterItems.styles.ts @@ -5,7 +5,6 @@ export const StyledFilterGroupContainer = styled.div` flex-direction: column; margin: 0rem 0.5rem; height: -webkit-fill-available; - min-width: 150px; `; export const StyledCheckboxWrap = styled.span` From 3d0081015e3b7936fdcaf60590e5e2a373d4126c Mon Sep 17 00:00:00 2001 From: idrisbo <112471345+idrisbo@users.noreply.github.com> Date: Fri, 17 Nov 2023 12:02:37 +0100 Subject: [PATCH 2/7] Bump 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 68d4c54de..92721f10e 100644 --- a/packages/power-bi/package.json +++ b/packages/power-bi/package.json @@ -1,6 +1,6 @@ { "name": "@equinor/workspace-powerbi", - "version": "1.0.7", + "version": "1.0.8", "type": "module", "sideEffects": false, "license": "MIT", diff --git a/packages/workspace-fusion/package.json b/packages/workspace-fusion/package.json index 8617a779d..b383745e8 100644 --- a/packages/workspace-fusion/package.json +++ b/packages/workspace-fusion/package.json @@ -1,6 +1,6 @@ { "name": "@equinor/workspace-fusion", - "version": "6.0.0", + "version": "6.0.1", "type": "module", "sideEffects": false, "license": "MIT", From 81be7d91089c06bc7ef25efa67e55830e8b8dfab Mon Sep 17 00:00:00 2001 From: Gustav Eikaas Date: Fri, 17 Nov 2023 12:09:38 +0100 Subject: [PATCH 3/7] feat: :sparkles: ag grid cell selection --- packages/ag-grid/package.json | 2 +- packages/workspace-fusion/package.json | 2 +- .../src/modules/grid/components/GridWrapper.tsx | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/ag-grid/package.json b/packages/ag-grid/package.json index 6b84b7b7d..a074c0276 100644 --- a/packages/ag-grid/package.json +++ b/packages/ag-grid/package.json @@ -1,6 +1,6 @@ { "name": "@equinor/workspace-ag-grid", - "version": "2.0.3", + "version": "2.0.4", "type": "module", "private": false, "sideEffects": false, diff --git a/packages/workspace-fusion/package.json b/packages/workspace-fusion/package.json index 8617a779d..b383745e8 100644 --- a/packages/workspace-fusion/package.json +++ b/packages/workspace-fusion/package.json @@ -1,6 +1,6 @@ { "name": "@equinor/workspace-fusion", - "version": "6.0.0", + "version": "6.0.1", "type": "module", "sideEffects": false, "license": "MIT", diff --git a/packages/workspace-fusion/src/modules/grid/components/GridWrapper.tsx b/packages/workspace-fusion/src/modules/grid/components/GridWrapper.tsx index 920365e5b..75e36bd82 100644 --- a/packages/workspace-fusion/src/modules/grid/components/GridWrapper.tsx +++ b/packages/workspace-fusion/src/modules/grid/components/GridWrapper.tsx @@ -13,7 +13,7 @@ import { GridOptionPopover } from './GridOptionsPopover'; export type GridWrapperProps< TData extends Record, TContext extends Record = never, - TFilter = undefined, + TFilter = undefined > = { config: GridConfig; getIdentifier: GetIdentifier; @@ -22,7 +22,7 @@ export type GridWrapperProps< export const GridWrapper = < TData extends Record, TContext extends Record = never, - TFilter = undefined, + TFilter = undefined >({ config, getIdentifier, @@ -88,6 +88,8 @@ export const GridWrapper = < height={height} context={filterState} modules={config.modules} + enableCellTextSelection + ensureDomOrder /> ); @@ -118,6 +120,7 @@ function setDefaultColDef( ) { gridOptions.defaultColDef = { resizable: true, + onCellClicked: (a) => { if (!a.data) return; setSelected(a.data); From b85c9d90500adb31705dc80aa619d8d62864f4e4 Mon Sep 17 00:00:00 2001 From: Gustav-Eikaas Date: Fri, 17 Nov 2023 11:13:21 +0000 Subject: [PATCH 4/7] Prettified Code! --- .../src/modules/grid/components/GridWrapper.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/workspace-fusion/src/modules/grid/components/GridWrapper.tsx b/packages/workspace-fusion/src/modules/grid/components/GridWrapper.tsx index 75e36bd82..26cdcb085 100644 --- a/packages/workspace-fusion/src/modules/grid/components/GridWrapper.tsx +++ b/packages/workspace-fusion/src/modules/grid/components/GridWrapper.tsx @@ -13,7 +13,7 @@ import { GridOptionPopover } from './GridOptionsPopover'; export type GridWrapperProps< TData extends Record, TContext extends Record = never, - TFilter = undefined + TFilter = undefined, > = { config: GridConfig; getIdentifier: GetIdentifier; @@ -22,7 +22,7 @@ export type GridWrapperProps< export const GridWrapper = < TData extends Record, TContext extends Record = never, - TFilter = undefined + TFilter = undefined, >({ config, getIdentifier, From 6c71da5998697b13f7ef3b559ebabcffffd3feb0 Mon Sep 17 00:00:00 2001 From: Gustav Eikaas Date: Mon, 20 Nov 2023 08:28:30 +0100 Subject: [PATCH 5/7] fix filter sort order --- packages/filter/package.json | 2 +- .../lib/components/quickFilter/QuickFilter.tsx | 5 ++++- .../ToggleHideFilterPopover.tsx | 16 +++++++++------- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/packages/filter/package.json b/packages/filter/package.json index 0d1bdee1d..8e8439cbf 100644 --- a/packages/filter/package.json +++ b/packages/filter/package.json @@ -1,6 +1,6 @@ { "name": "@equinor/workspace-filter", - "version": "3.0.0", + "version": "3.0.1", "type": "module", "sideEffects": false, "license": "MIT", diff --git a/packages/filter/src/lib/components/quickFilter/QuickFilter.tsx b/packages/filter/src/lib/components/quickFilter/QuickFilter.tsx index e520e2556..c029a0bc7 100644 --- a/packages/filter/src/lib/components/quickFilter/QuickFilter.tsx +++ b/packages/filter/src/lib/components/quickFilter/QuickFilter.tsx @@ -129,7 +129,10 @@ const QuickFilterReady = ({ groups }: QuickFilterReadyProps) => { {isFilterExpanded && ( - visibleFilterGroups.includes(s.name))} /> + groups.find((s) => s.name === x)).filter(Boolean) as IFilterGroup[]} + /> )} ); diff --git a/packages/filter/src/lib/components/toggleHideFilterPopover/ToggleHideFilterPopover.tsx b/packages/filter/src/lib/components/toggleHideFilterPopover/ToggleHideFilterPopover.tsx index 653aa8781..63bee76d7 100644 --- a/packages/filter/src/lib/components/toggleHideFilterPopover/ToggleHideFilterPopover.tsx +++ b/packages/filter/src/lib/components/toggleHideFilterPopover/ToggleHideFilterPopover.tsx @@ -2,7 +2,6 @@ import { Icon, Checkbox, Popover } from '@equinor/eds-core-react'; import { tokens } from '@equinor/eds-tokens'; import { useState, useRef } from 'react'; import { ReactSortable } from 'react-sortablejs'; -import { SortObject } from '../../types/sortObject'; import { StyledButton, StyledItemWrapper, StyledPopoverList } from './toggleHideFilterPopover.styles'; interface ShowHideFilterButtonProps { @@ -19,18 +18,19 @@ export const ToggleHideFilterPopover = ({ const [isOpen, setIsOpen] = useState(false); const ref = useRef(null); - const [list, setList] = useState[]>(allFilters.map((s) => ({ id: s, item: s }))); + const listRef = useRef(allFilters.map((s) => ({ id: s, item: s }))); const handleChange = (val: string) => { if (visibleFilters.includes(val)) { - setVisibleFilters(visibleFilters.filter((s) => s !== val)); + setVisibleFilters([...visibleFilters.filter((s) => s !== val)]); } else { setVisibleFilters([...visibleFilters, val]); } }; const DraggableHandleSelector = 'globalDraggableHandle'; - const updateList = () => setVisibleFilters(list.map((s) => s.item).filter((s) => visibleFilters.includes(s))); + const updateList = () => + setVisibleFilters(listRef.current.map((s) => s.item).filter((s) => visibleFilters.includes(s))); return ( <> @@ -51,11 +51,13 @@ export const ToggleHideFilterPopover = ({ { + listRef.current = e; + }} onEnd={updateList} > - {list.map(({ item }) => ( + {listRef.current.map(({ item }) => ( Date: Mon, 20 Nov 2023 08:35:40 +0100 Subject: [PATCH 6/7] chore: bump workspace --- packages/workspace-fusion/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/workspace-fusion/package.json b/packages/workspace-fusion/package.json index b383745e8..ab743bce9 100644 --- a/packages/workspace-fusion/package.json +++ b/packages/workspace-fusion/package.json @@ -1,6 +1,6 @@ { "name": "@equinor/workspace-fusion", - "version": "6.0.1", + "version": "6.0.2", "type": "module", "sideEffects": false, "license": "MIT", From bd33e043ec2f2962e82cf2fe57e8faad7a5e9544 Mon Sep 17 00:00:00 2001 From: Gustav Eikaas Date: Mon, 20 Nov 2023 08:36:59 +0100 Subject: [PATCH 7/7] fix: :bug: detailSidesheet overshadowing create sidesheet --- .../src/lib/context/WorkspaceControllerContext.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/workspace-fusion/src/lib/context/WorkspaceControllerContext.tsx b/packages/workspace-fusion/src/lib/context/WorkspaceControllerContext.tsx index a4ea20676..0ba289945 100644 --- a/packages/workspace-fusion/src/lib/context/WorkspaceControllerContext.tsx +++ b/packages/workspace-fusion/src/lib/context/WorkspaceControllerContext.tsx @@ -21,7 +21,10 @@ export function WorkspaceContextProvider(props: WorkspaceContextProviderProps handleTabChange, updatePayload, isCreateSidesheetOpen, - openCreateSidesheet: () => setCreateSidesheetOpen(true), + openCreateSidesheet: () => { + clearSelection(); + setCreateSidesheetOpen(true); + }, closeCreateSidesheet: () => setCreateSidesheetOpen(false), clearSelection, selectById,