From ceea893188e07e7636447f8bc57fef3c492e79e9 Mon Sep 17 00:00:00 2001 From: Nate Kelley Date: Mon, 3 Mar 2025 09:40:02 -0700 Subject: [PATCH] rip out render type --- web/Makefile | 2 +- web/package.json | 25 ++++++++----------- .../test/chartjs/chartjsfixedline/page.tsx | 1 - .../test/chartjs/chartjsundefined/page.tsx | 1 - web/src/app/test/chartjs/page.tsx | 1 - web/src/components/ui/charts/BusterChart.tsx | 2 -- .../ui/charts/BusterChartComponent.tsx | 7 +----- .../interfaces/chartComponentInterfaces.ts | 3 +-- .../ui/charts/interfaces/interfaces.ts | 1 - .../ui/inputs/InputTagInput.stories.tsx | 1 + 10 files changed, 14 insertions(+), 30 deletions(-) diff --git a/web/Makefile b/web/Makefile index ed85fe24c..03f9984af 100644 --- a/web/Makefile +++ b/web/Makefile @@ -13,6 +13,6 @@ fast: build-storybook: npm run build-storybook -start-storybook: +storybook: npm run start-storybook diff --git a/web/package.json b/web/package.json index 4311d7288..0228429d4 100644 --- a/web/package.json +++ b/web/package.json @@ -23,7 +23,6 @@ "@dnd-kit/sortable": "^10.0.0", "@faker-js/faker": "^9.5.1", "@fluentui/react-context-selector": "^9.1.72", - "@manufac/echarts-simple-transform": "^2.0.11", "@million/lint": "^1.0.14", "@monaco-editor/react": "^4.7.0", "@radix-ui/react-avatar": "^1.1.3", @@ -43,8 +42,8 @@ "@supabase/ssr": "^0.5.2", "@supabase/supabase-js": "^2.49.1", "@tailwindcss/forms": "^0.5.10", - "@tanstack/react-query": "^5.66.11", - "@tanstack/react-query-devtools": "^5.66.11", + "@tanstack/react-query": "^5.67.1", + "@tanstack/react-query-devtools": "^5.67.1", "@vercel/speed-insights": "^1.2.0", "ahooks": "^3.8.4", "antd": "5.23.3", @@ -70,13 +69,9 @@ "dayjs": "^1.11.13", "dom-to-image": "^2.6.0", "dotenv": "^16.4.7", - "echarts": "^5.6.0", - "echarts-for-react": "^3.0.2", - "echarts-simple-transform": "^1.0.0", - "echarts-stat": "^1.2.0", "email-validator": "^2.0.4", "font-color-contrast": "^11.1.0", - "framer-motion": "^12.4.7", + "framer-motion": "^12.4.9", "html2canvas": "^1.4.1", "js-cookie": "^3.0.5", "jspdf": "^3.0.0", @@ -93,7 +88,7 @@ "patternomaly": "^1.3.2", "pluralize": "^8.0.0", "posthog-js": "*", - "prettier": "^3.5.2", + "prettier": "^3.5.3", "prettier-plugin-tailwindcss": "^0.6.11", "react": "^18", "react-chartjs-2": "^5.3.0", @@ -118,12 +113,12 @@ }, "devDependencies": { "@chromatic-com/storybook": "^3.2.5", - "@storybook/addon-essentials": "^8.6.2", - "@storybook/addon-interactions": "^8.6.2", - "@storybook/blocks": "^8.6.2", - "@storybook/nextjs": "^8.6.2", - "@storybook/react": "^8.6.2", - "@storybook/test": "^8.6.2", + "@storybook/addon-essentials": "^8.6.3", + "@storybook/addon-interactions": "^8.6.3", + "@storybook/blocks": "^8.6.3", + "@storybook/nextjs": "^8.6.3", + "@storybook/react": "^8.6.3", + "@storybook/test": "^8.6.3", "@tailwindcss/postcss": "^4.0.9", "@tanstack/eslint-plugin-query": "^5.66.1", "@testing-library/jest-dom": "^6.6.3", diff --git a/web/src/app/test/chartjs/chartjsfixedline/page.tsx b/web/src/app/test/chartjs/chartjsfixedline/page.tsx index 7abdcd691..40520985b 100644 --- a/web/src/app/test/chartjs/chartjsfixedline/page.tsx +++ b/web/src/app/test/chartjs/chartjsfixedline/page.tsx @@ -124,7 +124,6 @@ export default function ChartjsFixedLine() { columnSettings={columnSettings} metricColumnId="sales" columnMetadata={columnMetadata} - renderType="chartjs" /> diff --git a/web/src/app/test/chartjs/chartjsundefined/page.tsx b/web/src/app/test/chartjs/chartjsundefined/page.tsx index 5faef3d91..97f27c9e4 100644 --- a/web/src/app/test/chartjs/chartjsundefined/page.tsx +++ b/web/src/app/test/chartjs/chartjsundefined/page.tsx @@ -168,7 +168,6 @@ export default function ChartJS() { pieDisplayLabelAs={displayLabelAs} pieShowInnerLabel={true} showLegendHeadline={'average'} - renderType="chartjs" showLegend={true} yAxisStartAxisAtZero={yAxisStartAxisAtZero} yAxisScaleType={yAxisScaleType} diff --git a/web/src/app/test/chartjs/page.tsx b/web/src/app/test/chartjs/page.tsx index 1dca0ca3c..4e6197a53 100644 --- a/web/src/app/test/chartjs/page.tsx +++ b/web/src/app/test/chartjs/page.tsx @@ -209,7 +209,6 @@ export default function ChartJS() { pieDisplayLabelAs={displayLabelAs} pieShowInnerLabel={true} showLegendHeadline={'average'} - renderType="chartjs" showLegend={true} yAxisStartAxisAtZero={yAxisStartAxisAtZero} yAxisScaleType={yAxisScaleType} diff --git a/web/src/components/ui/charts/BusterChart.tsx b/web/src/components/ui/charts/BusterChart.tsx index f08270084..928cf6a90 100644 --- a/web/src/components/ui/charts/BusterChart.tsx +++ b/web/src/components/ui/charts/BusterChart.tsx @@ -45,7 +45,6 @@ export const BusterChart: React.FC = React.memo( editable, selectedChartType, columnLabelFormats = DEFAULT_CHART_CONFIG.columnLabelFormats, - renderType = 'chartjs', ...props }) => { const isTable = selectedChartType === ChartType.Table; @@ -132,7 +131,6 @@ export const BusterChart: React.FC = React.memo( const chartProps: BusterChartRenderComponentProps = { ...DEFAULT_CHART_CONFIG, - renderType, data, onChartMounted, onInitialAnimationEnd: onInitialAnimationEndPreflight, diff --git a/web/src/components/ui/charts/BusterChartComponent.tsx b/web/src/components/ui/charts/BusterChartComponent.tsx index 22daa8741..34cf43b34 100644 --- a/web/src/components/ui/charts/BusterChartComponent.tsx +++ b/web/src/components/ui/charts/BusterChartComponent.tsx @@ -8,7 +8,6 @@ import { BusterChartJS } from './BusterChartJS'; import { useDatasetOptions } from './chartHooks'; export const BusterChartComponent: React.FC = ({ - renderType, data: dataProp, barSortBy, pieMinimumSlicePercentage, @@ -60,9 +59,5 @@ export const BusterChartComponent: React.FC = ( ] ); - if (renderType === 'chartjs') { - return ; - } - - return <>; + return ; }; diff --git a/web/src/components/ui/charts/interfaces/chartComponentInterfaces.ts b/web/src/components/ui/charts/interfaces/chartComponentInterfaces.ts index a9648f4b3..039accc93 100644 --- a/web/src/components/ui/charts/interfaces/chartComponentInterfaces.ts +++ b/web/src/components/ui/charts/interfaces/chartComponentInterfaces.ts @@ -6,7 +6,6 @@ export interface BusterChartTypeComponentProps extends Omit< Required, | 'data' - | 'renderType' | 'loading' | 'showLegend' | 'showLegendHeadline' @@ -21,7 +20,7 @@ export interface BusterChartTypeComponentProps export interface BusterChartComponentProps extends Omit< Required, - 'renderType' | 'selectedAxis' | 'barSortBy' | 'trendlines' | 'data' + 'selectedAxis' | 'barSortBy' | 'trendlines' | 'data' >, ReturnType { selectedAxis: ChartEncodes; diff --git a/web/src/components/ui/charts/interfaces/interfaces.ts b/web/src/components/ui/charts/interfaces/interfaces.ts index 0e94c0ab4..ed3f2ef0c 100644 --- a/web/src/components/ui/charts/interfaces/interfaces.ts +++ b/web/src/components/ui/charts/interfaces/interfaces.ts @@ -15,5 +15,4 @@ export type BusterChartProps = { editable?: boolean; onInitialAnimationEnd?: () => void; onChartMounted?: (chart?: any) => void; - renderType?: 'echart' | 'chartjs'; } & BusterChartConfigProps; diff --git a/web/src/components/ui/inputs/InputTagInput.stories.tsx b/web/src/components/ui/inputs/InputTagInput.stories.tsx index 84d665f14..c36fefa6d 100644 --- a/web/src/components/ui/inputs/InputTagInput.stories.tsx +++ b/web/src/components/ui/inputs/InputTagInput.stories.tsx @@ -1,6 +1,7 @@ import type { Meta, StoryObj } from '@storybook/react'; import { TagInput } from './InputTagInput'; import { useState } from 'react'; +import React from 'react'; const meta: Meta = { title: 'UI/Inputs/TagInput',