From 36e1da3f5503e4ee0e40dc035a3db4b74ee2b41e Mon Sep 17 00:00:00 2001 From: dvmartinweigl Date: Tue, 17 Oct 2023 11:55:53 +0200 Subject: [PATCH 01/30] center barChart loader --- src/vis/bar/BarChart.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/vis/bar/BarChart.tsx b/src/vis/bar/BarChart.tsx index 40ff0ecff..dbc4067e6 100644 --- a/src/vis/bar/BarChart.tsx +++ b/src/vis/bar/BarChart.tsx @@ -1,4 +1,4 @@ -import { Box, Loader, SimpleGrid, Stack } from '@mantine/core'; +import { Box, Loader, SimpleGrid, Stack, Center } from '@mantine/core'; import { op } from 'arquero'; import React, { useCallback, useMemo } from 'react'; import { useAsync } from '../../hooks/useAsync'; @@ -97,7 +97,9 @@ export function BarChart({ {colsStatus !== 'success' ? ( - +
+ +
) : !config.multiples || !allColumns.multiplesColVals ? ( Date: Tue, 17 Oct 2023 14:17:12 +0200 Subject: [PATCH 02/30] fix vis storybook --- src/vis/sidebar/VisTypeSelect.tsx | 3 +-- src/vis/stories/Vis/Bar/BarRandom.stories.tsx | 11 +++++++---- .../Vis/Correlation/CorrelationIris.stories.tsx | 11 +++++++---- src/vis/stories/Vis/Heatmap/HeatmapRandom.stories.tsx | 11 +++++++---- src/vis/stories/Vis/Hexbin/HexbinRandom.stories.tsx | 11 +++++++---- .../stories/Vis/Raincloud/RaincloudRandom.stories.tsx | 11 +++++++---- src/vis/stories/Vis/Scatter/ScatterIris.stories.tsx | 11 +++++++---- src/vis/stories/Vis/Scatter/ScatterRandom.stories.tsx | 11 +++++++---- src/vis/stories/Vis/Violin/ViolinIris.stories.tsx | 11 +++++++---- 9 files changed, 57 insertions(+), 34 deletions(-) diff --git a/src/vis/sidebar/VisTypeSelect.tsx b/src/vis/sidebar/VisTypeSelect.tsx index 8940d4556..31c0e2ff0 100644 --- a/src/vis/sidebar/VisTypeSelect.tsx +++ b/src/vis/sidebar/VisTypeSelect.tsx @@ -15,6 +15,7 @@ interface ItemProps extends React.ComponentPropsWithoutRef<'div'> { description: string; } +// eslint-disable-next-line react/display-name const SelectItem = React.forwardRef(({ image, label, description, ...others }: ItemProps, ref) => (
{label} @@ -24,8 +25,6 @@ const SelectItem = React.forwardRef(({ image, label,
)); -SelectItem.displayName = '@mantine/core/SelectItem'; - export function VisTypeSelect({ callback, currentSelected }: VisTypeSelectProps) { const { visTypes, getVisByType } = useVisProvider(); diff --git a/src/vis/stories/Vis/Bar/BarRandom.stories.tsx b/src/vis/stories/Vis/Bar/BarRandom.stories.tsx index f73a9a880..da050a9be 100644 --- a/src/vis/stories/Vis/Bar/BarRandom.stories.tsx +++ b/src/vis/stories/Vis/Bar/BarRandom.stories.tsx @@ -1,6 +1,7 @@ import { ComponentStory } from '@storybook/react'; import React from 'react'; import { Vis } from '../../../LazyVis'; +import { VisProvider } from '../../../Provider'; import { EBarDirection, EBarDisplayType, EBarGroupingType } from '../../../bar/interfaces'; import { BaseVisConfig, EAggregateTypes, EColumnTypes, ESupportedPlotlyVis, VisColumn } from '../../../interfaces'; @@ -119,11 +120,13 @@ const Template: ComponentStory = (args) => { const columns = React.useMemo(() => fetchData(args.pointCount), [args.pointCount]); return ( -
-
- + +
+
+ +
-
+ ); }; // More on args: https://storybook.js.org/docs/react/writing-stories/args diff --git a/src/vis/stories/Vis/Correlation/CorrelationIris.stories.tsx b/src/vis/stories/Vis/Correlation/CorrelationIris.stories.tsx index 5f3163c92..58a40691d 100644 --- a/src/vis/stories/Vis/Correlation/CorrelationIris.stories.tsx +++ b/src/vis/stories/Vis/Correlation/CorrelationIris.stories.tsx @@ -1,6 +1,7 @@ import { ComponentStory } from '@storybook/react'; import React, { useState } from 'react'; import { Vis } from '../../../LazyVis'; +import { VisProvider } from '../../../Provider'; import { ECorrelationType } from '../../../correlation/interfaces'; import { BaseVisConfig, EScaleType, ESupportedPlotlyVis } from '../../../interfaces'; import { fetchIrisData } from '../../fetchIrisData'; @@ -22,11 +23,13 @@ const Template: ComponentStory = (args) => { const [selection, setSelection] = useState([]); return ( -
-
- + +
+
+ +
-
+ ); }; diff --git a/src/vis/stories/Vis/Heatmap/HeatmapRandom.stories.tsx b/src/vis/stories/Vis/Heatmap/HeatmapRandom.stories.tsx index ba26f6463..26d7dad43 100644 --- a/src/vis/stories/Vis/Heatmap/HeatmapRandom.stories.tsx +++ b/src/vis/stories/Vis/Heatmap/HeatmapRandom.stories.tsx @@ -2,6 +2,7 @@ import { ComponentStory } from '@storybook/react'; import * as d3 from 'd3v7'; import React from 'react'; import { Vis } from '../../../LazyVis'; +import { VisProvider } from '../../../Provider'; import { ESortTypes } from '../../../heatmap/interfaces'; import { BaseVisConfig, EAggregateTypes, EColumnTypes, ENumericalColorScaleType, ESupportedPlotlyVis, VisColumn } from '../../../interfaces'; @@ -125,11 +126,13 @@ const Template: ComponentStory = (args) => { const [selected, setSelected] = React.useState([]); return ( -
-
- + +
+
+ +
-
+ ); }; // More on args: https://storybook.js.org/docs/react/writing-stories/args diff --git a/src/vis/stories/Vis/Hexbin/HexbinRandom.stories.tsx b/src/vis/stories/Vis/Hexbin/HexbinRandom.stories.tsx index 44cf32f7c..485167000 100644 --- a/src/vis/stories/Vis/Hexbin/HexbinRandom.stories.tsx +++ b/src/vis/stories/Vis/Hexbin/HexbinRandom.stories.tsx @@ -1,6 +1,7 @@ import { ComponentStory } from '@storybook/react'; import React from 'react'; import { Vis } from '../../../LazyVis'; +import { VisProvider } from '../../../Provider'; import { EHexbinOptions } from '../../../hexbin/interfaces'; import { BaseVisConfig, EColumnTypes, EScatterSelectSettings, ESupportedPlotlyVis, VisColumn } from '../../../interfaces'; @@ -96,11 +97,13 @@ const Template: ComponentStory = (args) => { const columns = React.useMemo(() => fetchData(args.pointCount), [args.pointCount]); return ( -
-
- + +
+
+ +
-
+ ); }; // More on args: https://storybook.js.org/docs/react/writing-stories/args diff --git a/src/vis/stories/Vis/Raincloud/RaincloudRandom.stories.tsx b/src/vis/stories/Vis/Raincloud/RaincloudRandom.stories.tsx index f590ed0ee..7eee5d333 100644 --- a/src/vis/stories/Vis/Raincloud/RaincloudRandom.stories.tsx +++ b/src/vis/stories/Vis/Raincloud/RaincloudRandom.stories.tsx @@ -1,6 +1,7 @@ import { ComponentStory } from '@storybook/react'; import React from 'react'; import { Vis } from '../../../LazyVis'; +import { VisProvider } from '../../../Provider'; import { BaseVisConfig, EColumnTypes, ESupportedPlotlyVis, VisColumn } from '../../../interfaces'; import { ECloudType, ELightningType, ERainType } from '../../../raincloud/interfaces'; @@ -128,11 +129,13 @@ const Template: ComponentStory = (args) => { const [selected, setSelected] = React.useState([]); return ( -
-
- + +
+
+ +
-
+ ); }; // More on args: https://storybook.js.org/docs/react/writing-stories/args diff --git a/src/vis/stories/Vis/Scatter/ScatterIris.stories.tsx b/src/vis/stories/Vis/Scatter/ScatterIris.stories.tsx index 0ed90ce52..cb4caf792 100644 --- a/src/vis/stories/Vis/Scatter/ScatterIris.stories.tsx +++ b/src/vis/stories/Vis/Scatter/ScatterIris.stories.tsx @@ -1,6 +1,7 @@ import { ComponentStory } from '@storybook/react'; import React, { useState } from 'react'; import { Vis } from '../../../LazyVis'; +import { VisProvider } from '../../../Provider'; import { BaseVisConfig, ENumericalColorScaleType, EScatterSelectSettings, ESupportedPlotlyVis } from '../../../interfaces'; import { fetchIrisData } from '../../fetchIrisData'; @@ -18,11 +19,13 @@ const Template: ComponentStory = (args) => { const [selection, setSelection] = useState([]); return ( -
-
- + +
+
+ +
-
+ ); }; diff --git a/src/vis/stories/Vis/Scatter/ScatterRandom.stories.tsx b/src/vis/stories/Vis/Scatter/ScatterRandom.stories.tsx index 1b4f64de9..91e59eedf 100644 --- a/src/vis/stories/Vis/Scatter/ScatterRandom.stories.tsx +++ b/src/vis/stories/Vis/Scatter/ScatterRandom.stories.tsx @@ -1,6 +1,7 @@ import { ComponentStory } from '@storybook/react'; import React from 'react'; import { Vis } from '../../../LazyVis'; +import { VisProvider } from '../../../Provider'; import { BaseVisConfig, EColumnTypes, ENumericalColorScaleType, EScatterSelectSettings, ESupportedPlotlyVis, VisColumn } from '../../../interfaces'; function RNG(seed) { @@ -107,11 +108,13 @@ const Template: ComponentStory = (args) => { const [selected, setSelected] = React.useState([]); return ( -
-
- + +
+
+ +
-
+ ); }; // More on args: https://storybook.js.org/docs/react/writing-stories/args diff --git a/src/vis/stories/Vis/Violin/ViolinIris.stories.tsx b/src/vis/stories/Vis/Violin/ViolinIris.stories.tsx index db316fbae..72329b34c 100644 --- a/src/vis/stories/Vis/Violin/ViolinIris.stories.tsx +++ b/src/vis/stories/Vis/Violin/ViolinIris.stories.tsx @@ -1,6 +1,7 @@ import { ComponentStory } from '@storybook/react'; import React from 'react'; import { Vis } from '../../../LazyVis'; +import { VisProvider } from '../../../Provider'; import { BaseVisConfig, ESupportedPlotlyVis } from '../../../interfaces'; import { EViolinOverlay } from '../../../violin/interfaces'; import { fetchIrisData } from '../../fetchIrisData'; @@ -17,11 +18,13 @@ export default { const Template: ComponentStory = (args) => { const columns = React.useMemo(() => fetchIrisData(), []); return ( -
-
- + +
+
+ +
-
+ ); }; From ff2a4374af4d740beda8ca10f739b7cc62325c98 Mon Sep 17 00:00:00 2001 From: dvmartinweigl Date: Tue, 17 Oct 2023 14:43:47 +0200 Subject: [PATCH 03/30] add column description to correlation matrix --- src/vis/correlation/CorrelationMatrix.tsx | 31 ++++++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/src/vis/correlation/CorrelationMatrix.tsx b/src/vis/correlation/CorrelationMatrix.tsx index 11cbe75a1..115bcfe74 100644 --- a/src/vis/correlation/CorrelationMatrix.tsx +++ b/src/vis/correlation/CorrelationMatrix.tsx @@ -1,4 +1,4 @@ -import { Box, Center, Group, Loader, Stack, Text } from '@mantine/core'; +import { Box, Center, Group, Loader, Stack, Text, Tooltip } from '@mantine/core'; import { useResizeObserver } from '@mantine/hooks'; import * as d3 from 'd3v7'; import { scaleBand } from 'd3v7'; @@ -144,9 +144,32 @@ export function CorrelationMatrix({ config, columns }: { config: ICorrelationCon
- - {col.info.name} - + + {col.info.name} + {col.info.description && ( + + {col.info.description} + + )} + + } + arrowSize={6} + withinPortal + withArrow + > + + + {col.info.name} + + {col.info.description && ( + + {col.info.description} + + )} + +
From 1436d5ab2dff063c1524b730397df81dd598efb9 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Tue, 31 Oct 2023 16:57:34 +0100 Subject: [PATCH 04/30] prepare next dev version --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 32237c06d..affc28bda 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "visyn_core", "description": "Core repository for datavisyn applications.", - "version": "5.0.0", + "version": "5.0.1-SNAPSHOT", "author": { "name": "datavisyn GmbH", "email": "contact@datavisyn.io", @@ -167,7 +167,7 @@ "react-plotly.js": "^2.5.1", "react-spring": "^9.7.1", "use-deep-compare-effect": "^1.8.0", - "visyn_scripts": "^5.1.0" + "visyn_scripts": "git+ssh://git@github.com/datavisyn/visyn_scripts#develop" }, "devDependencies": { "@babel/core": "^7.17.7", From aad78ba1cacf4fa507d10f2c9b4938d7faa7ba14 Mon Sep 17 00:00:00 2001 From: Michael Puehringer Date: Wed, 1 Nov 2023 09:04:47 +0100 Subject: [PATCH 05/30] Remove prepack and change entrypoints to ts files --- package.json | 99 +++++++++++++++---------------- src/hooks/{index.tsx => index.ts} | 0 2 files changed, 49 insertions(+), 50 deletions(-) rename src/hooks/{index.tsx => index.ts} (100%) diff --git a/package.json b/package.json index affc28bda..f83c4c932 100644 --- a/package.json +++ b/package.json @@ -16,86 +16,86 @@ "type": "git", "url": "git@github.com:datavisyn/visyn_core.git" }, - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "src/index.ts", + "types": "src/index.ts", "exports": { ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.js" + "types": "./src/index.ts", + "import": "./src/index.ts", + "default": "./src/index.ts" }, "./app": { - "types": "./dist/app/index.d.ts", - "import": "./dist/app/index.js", - "default": "./dist/app/index.js" + "types": "./src/app/index.ts", + "import": "./src/app/index.ts", + "default": "./src/app/index.ts" }, "./base": { - "types": "./dist/base/index.d.ts", - "import": "./dist/base/index.js", - "default": "./dist/base/index.js" + "types": "./src/base/index.ts", + "import": "./src/base/index.ts", + "default": "./src/base/index.ts" }, "./components": { - "types": "./dist/components/index.d.ts", - "import": "./dist/components/index.js", - "default": "./dist/components/index.js" + "types": "./src/components/index.ts", + "import": "./src/components/index.ts", + "default": "./src/components/index.ts" }, "./hooks": { - "types": "./dist/hooks/index.d.ts", - "import": "./dist/hooks/index.js", - "default": "./dist/hooks/index.js" + "types": "./src/hooks/index.ts", + "import": "./src/hooks/index.ts", + "default": "./src/hooks/index.ts" }, "./i18n": { - "types": "./dist/i18n/index.d.ts", - "import": "./dist/i18n/index.js", - "default": "./dist/i18n/index.js" + "types": "./src/i18n/index.ts", + "import": "./src/i18n/index.ts", + "default": "./src/i18n/index.ts" }, "./idtype": { - "types": "./dist/idtype/index.d.ts", - "import": "./dist/idtype/index.js", - "default": "./dist/idtype/index.js" + "types": "./src/idtype/index.ts", + "import": "./src/idtype/index.ts", + "default": "./src/idtype/index.ts" }, "./plotly/full": { - "types": "./dist/plotly/full/index.d.ts", - "import": "./dist/plotly/full/index.js", - "default": "./dist/plotly/full/index.js" + "types": "./src/plotly/full/index.ts", + "import": "./src/plotly/full/index.ts", + "default": "./src/plotly/full/index.ts" }, "./plotly": { - "types": "./dist/plotly/index.d.ts", - "import": "./dist/plotly/index.js", - "default": "./dist/plotly/index.js" + "types": "./src/plotly/index.tsx", + "import": "./src/plotly/index.tsx", + "default": "./src/plotly/index.tsx" }, "./plugin": { - "types": "./dist/plugin/index.d.ts", - "import": "./dist/plugin/index.js", - "default": "./dist/plugin/index.js" + "types": "./src/plugin/index.ts", + "import": "./src/plugin/index.ts", + "default": "./src/plugin/index.ts" }, "./ranking": { - "types": "./dist/ranking/index.d.ts", - "import": "./dist/ranking/index.js", - "default": "./dist/ranking/index.js" + "types": "./src/ranking/index.ts", + "import": "./src/ranking/index.ts", + "default": "./src/ranking/index.ts" }, "./security": { - "types": "./dist/security/index.d.ts", - "import": "./dist/security/index.js", - "default": "./dist/security/index.js" + "types": "./src/security/index.ts", + "import": "./src/security/index.ts", + "default": "./src/security/index.ts" }, "./utils": { - "types": "./dist/utils/index.d.ts", - "import": "./dist/utils/index.js", - "default": "./dist/utils/index.js" + "types": "./src/utils/index.ts", + "import": "./src/utils/index.ts", + "default": "./src/utils/index.ts" }, "./views": { - "types": "./dist/views/index.d.ts", - "import": "./dist/views/index.js", - "default": "./dist/views/index.js" + "types": "./src/views/index.ts", + "import": "./src/views/index.ts", + "default": "./src/views/index.ts" }, "./vis": { - "types": "./dist/vis/index.d.ts", - "import": "./dist/vis/index.js", - "default": "./dist/vis/index.js" + "types": "./src/vis/index.ts", + "import": "./src/vis/index.ts", + "default": "./src/vis/index.ts" }, - "./dist/scss/main.scss": "./dist/scss/main.scss", - "./phovea_registry": "./dist/phovea_registry.js", + "./src/scss/main.scss": "./src/scss/main.scss", + "./phovea_registry": "./src/phovea_registry.ts", "./package.json": "./package.json" }, "files": [ @@ -121,7 +121,6 @@ "docs": "visyn_scripts docs", "lint:fix": "visyn_scripts lint --fix", "lint": "visyn_scripts lint", - "prepack": "yarn run build", "predist": "yarn run lint && yarn run test && yarn run build", "start:fast": "visyn_scripts start --env workspace_mode=single fast=true", "start": "visyn_scripts start --env workspace_mode=single", diff --git a/src/hooks/index.tsx b/src/hooks/index.ts similarity index 100% rename from src/hooks/index.tsx rename to src/hooks/index.ts From 6dc9061152272ce3d60670341efeb6abde4c1a65 Mon Sep 17 00:00:00 2001 From: Michael Puehringer Date: Thu, 2 Nov 2023 21:59:58 +0100 Subject: [PATCH 06/30] Refactor to array usage for package exports --- package.json | 241 +++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 193 insertions(+), 48 deletions(-) diff --git a/package.json b/package.json index f83c4c932..411276604 100644 --- a/package.json +++ b/package.json @@ -20,82 +20,227 @@ "types": "src/index.ts", "exports": { ".": { - "types": "./src/index.ts", - "import": "./src/index.ts", - "default": "./src/index.ts" + "types": [ + "./dist/index.d.ts", + "./src/index.ts" + ], + "import": [ + "./dist/index.js", + "./src/index.ts" + ], + "default": [ + "./dist/index.js", + "./src/index.ts" + ] }, "./app": { - "types": "./src/app/index.ts", - "import": "./src/app/index.ts", - "default": "./src/app/index.ts" + "types": [ + "./dist/index.d.ts", + "./src/app/index.ts" + ], + "import": [ + "./dist/index.js", + "./src/app/index.ts" + ], + "default": [ + "./dist/index.js", + "./src/app/index.ts" + ] }, "./base": { - "types": "./src/base/index.ts", - "import": "./src/base/index.ts", - "default": "./src/base/index.ts" + "types": [ + "./dist/index.d.ts", + "./src/base/index.ts" + ], + "import": [ + "./dist/index.js", + "./src/base/index.ts" + ], + "default": [ + "./dist/index.js", + "./src/base/index.ts" + ] }, "./components": { - "types": "./src/components/index.ts", - "import": "./src/components/index.ts", - "default": "./src/components/index.ts" + "types": [ + "./dist/index.d.ts", + "./src/components/index.ts" + ], + "import": [ + "./dist/index.js", + "./src/components/index.ts" + ], + "default": [ + "./dist/index.js", + "./src/components/index.ts" + ] }, "./hooks": { - "types": "./src/hooks/index.ts", - "import": "./src/hooks/index.ts", - "default": "./src/hooks/index.ts" + "types": [ + "./dist/index.d.ts", + "./src/hooks/index.ts" + ], + "import": [ + "./dist/index.js", + "./src/hooks/index.ts" + ], + "default": [ + "./dist/index.js", + "./src/hooks/index.ts" + ] }, "./i18n": { - "types": "./src/i18n/index.ts", - "import": "./src/i18n/index.ts", - "default": "./src/i18n/index.ts" + "types": [ + "./dist/index.d.ts", + "./src/i18n/index.ts" + ], + "import": [ + "./dist/index.js", + "./src/i18n/index.ts" + ], + "default": [ + "./dist/index.js", + "./src/i18n/index.ts" + ] }, "./idtype": { - "types": "./src/idtype/index.ts", - "import": "./src/idtype/index.ts", - "default": "./src/idtype/index.ts" + "types": [ + "./dist/index.d.ts", + "./src/idtype/index.ts" + ], + "import": [ + "./dist/index.js", + "./src/idtype/index.ts" + ], + "default": [ + "./dist/index.js", + "./src/idtype/index.ts" + ] }, "./plotly/full": { - "types": "./src/plotly/full/index.ts", - "import": "./src/plotly/full/index.ts", - "default": "./src/plotly/full/index.ts" + "types": [ + "./dist/index.d.ts", + "./src/plotly/full/index.ts" + ], + "import": [ + "./dist/index.js", + "./src/plotly/full/index.ts" + ], + "default": [ + "./dist/index.js", + "./src/plotly/full/index.ts" + ] }, "./plotly": { - "types": "./src/plotly/index.tsx", - "import": "./src/plotly/index.tsx", - "default": "./src/plotly/index.tsx" + "types": [ + "./dist/index.d.ts", + "./src/plotly/index.tsx" + ], + "import": [ + "./dist/index.js", + "./src/plotly/index.tsx" + ], + "default": [ + "./dist/index.js", + "./src/plotly/index.tsx" + ] }, "./plugin": { - "types": "./src/plugin/index.ts", - "import": "./src/plugin/index.ts", - "default": "./src/plugin/index.ts" + "types": [ + "./dist/index.d.ts", + "./src/plugin/index.ts" + ], + "import": [ + "./dist/index.js", + "./src/plugin/index.ts" + ], + "default": [ + "./dist/index.js", + "./src/plugin/index.ts" + ] }, "./ranking": { - "types": "./src/ranking/index.ts", - "import": "./src/ranking/index.ts", - "default": "./src/ranking/index.ts" + "types": [ + "./dist/index.d.ts", + "./src/ranking/index.ts" + ], + "import": [ + "./dist/index.js", + "./src/ranking/index.ts" + ], + "default": [ + "./dist/index.js", + "./src/ranking/index.ts" + ] }, "./security": { - "types": "./src/security/index.ts", - "import": "./src/security/index.ts", - "default": "./src/security/index.ts" + "types": [ + "./dist/index.d.ts", + "./src/security/index.ts" + ], + "import": [ + "./dist/index.js", + "./src/security/index.ts" + ], + "default": [ + "./dist/index.js", + "./src/security/index.ts" + ] }, "./utils": { - "types": "./src/utils/index.ts", - "import": "./src/utils/index.ts", - "default": "./src/utils/index.ts" + "types": [ + "./dist/index.d.ts", + "./src/utils/index.ts" + ], + "import": [ + "./dist/index.js", + "./src/utils/index.ts" + ], + "default": [ + "./dist/index.js", + "./src/utils/index.ts" + ] }, "./views": { - "types": "./src/views/index.ts", - "import": "./src/views/index.ts", - "default": "./src/views/index.ts" + "types": [ + "./dist/index.d.ts", + "./src/views/index.ts" + ], + "import": [ + "./dist/index.js", + "./src/views/index.ts" + ], + "default": [ + "./dist/index.js", + "./src/views/index.ts" + ] }, "./vis": { - "types": "./src/vis/index.ts", - "import": "./src/vis/index.ts", - "default": "./src/vis/index.ts" + "types": [ + "./dist/index.d.ts", + "./src/vis/index.ts" + ], + "import": [ + "./dist/index.js", + "./src/vis/index.ts" + ], + "default": [ + "./dist/index.js", + "./src/vis/index.ts" + ] }, - "./src/scss/main.scss": "./src/scss/main.scss", - "./phovea_registry": "./src/phovea_registry.ts", + "./phovea_registry": [ + "./dist/phovea_registry.js", + "./src/phovea_registry.ts" + ], + "./src/scss/*": [ + "./dist/scss/*", + "./src/scss/*" + ], + "./dist/scss/*": [ + "./dist/scss/*", + "./src/scss/*" + ], "./package.json": "./package.json" }, "files": [ @@ -166,7 +311,7 @@ "react-plotly.js": "^2.5.1", "react-spring": "^9.7.1", "use-deep-compare-effect": "^1.8.0", - "visyn_scripts": "git+ssh://git@github.com/datavisyn/visyn_scripts#develop" + "visyn_scripts": "git+ssh://git@github.com/datavisyn/visyn_scripts#no_dist" }, "devDependencies": { "@babel/core": "^7.17.7", From f0191f7128189f0641cf705a93d627a5ca28c57a Mon Sep 17 00:00:00 2001 From: Michael Puehringer Date: Fri, 3 Nov 2023 07:39:51 +0100 Subject: [PATCH 07/30] Make mantine peer deps --- package.json | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 411276604..1d2eabbb7 100644 --- a/package.json +++ b/package.json @@ -277,7 +277,6 @@ "chromatic": "npx chromatic --build-script-name storybook:build" }, "dependencies": { - "@emotion/react": "^11.0.0", "@fortawesome/fontawesome-free": "^6.1.1", "@fortawesome/fontawesome-svg-core": "^6.1.2", "@fortawesome/free-regular-svg-icons": "^6.1.2", @@ -305,14 +304,27 @@ "lineupjs": "4.9.0", "lodash": "~4.17.20", "plotly.js-dist-min": "~2.12.0", - "react": "^18.2.0", - "react-dom": "^18.2.0", + "react": "~18.2.0", + "react-dom": "~18.2.0", "react-highlight-words": "^0.17.0", "react-plotly.js": "^2.5.1", "react-spring": "^9.7.1", "use-deep-compare-effect": "^1.8.0", "visyn_scripts": "git+ssh://git@github.com/datavisyn/visyn_scripts#no_dist" }, + "peerDependencies": { + "@mantine/core": "~6.0.19", + "@mantine/dates": "~6.0.19", + "@mantine/form": "~6.0.19", + "@mantine/hooks": "~6.0.19", + "@mantine/modals": "~6.0.19", + "@mantine/notifications": "~6.0.19", + "@mantine/styles": "~6.0.19", + "@types/react": "~18.2.0", + "@types/react-dom": "~18.2.0", + "react": "~18.2.0", + "react-dom": "~18.2.0" + }, "devDependencies": { "@babel/core": "^7.17.7", "@babel/plugin-transform-typescript": "7.17.12", @@ -334,12 +346,6 @@ "storybook": "^7.0.12", "storybook-addon-swc": "^1.1.9" }, - "resolutions": { - "@types/react": "~18.2.0", - "@types/react-dom": "~18.2.0", - "react": "~18.2.0", - "react-dom": "~18.2.0" - }, "visyn": { "entries": { "app": { From ec84b28bdf7e129ecb1a79a2239ea71f6b903391 Mon Sep 17 00:00:00 2001 From: Michael Puehringer Date: Fri, 3 Nov 2023 07:50:21 +0100 Subject: [PATCH 08/30] Add all mantine packages --- package.json | 99 +++++++++++++++++++++++----------------------------- 1 file changed, 44 insertions(+), 55 deletions(-) diff --git a/package.json b/package.json index 1d2eabbb7..4a1948f03 100644 --- a/package.json +++ b/package.json @@ -35,197 +35,197 @@ }, "./app": { "types": [ - "./dist/index.d.ts", + "./dist/app/index.d.ts", "./src/app/index.ts" ], "import": [ - "./dist/index.js", + "./dist/app/index.js", "./src/app/index.ts" ], "default": [ - "./dist/index.js", + "./dist/app/index.js", "./src/app/index.ts" ] }, "./base": { "types": [ - "./dist/index.d.ts", + "./dist/base/index.d.ts", "./src/base/index.ts" ], "import": [ - "./dist/index.js", + "./dist/base/index.js", "./src/base/index.ts" ], "default": [ - "./dist/index.js", + "./dist/base/index.js", "./src/base/index.ts" ] }, "./components": { "types": [ - "./dist/index.d.ts", + "./dist/components/index.d.ts", "./src/components/index.ts" ], "import": [ - "./dist/index.js", + "./dist/components/index.js", "./src/components/index.ts" ], "default": [ - "./dist/index.js", + "./dist/components/index.js", "./src/components/index.ts" ] }, "./hooks": { "types": [ - "./dist/index.d.ts", + "./dist/hooks/index.d.ts", "./src/hooks/index.ts" ], "import": [ - "./dist/index.js", + "./dist/hooks/index.js", "./src/hooks/index.ts" ], "default": [ - "./dist/index.js", + "./dist/hooks/index.js", "./src/hooks/index.ts" ] }, "./i18n": { "types": [ - "./dist/index.d.ts", + "./dist/i18n/index.d.ts", "./src/i18n/index.ts" ], "import": [ - "./dist/index.js", + "./dist/i18n/index.js", "./src/i18n/index.ts" ], "default": [ - "./dist/index.js", + "./dist/i18n/index.js", "./src/i18n/index.ts" ] }, "./idtype": { "types": [ - "./dist/index.d.ts", + "./dist/idtype/index.d.ts", "./src/idtype/index.ts" ], "import": [ - "./dist/index.js", + "./dist/idtype/index.js", "./src/idtype/index.ts" ], "default": [ - "./dist/index.js", + "./dist/idtype/index.js", "./src/idtype/index.ts" ] }, "./plotly/full": { "types": [ - "./dist/index.d.ts", + "./dist/plotly/full/index.d.ts", "./src/plotly/full/index.ts" ], "import": [ - "./dist/index.js", + "./dist/plotly/full/index.js", "./src/plotly/full/index.ts" ], "default": [ - "./dist/index.js", + "./dist/plotly/full/index.js", "./src/plotly/full/index.ts" ] }, "./plotly": { "types": [ - "./dist/index.d.ts", + "./dist/plotly/index.d.ts", "./src/plotly/index.tsx" ], "import": [ - "./dist/index.js", + "./dist/plotly/index.js", "./src/plotly/index.tsx" ], "default": [ - "./dist/index.js", + "./dist/plotly/index.js", "./src/plotly/index.tsx" ] }, "./plugin": { "types": [ - "./dist/index.d.ts", + "./dist/plugin/index.d.ts", "./src/plugin/index.ts" ], "import": [ - "./dist/index.js", + "./dist/plugin/index.js", "./src/plugin/index.ts" ], "default": [ - "./dist/index.js", + "./dist/plugin/index.js", "./src/plugin/index.ts" ] }, "./ranking": { "types": [ - "./dist/index.d.ts", + "./dist/ranking/index.d.ts", "./src/ranking/index.ts" ], "import": [ - "./dist/index.js", + "./dist/ranking/index.js", "./src/ranking/index.ts" ], "default": [ - "./dist/index.js", + "./dist/ranking/index.js", "./src/ranking/index.ts" ] }, "./security": { "types": [ - "./dist/index.d.ts", + "./dist/security/index.d.ts", "./src/security/index.ts" ], "import": [ - "./dist/index.js", + "./dist/security/index.js", "./src/security/index.ts" ], "default": [ - "./dist/index.js", + "./dist/security/index.js", "./src/security/index.ts" ] }, "./utils": { "types": [ - "./dist/index.d.ts", + "./dist/utils/index.d.ts", "./src/utils/index.ts" ], "import": [ - "./dist/index.js", + "./dist/utils/index.js", "./src/utils/index.ts" ], "default": [ - "./dist/index.js", + "./dist/utils/index.js", "./src/utils/index.ts" ] }, "./views": { "types": [ - "./dist/index.d.ts", + "./dist/views/index.d.ts", "./src/views/index.ts" ], "import": [ - "./dist/index.js", + "./dist/views/index.js", "./src/views/index.ts" ], "default": [ - "./dist/index.js", + "./dist/views/index.js", "./src/views/index.ts" ] }, "./vis": { "types": [ - "./dist/index.d.ts", + "./dist/vis/index.d.ts", "./src/vis/index.ts" ], "import": [ - "./dist/index.js", + "./dist/vis/index.js", "./src/vis/index.ts" ], "default": [ - "./dist/index.js", + "./dist/vis/index.js", "./src/vis/index.ts" ] }, @@ -284,11 +284,13 @@ "@fortawesome/react-fontawesome": "^0.2.0", "@mantine/core": "~6.0.19", "@mantine/dates": "~6.0.19", + "@mantine/dropzone": "~6.0.19", "@mantine/form": "~6.0.19", "@mantine/hooks": "~6.0.19", "@mantine/modals": "~6.0.19", "@mantine/notifications": "~6.0.19", "@mantine/styles": "~6.0.19", + "@mantine/tiptap": "~6.0.19", "@types/d3-hexbin": "^0.2.3", "@types/d3v7": "npm:@types/d3@^7.4.0", "@types/plotly.js-dist-min": "^2.3.0", @@ -312,19 +314,6 @@ "use-deep-compare-effect": "^1.8.0", "visyn_scripts": "git+ssh://git@github.com/datavisyn/visyn_scripts#no_dist" }, - "peerDependencies": { - "@mantine/core": "~6.0.19", - "@mantine/dates": "~6.0.19", - "@mantine/form": "~6.0.19", - "@mantine/hooks": "~6.0.19", - "@mantine/modals": "~6.0.19", - "@mantine/notifications": "~6.0.19", - "@mantine/styles": "~6.0.19", - "@types/react": "~18.2.0", - "@types/react-dom": "~18.2.0", - "react": "~18.2.0", - "react-dom": "~18.2.0" - }, "devDependencies": { "@babel/core": "^7.17.7", "@babel/plugin-transform-typescript": "7.17.12", From a7a68817d325080d0d4dd295c4e4b9d8739f498b Mon Sep 17 00:00:00 2001 From: Michael Puehringer Date: Fri, 3 Nov 2023 17:04:33 +0100 Subject: [PATCH 09/30] Fix tests --- package.json | 4 ---- tests/exports.test.ts | 12 +++++++----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 4a1948f03..23567273d 100644 --- a/package.json +++ b/package.json @@ -233,10 +233,6 @@ "./dist/phovea_registry.js", "./src/phovea_registry.ts" ], - "./src/scss/*": [ - "./dist/scss/*", - "./src/scss/*" - ], "./dist/scss/*": [ "./dist/scss/*", "./src/scss/*" diff --git a/tests/exports.test.ts b/tests/exports.test.ts index 4e8cab92b..1e4e48161 100644 --- a/tests/exports.test.ts +++ b/tests/exports.test.ts @@ -5,7 +5,7 @@ import { readdirSync, readFileSync } from 'fs'; import packageJson from '../package.json'; const NOT_EXPORTED_PACKAGES = ['assets', 'demo', 'locales', 'scss', 'stories']; -const ADDITIONAL_EXPORTS = ['.', './plotly/full', './dist/scss/main.scss', './phovea_registry', './package.json']; +const ADDITIONAL_EXPORTS = ['.', './plotly/full', './dist/scss/*', './phovea_registry', './package.json']; describe('package.json exports', () => { expect(packageJson.exports).toBeDefined(); @@ -32,14 +32,16 @@ describe('package.json exports', () => { const exported = packageJson.exports[`./${p}`]; expect(exported).toBeDefined(); expect(Object.keys(exported)).toStrictEqual(['types', 'import', 'default']); - expect(exported.types).toBe(`./dist/${p}/index.d.ts`); - expect(exported.import).toBe(`./dist/${p}/index.js`); - expect(exported.default).toBe(`./dist/${p}/index.js`); + // Some packages are exported as .tsx + const extension = exported?.types[1]?.includes('.tsx') ? 'tsx' : 'ts'; + expect(exported.types).toEqual([`./dist/${p}/index.d.ts`, `./src/${p}/index.${extension}`]); + expect(exported.import).toEqual([`./dist/${p}/index.js`, `./src/${p}/index.${extension}`]); + expect(exported.default).toEqual([`./dist/${p}/index.js`, `./src/${p}/index.${extension}`]); expect(rootIndexTs).toBeFalsy(); }); it('exports the package.json and phovea_registry', () => { - expect(packageJson.exports['./phovea_registry']).toBe('./dist/phovea_registry.js'); + expect(packageJson.exports['./phovea_registry']).toEqual(['./dist/phovea_registry.js', './src/phovea_registry.ts']); expect(packageJson.exports['./package.json']).toBe('./package.json'); }); }); From 5d2ab426aeab8a4168e5ff8df245a1e746c4226f Mon Sep 17 00:00:00 2001 From: dvmartinweigl Date: Sun, 5 Nov 2023 19:50:38 +0100 Subject: [PATCH 10/30] escape csv injection chars --- visyn_core/xlsx.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/visyn_core/xlsx.py b/visyn_core/xlsx.py index b7a63bb63..bba4b0bea 100644 --- a/visyn_core/xlsx.py +++ b/visyn_core/xlsx.py @@ -98,9 +98,20 @@ def _json2xlsx(): data: dict = request.json # type: ignore wb = Workbook(write_only=True) + # Not sure if we should disable calculation to avoid CSV injection + # wb.calculation.calcMode = "manual" + # wb.calculation.fullCalcOnLoad = False + bold = Font(bold=True) + def _escape(v): + if isinstance(v, str) and v and v[0] in ["+", "-", "@", "="]: + _log.warning("CSV injection detected: %s", v) + return f"'{v}" + return v + def to_cell(v): + v = _escape(v) # If the native value cannot be used as Excel value, used the stringified version instead. try: return WriteOnlyCell(ws, value=v) # type: ignore From 39b12912c6f3b147ebf7828356e126141af5f7d6 Mon Sep 17 00:00:00 2001 From: dvmartinweigl Date: Sun, 5 Nov 2023 19:55:44 +0100 Subject: [PATCH 11/30] only escape str with len>1 --- visyn_core/xlsx.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/visyn_core/xlsx.py b/visyn_core/xlsx.py index bba4b0bea..bb56119cd 100644 --- a/visyn_core/xlsx.py +++ b/visyn_core/xlsx.py @@ -105,8 +105,8 @@ def _json2xlsx(): bold = Font(bold=True) def _escape(v): - if isinstance(v, str) and v and v[0] in ["+", "-", "@", "="]: - _log.warning("CSV injection detected: %s", v) + if isinstance(v, str) and v and v[0] in ["+", "-", "@", "="] and len(v) > 1: + _log.warning("Escaping possible CSV injection: %s", v) return f"'{v}" return v From 76868df18c3915dea70ef24d2634251f2f9949be Mon Sep 17 00:00:00 2001 From: dvmartinweigl Date: Mon, 6 Nov 2023 13:53:03 +0100 Subject: [PATCH 12/30] small refactor --- visyn_core/xlsx.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/visyn_core/xlsx.py b/visyn_core/xlsx.py index bb56119cd..fa5977433 100644 --- a/visyn_core/xlsx.py +++ b/visyn_core/xlsx.py @@ -98,14 +98,10 @@ def _json2xlsx(): data: dict = request.json # type: ignore wb = Workbook(write_only=True) - # Not sure if we should disable calculation to avoid CSV injection - # wb.calculation.calcMode = "manual" - # wb.calculation.fullCalcOnLoad = False - bold = Font(bold=True) def _escape(v): - if isinstance(v, str) and v and v[0] in ["+", "-", "@", "="] and len(v) > 1: + if isinstance(v, str) and v.startswith(("+", "-", "@", "=", "DDE")): _log.warning("Escaping possible CSV injection: %s", v) return f"'{v}" return v From 6cf7c43c80474e2fc66fb96fd44bbf28fcd1b2f1 Mon Sep 17 00:00:00 2001 From: Thomas Schachinger Date: Thu, 9 Nov 2023 10:23:49 +0100 Subject: [PATCH 13/30] extended ISingleScoreResult to except column desc directly --- src/ranking/overrides/DatavisynTaggle.tsx | 9 ++++++--- src/ranking/score/interfaces.ts | 21 +++++++++++++++------ 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/ranking/overrides/DatavisynTaggle.tsx b/src/ranking/overrides/DatavisynTaggle.tsx index dd7107d07..c9710b9eb 100644 --- a/src/ranking/overrides/DatavisynTaggle.tsx +++ b/src/ranking/overrides/DatavisynTaggle.tsx @@ -43,12 +43,15 @@ export class DatavisynTaggle extends throw new Error('No ranking found'); } - return castArray(desc).map(({ data, builder }) => { - const colDesc = builder.build(data.map((d) => ({ [(builder as any).desc.column]: d }))) as IScoreColumnDesc; + return castArray(desc).map((score) => { + const colDesc = + 'builder' in score + ? (score.builder.build(score.data.map((d) => ({ [(score.builder as any).desc.column]: d }))) as IScoreColumnDesc) + : (score.desc as IScoreColumnDesc); // Patch the accessor and add the scoreData directly in the column + colDesc.scoreData = score.data; colDesc.accessor = (row, descRef) => descRef.scoreData[row.i]; - colDesc.scoreData = data; const col = this.data.create(colDesc); diff --git a/src/ranking/score/interfaces.ts b/src/ranking/score/interfaces.ts index efec1e565..547112d8f 100644 --- a/src/ranking/score/interfaces.ts +++ b/src/ranking/score/interfaces.ts @@ -3,16 +3,25 @@ import { ColumnBuilder, IValueColumnDesc, IDataRow } from 'lineupjs'; /** * A single score result */ -export interface ISingleScoreResult { +export type ISingleScoreResult = { /** * The data to be used for the score column */ data: unknown[]; - /** - * The lineup builder object to be used for the score column - */ - builder: ColumnBuilder>; -} +} & ( + | { + /** + * The lineup builder object to be used for the score column + */ + builder: ColumnBuilder>; + } + | { + /** + * The lineup column desc to be used for the score column + */ + desc: IValueColumnDesc; + } +); export type IScoreResult = ISingleScoreResult | ISingleScoreResult[]; From 7d298d80530e934ebcd339be7112ae6ecd807341 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20P=C3=BChringer?= <51900829+puehringer@users.noreply.github.com> Date: Thu, 9 Nov 2023 20:01:36 +0100 Subject: [PATCH 14/30] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 23567273d..50de03a32 100644 --- a/package.json +++ b/package.json @@ -308,7 +308,7 @@ "react-plotly.js": "^2.5.1", "react-spring": "^9.7.1", "use-deep-compare-effect": "^1.8.0", - "visyn_scripts": "git+ssh://git@github.com/datavisyn/visyn_scripts#no_dist" + "visyn_scripts": "git+ssh://git@github.com/datavisyn/visyn_scripts#develop" }, "devDependencies": { "@babel/core": "^7.17.7", From 059860cc5ccac68badb0305d07d83aeb7aa544fa Mon Sep 17 00:00:00 2001 From: Usama Ansari Date: Wed, 15 Nov 2023 14:35:01 +0100 Subject: [PATCH 15/30] fix: hide filter if no callback is provided --- src/vis/EagerVis.tsx | 56 +++++++++++++++++------------------ src/vis/VisSidebar.tsx | 2 +- src/vis/bar/BarVisSidebar.tsx | 38 ++++++++---------------- 3 files changed, 42 insertions(+), 54 deletions(-) diff --git a/src/vis/EagerVis.tsx b/src/vis/EagerVis.tsx index 9518be019..39b8fb4ba 100644 --- a/src/vis/EagerVis.tsx +++ b/src/vis/EagerVis.tsx @@ -130,7 +130,7 @@ export function EagerVis({ colors = null, shapes = DEFAULT_SHAPES, selectionCallback = () => null, - filterCallback = () => null, + filterCallback, setExternalConfig = () => null, closeCallback = () => null, showCloseButton = false, @@ -209,33 +209,33 @@ export function EagerVis({ externalConfig ? { consistent: null, current: externalConfig } : columns.filter((c) => c.type === EColumnTypes.NUMERICAL).length > 1 - ? { - consistent: null, - current: { - type: ESupportedPlotlyVis.SCATTER, - numColumnsSelected: [], - color: null, - numColorScaleType: ENumericalColorScaleType.SEQUENTIAL, - shape: null, - dragMode: EScatterSelectSettings.RECTANGLE, - alphaSliderVal: 0.5, - } as BaseVisConfig, - } - : { - consistent: null, - current: { - type: ESupportedPlotlyVis.BAR, - multiples: null, - group: null, - direction: EBarDirection.HORIZONTAL, - display: EBarDisplayType.ABSOLUTE, - groupType: EBarGroupingType.STACK, - numColumnsSelected: [], - catColumnSelected: null, - aggregateColumn: null, - aggregateType: EAggregateTypes.COUNT, - } as BaseVisConfig, - }, + ? { + consistent: null, + current: { + type: ESupportedPlotlyVis.SCATTER, + numColumnsSelected: [], + color: null, + numColorScaleType: ENumericalColorScaleType.SEQUENTIAL, + shape: null, + dragMode: EScatterSelectSettings.RECTANGLE, + alphaSliderVal: 0.5, + } as BaseVisConfig, + } + : { + consistent: null, + current: { + type: ESupportedPlotlyVis.BAR, + multiples: null, + group: null, + direction: EBarDirection.HORIZONTAL, + display: EBarDisplayType.ABSOLUTE, + groupType: EBarGroupingType.STACK, + numColumnsSelected: [], + catColumnSelected: null, + aggregateColumn: null, + aggregateType: EAggregateTypes.COUNT, + } as BaseVisConfig, + }, ); const setExternalConfigRef = useSyncedRef(setExternalConfig); diff --git a/src/vis/VisSidebar.tsx b/src/vis/VisSidebar.tsx index 5469e3ddf..f1d9fdfcd 100644 --- a/src/vis/VisSidebar.tsx +++ b/src/vis/VisSidebar.tsx @@ -4,7 +4,7 @@ import { ICommonVisSideBarProps } from './interfaces'; export function VisSidebar({ columns, - filterCallback = () => null, + filterCallback, optionsConfig, config = null, setConfig = null, diff --git a/src/vis/bar/BarVisSidebar.tsx b/src/vis/bar/BarVisSidebar.tsx index 755fb983b..157bcda42 100644 --- a/src/vis/bar/BarVisSidebar.tsx +++ b/src/vis/bar/BarVisSidebar.tsx @@ -10,30 +10,12 @@ import { GroupSelect } from './GroupSelect'; import { EBarDirection, EBarDisplayType, EBarGroupingType, IBarConfig } from './interfaces'; const defaultConfig = { - group: { - enable: true, - customComponent: null, - }, - multiples: { - enable: true, - customComponent: null, - }, - direction: { - enable: true, - customComponent: null, - }, - filter: { - enable: true, - customComponent: null, - }, - groupType: { - enable: true, - customComponent: null, - }, - display: { - enable: true, - customComponent: null, - }, + direction: { enable: true, customComponent: null }, + display: { enable: true, customComponent: null }, + filter: { enable: true, customComponent: null }, + group: { enable: true, customComponent: null }, + groupType: { enable: true, customComponent: null }, + multiples: { enable: true, customComponent: null }, }; export function BarVisSidebar({ @@ -114,7 +96,13 @@ export function BarVisSidebar({ setConfig({ ...config, direction })} currentSelected={config.direction} /> ) : null} - {mergedOptionsConfig.filter.enable ? mergedOptionsConfig.filter.customComponent || : null} + {mergedOptionsConfig.filter.enable ? ( + mergedOptionsConfig.filter.customComponent ? ( + mergedOptionsConfig.filter.customComponent + ) : filterCallback ? ( + + ) : null + ) : null} ); } From 0d97c4f953aed0c4d00a86f0a4412fefc201978c Mon Sep 17 00:00:00 2001 From: Usama Ansari Date: Thu, 16 Nov 2023 14:02:08 +0100 Subject: [PATCH 16/30] fix: bar chart crash issue in Various bugs vis components #99 --- src/vis/bar/hooks/useGetBarScales.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vis/bar/hooks/useGetBarScales.ts b/src/vis/bar/hooks/useGetBarScales.ts index f7a7dd977..1472f8622 100644 --- a/src/vis/bar/hooks/useGetBarScales.ts +++ b/src/vis/bar/hooks/useGetBarScales.ts @@ -55,7 +55,7 @@ export function useGetBarScales( let myTable = baseTable; if (categoryFilter && allColumns?.multiplesColVals) { - myTable = baseTable.params({ categoryFilter }).filter((d) => d.multiples === categoryFilter); + myTable = baseTable.params({ categoryFilter }).filter((d, $) => d.multiples === $.categoryFilter); } addFunction('aggregateFunc', aggregateFunc, { override: true }); From a13b5ca9cadbe607c460b2451e4bd91a02d1b59c Mon Sep 17 00:00:00 2001 From: Usama Ansari Date: Fri, 17 Nov 2023 09:42:47 +0100 Subject: [PATCH 17/30] fix: error message for correlation vis --- src/vis/correlation/CorrelationVis.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vis/correlation/CorrelationVis.tsx b/src/vis/correlation/CorrelationVis.tsx index a1c6cc46a..c47ea6b1d 100644 --- a/src/vis/correlation/CorrelationVis.tsx +++ b/src/vis/correlation/CorrelationVis.tsx @@ -8,6 +8,6 @@ export function CorrelationVis({ config, columns }: ICommonVisProps 1 ? ( ) : ( - + ); } From b9c62de0c6183b1e37173c1060009743a60c2bcc Mon Sep 17 00:00:00 2001 From: Usama Ansari Date: Fri, 17 Nov 2023 09:42:54 +0100 Subject: [PATCH 18/30] fix: error message for raincloud vis --- src/vis/raincloud/RaincloudGrid.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vis/raincloud/RaincloudGrid.tsx b/src/vis/raincloud/RaincloudGrid.tsx index e557af0cf..ace1b9de7 100644 --- a/src/vis/raincloud/RaincloudGrid.tsx +++ b/src/vis/raincloud/RaincloudGrid.tsx @@ -28,7 +28,7 @@ export function RaincloudGrid({ return ; }) ) : ( - + )} ); From e04185ce63e210b4e50f0e1e37c019d6e8a7f978 Mon Sep 17 00:00:00 2001 From: Usama Ansari Date: Fri, 17 Nov 2023 17:56:59 +0100 Subject: [PATCH 19/30] fix: violin plot x-axis labels misalignment --- src/vis/general/layoutUtils.ts | 38 +++++++++++++++++----------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/vis/general/layoutUtils.ts b/src/vis/general/layoutUtils.ts index 85d3cf9bf..f19318ddf 100644 --- a/src/vis/general/layoutUtils.ts +++ b/src/vis/general/layoutUtils.ts @@ -50,26 +50,26 @@ export function beautifyLayout(traces: PlotlyInfo, layout: Partial { layout[`xaxis${i > 0 ? i + 1 : ''}`] = { - range: t.xDomain ? t.xDomain : null, + // range: t.xDomain ? t.xDomain : null, ...oldLayout?.[`xaxis${i > 0 ? i + 1 : ''}`], - automargin, - // rangemode: 'tozero', - tickvals: t.xTicks, - ticktext: t.xTickLabels, - text: t.xTicks, - showline: false, - showspikes: false, - spikedash: 'dash', - ticks: 'outside', - title: { - standoff: 5, - text: traces.plots.length > 1 ? truncateText(t.xLabel, 15) : truncateText(t.xLabel, 50), - font: { - family: 'Roboto, sans-serif', - size: traces.plots.length > 1 ? 10 : 14, - color: '#7f7f7f', - }, - }, + // automargin, + // // rangemode: 'tozero', + // tickvals: t.xTicks, + // ticktext: t.xTickLabels, + // text: t.xTicks, + // showline: false, + // showspikes: false, + // spikedash: 'dash', + // ticks: 'outside', + // title: { + // standoff: 5, + // text: traces.plots.length > 1 ? truncateText(t.xLabel, 15) : truncateText(t.xLabel, 50), + // font: { + // family: 'Roboto, sans-serif', + // size: traces.plots.length > 1 ? 10 : 14, + // color: '#7f7f7f', + // }, + // }, }; layout[`yaxis${i > 0 ? i + 1 : ''}`] = { From c95a51cc4515ff460fd6d779a62e38c8b41d0338 Mon Sep 17 00:00:00 2001 From: Usama Ansari Date: Mon, 20 Nov 2023 09:56:30 +0100 Subject: [PATCH 20/30] feat: add title to the axis --- src/vis/general/layoutUtils.ts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/vis/general/layoutUtils.ts b/src/vis/general/layoutUtils.ts index f19318ddf..a815d97f6 100644 --- a/src/vis/general/layoutUtils.ts +++ b/src/vis/general/layoutUtils.ts @@ -50,10 +50,10 @@ export function beautifyLayout(traces: PlotlyInfo, layout: Partial { layout[`xaxis${i > 0 ? i + 1 : ''}`] = { - // range: t.xDomain ? t.xDomain : null, + range: t.xDomain ? t.xDomain : null, ...oldLayout?.[`xaxis${i > 0 ? i + 1 : ''}`], // automargin, - // // rangemode: 'tozero', + rangemode: 'tozero', // tickvals: t.xTicks, // ticktext: t.xTickLabels, // text: t.xTicks, @@ -61,15 +61,15 @@ export function beautifyLayout(traces: PlotlyInfo, layout: Partial 1 ? truncateText(t.xLabel, 15) : truncateText(t.xLabel, 50), - // font: { - // family: 'Roboto, sans-serif', - // size: traces.plots.length > 1 ? 10 : 14, - // color: '#7f7f7f', - // }, - // }, + title: { + standoff: 5, + text: traces.plots.length > 1 ? truncateText(t.xLabel, 15) : truncateText(t.xLabel, 50), + font: { + family: 'Roboto, sans-serif', + size: traces.plots.length > 1 ? 10 : 14, + color: '#7f7f7f', + }, + }, }; layout[`yaxis${i > 0 ? i + 1 : ''}`] = { From 58882657760cb55d1563839aedcd64f4d3415ac5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20P=C3=BChringer?= <51900829+puehringer@users.noreply.github.com> Date: Mon, 20 Nov 2023 11:18:02 +0100 Subject: [PATCH 21/30] refactor: log entire token payload if no email field matched (#111) feat: log entire token payload if no email field matched --- visyn_core/security/store/alb_security_store.py | 2 +- visyn_core/security/store/oauth2_security_store.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/visyn_core/security/store/alb_security_store.py b/visyn_core/security/store/alb_security_store.py index ca9490429..1f79036d5 100644 --- a/visyn_core/security/store/alb_security_store.py +++ b/visyn_core/security/store/alb_security_store.py @@ -69,7 +69,7 @@ def load_from_request(self, req: Request): # Go through all the fields we want to check for the user id id = next((user.get(field, None) for field in self.email_token_fields if user.get(field, None)), None) if not id: - _log.error(f"No {self.email_token_fields} matched in token, possible fields: {user.keys()}") + _log.error(f"No {self.email_token_fields} matched in token, possible values: {user}") return None # Create new user from given attributes diff --git a/visyn_core/security/store/oauth2_security_store.py b/visyn_core/security/store/oauth2_security_store.py index 031151a62..595f40e97 100644 --- a/visyn_core/security/store/oauth2_security_store.py +++ b/visyn_core/security/store/oauth2_security_store.py @@ -30,7 +30,7 @@ def load_from_request(self, req: Request): # Go through all the fields we want to check for the user id id = next((user.get(field, None) for field in self.email_token_fields if user.get(field, None)), None) if not id: - _log.error(f"No {self.email_token_fields} matched in token, possible fields: {user.keys()}") + _log.error(f"No {self.email_token_fields} matched in token, possible values: {user}") return None # Create new user from given attributes From ac1c2fb64f8f4e41dd7044ad0ac15e2f1ade1615 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20P=C3=BChringer?= <51900829+puehringer@users.noreply.github.com> Date: Mon, 20 Nov 2023 13:36:29 +0100 Subject: [PATCH 22/30] deps: add @emotion/react (#124) --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 50de03a32..e92bbabd2 100644 --- a/package.json +++ b/package.json @@ -273,6 +273,7 @@ "chromatic": "npx chromatic --build-script-name storybook:build" }, "dependencies": { + "@emotion/react": "^11.9.3", "@fortawesome/fontawesome-free": "^6.1.1", "@fortawesome/fontawesome-svg-core": "^6.1.2", "@fortawesome/free-regular-svg-icons": "^6.1.2", From 1e884f6b0e6de81b7fa97abddb05de799c925db4 Mon Sep 17 00:00:00 2001 From: Usama Ansari Date: Mon, 20 Nov 2023 13:57:11 +0100 Subject: [PATCH 23/30] feat: extend filter hide for other vis --- src/vis/bar/BarVisSidebar.tsx | 12 +++++++----- src/vis/scatter/ScatterVisSidebar.tsx | 11 ++++++++++- src/vis/violin/ViolinVisSidebar.tsx | 10 +++++++++- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/src/vis/bar/BarVisSidebar.tsx b/src/vis/bar/BarVisSidebar.tsx index 157bcda42..66cb47382 100644 --- a/src/vis/bar/BarVisSidebar.tsx +++ b/src/vis/bar/BarVisSidebar.tsx @@ -96,12 +96,14 @@ export function BarVisSidebar({ setConfig({ ...config, direction })} currentSelected={config.direction} /> ) : null} - {mergedOptionsConfig.filter.enable ? ( - mergedOptionsConfig.filter.customComponent ? ( - mergedOptionsConfig.filter.customComponent - ) : filterCallback ? ( + {filterCallback ? ( + mergedOptionsConfig.filter.enable ? ( + mergedOptionsConfig.filter.customComponent ? ( + mergedOptionsConfig.filter.customComponent + ) : null + ) : ( - ) : null + ) ) : null} ); diff --git a/src/vis/scatter/ScatterVisSidebar.tsx b/src/vis/scatter/ScatterVisSidebar.tsx index 49f2c36b2..3addd9f5a 100644 --- a/src/vis/scatter/ScatterVisSidebar.tsx +++ b/src/vis/scatter/ScatterVisSidebar.tsx @@ -67,7 +67,16 @@ export function ScatterVisSidebar({ config, optionsConfig, columns, filterCallba }} currentValue={config.alphaSliderVal} /> - {mergedOptionsConfig.filter.enable ? mergedOptionsConfig.filter.customComponent || : null} + + {filterCallback ? ( + mergedOptionsConfig.filter.enable ? ( + mergedOptionsConfig.filter.customComponent ? ( + mergedOptionsConfig.filter.customComponent + ) : null + ) : ( + + ) + ) : null} ); } diff --git a/src/vis/violin/ViolinVisSidebar.tsx b/src/vis/violin/ViolinVisSidebar.tsx index eeb52df25..d8596af31 100644 --- a/src/vis/violin/ViolinVisSidebar.tsx +++ b/src/vis/violin/ViolinVisSidebar.tsx @@ -54,7 +54,15 @@ export function ViolinVisSidebar({ ) : null} - {mergedOptionsConfig.filter.enable ? mergedOptionsConfig.filter.customComponent || : null} + {filterCallback ? ( + mergedOptionsConfig.filter.enable ? ( + mergedOptionsConfig.filter.customComponent ? ( + mergedOptionsConfig.filter.customComponent + ) : null + ) : ( + + ) + ) : null} ); } From 44ccecd5daeb16841bcc8c9d985773bff7e38268 Mon Sep 17 00:00:00 2001 From: Usama Ansari Date: Mon, 20 Nov 2023 15:24:35 +0100 Subject: [PATCH 24/30] fix: filter visibility issue --- src/vis/bar/BarVisSidebar.tsx | 11 ++--------- src/vis/scatter/ScatterVisSidebar.tsx | 10 +--------- src/vis/violin/ViolinVisSidebar.tsx | 10 +--------- 3 files changed, 4 insertions(+), 27 deletions(-) diff --git a/src/vis/bar/BarVisSidebar.tsx b/src/vis/bar/BarVisSidebar.tsx index 66cb47382..1f53f47a1 100644 --- a/src/vis/bar/BarVisSidebar.tsx +++ b/src/vis/bar/BarVisSidebar.tsx @@ -96,15 +96,8 @@ export function BarVisSidebar({ setConfig({ ...config, direction })} currentSelected={config.direction} /> ) : null} - {filterCallback ? ( - mergedOptionsConfig.filter.enable ? ( - mergedOptionsConfig.filter.customComponent ? ( - mergedOptionsConfig.filter.customComponent - ) : null - ) : ( - - ) - ) : null} + + {filterCallback && mergedOptionsConfig.filter.enable ? mergedOptionsConfig.filter.customComponent || : null} ); } diff --git a/src/vis/scatter/ScatterVisSidebar.tsx b/src/vis/scatter/ScatterVisSidebar.tsx index 3addd9f5a..fcdeb2960 100644 --- a/src/vis/scatter/ScatterVisSidebar.tsx +++ b/src/vis/scatter/ScatterVisSidebar.tsx @@ -68,15 +68,7 @@ export function ScatterVisSidebar({ config, optionsConfig, columns, filterCallba currentValue={config.alphaSliderVal} /> - {filterCallback ? ( - mergedOptionsConfig.filter.enable ? ( - mergedOptionsConfig.filter.customComponent ? ( - mergedOptionsConfig.filter.customComponent - ) : null - ) : ( - - ) - ) : null} + {filterCallback && mergedOptionsConfig.filter.enable ? mergedOptionsConfig.filter.customComponent || : null} ); } diff --git a/src/vis/violin/ViolinVisSidebar.tsx b/src/vis/violin/ViolinVisSidebar.tsx index d8596af31..3452015df 100644 --- a/src/vis/violin/ViolinVisSidebar.tsx +++ b/src/vis/violin/ViolinVisSidebar.tsx @@ -54,15 +54,7 @@ export function ViolinVisSidebar({ ) : null} - {filterCallback ? ( - mergedOptionsConfig.filter.enable ? ( - mergedOptionsConfig.filter.customComponent ? ( - mergedOptionsConfig.filter.customComponent - ) : null - ) : ( - - ) - ) : null} + {filterCallback && mergedOptionsConfig.filter.enable ? mergedOptionsConfig.filter.customComponent || : null} ); } From ee95f74207c72fcb1b994ea434d6a365198b374c Mon Sep 17 00:00:00 2001 From: Usama Ansari Date: Mon, 20 Nov 2023 15:44:54 +0100 Subject: [PATCH 25/30] fix: filter visibility in scatter stories --- src/vis/scatter/ScatterVisSidebar.tsx | 2 +- src/vis/stories/Vis/Scatter/ScatterIris.stories.tsx | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/vis/scatter/ScatterVisSidebar.tsx b/src/vis/scatter/ScatterVisSidebar.tsx index fcdeb2960..cb4bd409c 100644 --- a/src/vis/scatter/ScatterVisSidebar.tsx +++ b/src/vis/scatter/ScatterVisSidebar.tsx @@ -24,7 +24,7 @@ const defaultConfig = { }, }; -export function ScatterVisSidebar({ config, optionsConfig, columns, filterCallback = () => null, setConfig }: ICommonVisSideBarProps) { +export function ScatterVisSidebar({ config, optionsConfig, columns, filterCallback, setConfig }: ICommonVisSideBarProps) { const mergedOptionsConfig = useMemo(() => { return merge({}, defaultConfig, optionsConfig); }, [optionsConfig]); diff --git a/src/vis/stories/Vis/Scatter/ScatterIris.stories.tsx b/src/vis/stories/Vis/Scatter/ScatterIris.stories.tsx index cb4caf792..49b9c01dc 100644 --- a/src/vis/stories/Vis/Scatter/ScatterIris.stories.tsx +++ b/src/vis/stories/Vis/Scatter/ScatterIris.stories.tsx @@ -22,7 +22,7 @@ const Template: ComponentStory = (args) => {
- +
@@ -53,6 +53,10 @@ Basic.args = { dragMode: EScatterSelectSettings.RECTANGLE, alphaSliderVal: 1, } as BaseVisConfig, + + filterCallback: (option) => { + console.log({ option }); + }, }; export const ColorByCategory: typeof Template = Template.bind({}) as typeof Template; From 358ee11eddb8595984a1cd1d53038daa743711b9 Mon Sep 17 00:00:00 2001 From: Usama Ansari Date: Mon, 20 Nov 2023 17:10:16 +0100 Subject: [PATCH 26/30] fix: reinvestigate margin misalignment error --- src/vis/general/layoutUtils.ts | 18 +++++++++--------- src/vis/violin/ViolinVis.tsx | 8 +++----- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/vis/general/layoutUtils.ts b/src/vis/general/layoutUtils.ts index a815d97f6..85d3cf9bf 100644 --- a/src/vis/general/layoutUtils.ts +++ b/src/vis/general/layoutUtils.ts @@ -52,15 +52,15 @@ export function beautifyLayout(traces: PlotlyInfo, layout: Partial 0 ? i + 1 : ''}`] = { range: t.xDomain ? t.xDomain : null, ...oldLayout?.[`xaxis${i > 0 ? i + 1 : ''}`], - // automargin, - rangemode: 'tozero', - // tickvals: t.xTicks, - // ticktext: t.xTickLabels, - // text: t.xTicks, - // showline: false, - // showspikes: false, - // spikedash: 'dash', - // ticks: 'outside', + automargin, + // rangemode: 'tozero', + tickvals: t.xTicks, + ticktext: t.xTickLabels, + text: t.xTicks, + showline: false, + showspikes: false, + spikedash: 'dash', + ticks: 'outside', title: { standoff: 5, text: traces.plots.length > 1 ? truncateText(t.xLabel, 15) : truncateText(t.xLabel, 50), diff --git a/src/vis/violin/ViolinVis.tsx b/src/vis/violin/ViolinVis.tsx index 41760868d..db02f2eff 100644 --- a/src/vis/violin/ViolinVis.tsx +++ b/src/vis/violin/ViolinVis.tsx @@ -55,9 +55,9 @@ export function ViolinVis({ config, columns, scales, dimensions, selectedList, s if (plotDiv) { Plotly.Plots.resize(plotDiv); } - }, [id, dimensions]); + }, [id, dimensions, traces]); - React.useEffect(() => { + useEffect(() => { if (!traces) { return; } @@ -84,9 +84,7 @@ export function ViolinVis({ config, columns, scales, dimensions, selectedList, s shapes: [], }; - setLayout({ ...layout, ...beautifyLayout(traces, innerLayout, layout, true) }); - // WARNING: Do not update when layout changes, that would be an infinite loop. - // eslint-disable-next-line react-hooks/exhaustive-deps + setLayout((prev: Partial) => ({ ...prev, ...beautifyLayout(traces, innerLayout, prev, true) })); }, [traces]); return ( From 280fe056d05bfb0be4ccf27ea001fdca190d06cd Mon Sep 17 00:00:00 2001 From: Usama Ansari Date: Mon, 20 Nov 2023 17:13:43 +0100 Subject: [PATCH 27/30] fix: reinvestigate margin misalignment error --- src/vis/violin/ViolinVis.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/vis/violin/ViolinVis.tsx b/src/vis/violin/ViolinVis.tsx index db02f2eff..ab361f4a5 100644 --- a/src/vis/violin/ViolinVis.tsx +++ b/src/vis/violin/ViolinVis.tsx @@ -65,7 +65,6 @@ export function ViolinVis({ config, columns, scales, dimensions, selectedList, s const innerLayout: Partial = { showlegend: true, legend: { - // @ts-ignore itemclick: false, itemdoubleclick: false, }, @@ -84,7 +83,7 @@ export function ViolinVis({ config, columns, scales, dimensions, selectedList, s shapes: [], }; - setLayout((prev: Partial) => ({ ...prev, ...beautifyLayout(traces, innerLayout, prev, true) })); + setLayout((prev) => ({ ...prev, ...beautifyLayout(traces, innerLayout, prev, true) })); }, [traces]); return ( From 1fc4721171fbc9ddd67a427aa8d4173e52e09e26 Mon Sep 17 00:00:00 2001 From: Usama Ansari Date: Tue, 21 Nov 2023 10:56:09 +0100 Subject: [PATCH 28/30] fix: violin plot axis issue using setTimeout (#99) --- src/vis/violin/ViolinVis.tsx | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/src/vis/violin/ViolinVis.tsx b/src/vis/violin/ViolinVis.tsx index ab361f4a5..3bac5bc0f 100644 --- a/src/vis/violin/ViolinVis.tsx +++ b/src/vis/violin/ViolinVis.tsx @@ -1,8 +1,7 @@ import { Stack } from '@mantine/core'; import * as d3v7 from 'd3v7'; import uniqueId from 'lodash/uniqueId'; -import * as React from 'react'; -import { useEffect, useState } from 'react'; +import React, { useEffect, useMemo, useState } from 'react'; import { useAsync } from '../../hooks'; import { PlotlyComponent, PlotlyTypes } from '../../plotly'; import { Plotly } from '../../plotly/full'; @@ -14,8 +13,9 @@ import { IViolinConfig } from './interfaces'; export function ViolinVis({ config, columns, scales, dimensions, selectedList, selectedMap, selectionCallback }: ICommonVisProps) { const { value: traces, status: traceStatus, error: traceError } = useAsync(createViolinTraces, [columns, config, scales, selectedList, selectedMap]); + const [clearTimeoutValue, setClearTimeoutValue] = useState(null); - const id = React.useMemo(() => uniqueId('ViolinVis'), []); + const id = useMemo(() => uniqueId('ViolinVis'), []); const [layout, setLayout] = useState>(null); @@ -50,13 +50,34 @@ export function ViolinVis({ config, columns, scales, dimensions, selectedList, s } }; + // NOTE: @dv-usama-ansari: This is an alternative way to delay the resize of plotly plots, but the dependencies of the `useCallback` are unknown if the function is wrapped in lodash `debounce`. + // const resizePlotly = useCallback( + // debounce((plotDiv) => { + // Plotly.Plots.resize(plotDiv); + // }), + // [], + // ); + useEffect(() => { const plotDiv = document.getElementById(`plotlyDiv${id}`); + console.log('useEffect rendering'); if (plotDiv) { - Plotly.Plots.resize(plotDiv); + // NOTE: @dv-usama-ansari: This is a hack to update the plotly plots on resize. + // The `setTimeout` is used to pass the resize function to the next event loop, so that the plotly plots are rendered first. + const n = setTimeout(() => Plotly.Plots.resize(plotDiv)); + setClearTimeoutValue(n); } }, [id, dimensions, traces]); + // NOTE: @dv-usama-ansari: Clear the timeout on unmount. + useEffect(() => { + return () => { + if (clearTimeoutValue) { + clearTimeout(clearTimeoutValue); + } + }; + }, [clearTimeoutValue]); + useEffect(() => { if (!traces) { return; From c4edaa48a0aae86ec6c39ac3db82bfd833ddb2be Mon Sep 17 00:00:00 2001 From: Holger Stitz Date: Tue, 21 Nov 2023 11:39:57 +0100 Subject: [PATCH 29/30] chore: prepare release 6.0.0 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index e92bbabd2..1862f9ec8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "visyn_core", "description": "Core repository for datavisyn applications.", - "version": "5.0.1-SNAPSHOT", + "version": "6.0.0", "author": { "name": "datavisyn GmbH", "email": "contact@datavisyn.io", @@ -309,7 +309,7 @@ "react-plotly.js": "^2.5.1", "react-spring": "^9.7.1", "use-deep-compare-effect": "^1.8.0", - "visyn_scripts": "git+ssh://git@github.com/datavisyn/visyn_scripts#develop" + "visyn_scripts": "^6.0.0" }, "devDependencies": { "@babel/core": "^7.17.7", From 37bbf78bab5c3a2b74230007f1012a457c118bd1 Mon Sep 17 00:00:00 2001 From: Usama Ansari <115616380+dv-usama-ansari@users.noreply.github.com> Date: Tue, 21 Nov 2023 11:47:58 +0100 Subject: [PATCH 30/30] chore: remove logging Co-authored-by: dvdanielamoitzi <57343176+dvdanielamoitzi@users.noreply.github.com> --- src/vis/violin/ViolinVis.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/vis/violin/ViolinVis.tsx b/src/vis/violin/ViolinVis.tsx index 3bac5bc0f..7548aa256 100644 --- a/src/vis/violin/ViolinVis.tsx +++ b/src/vis/violin/ViolinVis.tsx @@ -60,7 +60,6 @@ export function ViolinVis({ config, columns, scales, dimensions, selectedList, s useEffect(() => { const plotDiv = document.getElementById(`plotlyDiv${id}`); - console.log('useEffect rendering'); if (plotDiv) { // NOTE: @dv-usama-ansari: This is a hack to update the plotly plots on resize. // The `setTimeout` is used to pass the resize function to the next event loop, so that the plotly plots are rendered first.