From 8938932ecb6873d73d772217a04d5c493b1660b3 Mon Sep 17 00:00:00 2001 From: Lukas Harbarth Date: Thu, 7 May 2026 10:49:02 +0200 Subject: [PATCH 1/2] docs(Storybook): show union values from types --- .storybook/main.ts | 1 + .storybook/preview.tsx | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/.storybook/main.ts b/.storybook/main.ts index b4fb21b8417..aff4cbb25d2 100644 --- a/.storybook/main.ts +++ b/.storybook/main.ts @@ -78,6 +78,7 @@ const config: StorybookConfig = { reactDocgenTypescriptOptions: { tsconfigPath: fileURLToPath(new URL('../tsconfig.json', import.meta.url)), shouldExtractLiteralValuesFromEnum: true, + shouldExtractValuesFromUnion: true, shouldRemoveUndefinedFromOptional: true, }, }, diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx index 3a0487a985c..77c3a95fa62 100644 --- a/.storybook/preview.tsx +++ b/.storybook/preview.tsx @@ -26,6 +26,12 @@ const preview: Preview = { ref: { table: { disable: true }, }, + dataset: { + control: { disable: true }, + }, + ChartPlaceholder: { + control: { disable: true }, + }, }, decorators: [ (Story, { globals, viewMode }) => { From 8cd6326f3399e64459d5090f93d24e9e7f7457d1 Mon Sep 17 00:00:00 2001 From: Lukas Harbarth Date: Thu, 7 May 2026 11:01:53 +0200 Subject: [PATCH 2/2] remove redundant sb arg-types --- packages/charts/src/components/BarChart/BarChart.stories.tsx | 3 --- .../src/components/BulletChart/BulletChart.stories.tsx | 3 --- .../src/components/ColumnChart/ColumnChart.stories.tsx | 3 --- .../src/components/ComposedChart/ComposedChart.stories.tsx | 3 --- .../charts/src/components/DonutChart/DonutChart.stories.tsx | 3 --- .../charts/src/components/LineChart/LineChart.stories.tsx | 5 ----- packages/charts/src/components/PieChart/PieChart.stories.tsx | 5 ----- .../charts/src/components/RadarChart/RadarChart.stories.tsx | 5 ----- .../src/components/TimelineChart/TimeLineChart.stories.tsx | 5 ----- 9 files changed, 35 deletions(-) diff --git a/packages/charts/src/components/BarChart/BarChart.stories.tsx b/packages/charts/src/components/BarChart/BarChart.stories.tsx index 3b86afe7223..8f490f627c5 100644 --- a/packages/charts/src/components/BarChart/BarChart.stories.tsx +++ b/packages/charts/src/components/BarChart/BarChart.stories.tsx @@ -15,9 +15,6 @@ const meta = { component: BarChart, tags: ['package:@ui5/webcomponents-react-charts'], argTypes: { - dataset: { - control: { disable: true }, - }, children: { control: { disable: true }, }, diff --git a/packages/charts/src/components/BulletChart/BulletChart.stories.tsx b/packages/charts/src/components/BulletChart/BulletChart.stories.tsx index b659a91a504..dde6924ee1c 100644 --- a/packages/charts/src/components/BulletChart/BulletChart.stories.tsx +++ b/packages/charts/src/components/BulletChart/BulletChart.stories.tsx @@ -7,9 +7,6 @@ const meta = { component: BulletChart, tags: ['package:@ui5/webcomponents-react-charts'], argTypes: { - dataset: { - control: { disable: true }, - }, children: { control: { disable: true }, }, diff --git a/packages/charts/src/components/ColumnChart/ColumnChart.stories.tsx b/packages/charts/src/components/ColumnChart/ColumnChart.stories.tsx index be2bea0d526..b77661fa540 100644 --- a/packages/charts/src/components/ColumnChart/ColumnChart.stories.tsx +++ b/packages/charts/src/components/ColumnChart/ColumnChart.stories.tsx @@ -15,9 +15,6 @@ const meta = { component: ColumnChart, tags: ['package:@ui5/webcomponents-react-charts'], argTypes: { - dataset: { - control: { disable: true }, - }, children: { control: { disable: true }, }, diff --git a/packages/charts/src/components/ComposedChart/ComposedChart.stories.tsx b/packages/charts/src/components/ComposedChart/ComposedChart.stories.tsx index a9767e4dedc..96c9341cb70 100644 --- a/packages/charts/src/components/ComposedChart/ComposedChart.stories.tsx +++ b/packages/charts/src/components/ComposedChart/ComposedChart.stories.tsx @@ -14,9 +14,6 @@ const meta = { component: ComposedChart, tags: ['package:@ui5/webcomponents-react-charts'], argTypes: { - dataset: { - control: { disable: true }, - }, children: { control: { disable: true }, }, diff --git a/packages/charts/src/components/DonutChart/DonutChart.stories.tsx b/packages/charts/src/components/DonutChart/DonutChart.stories.tsx index a2a09378d65..e8ebcbebc22 100644 --- a/packages/charts/src/components/DonutChart/DonutChart.stories.tsx +++ b/packages/charts/src/components/DonutChart/DonutChart.stories.tsx @@ -8,9 +8,6 @@ const meta = { component: DonutChart, tags: ['package:@ui5/webcomponents-react-charts'], argTypes: { - dataset: { - control: { disable: true }, - }, children: { control: { disable: true }, }, diff --git a/packages/charts/src/components/LineChart/LineChart.stories.tsx b/packages/charts/src/components/LineChart/LineChart.stories.tsx index 91981c636c0..d0ae70d26dc 100644 --- a/packages/charts/src/components/LineChart/LineChart.stories.tsx +++ b/packages/charts/src/components/LineChart/LineChart.stories.tsx @@ -41,11 +41,6 @@ const meta = { ], dataset: complexDataSet, }, - argTypes: { - dataset: { - control: { disable: true }, - }, - }, } satisfies Meta; export default meta; diff --git a/packages/charts/src/components/PieChart/PieChart.stories.tsx b/packages/charts/src/components/PieChart/PieChart.stories.tsx index de0b8e6eaca..c9e980a96a5 100644 --- a/packages/charts/src/components/PieChart/PieChart.stories.tsx +++ b/packages/charts/src/components/PieChart/PieChart.stories.tsx @@ -16,11 +16,6 @@ const meta = { }, dataset: simpleDataSet, }, - argTypes: { - dataset: { - control: { disable: true }, - }, - }, } satisfies Meta; export default meta; diff --git a/packages/charts/src/components/RadarChart/RadarChart.stories.tsx b/packages/charts/src/components/RadarChart/RadarChart.stories.tsx index 1971eb160c7..3d0db1eb6da 100644 --- a/packages/charts/src/components/RadarChart/RadarChart.stories.tsx +++ b/packages/charts/src/components/RadarChart/RadarChart.stories.tsx @@ -32,11 +32,6 @@ const meta = { ], dataset: complexDataSet, }, - argTypes: { - dataset: { - control: { disable: true }, - }, - }, } satisfies Meta; export default meta; diff --git a/packages/charts/src/components/TimelineChart/TimeLineChart.stories.tsx b/packages/charts/src/components/TimelineChart/TimeLineChart.stories.tsx index dc37b011140..ea5d7461609 100644 --- a/packages/charts/src/components/TimelineChart/TimeLineChart.stories.tsx +++ b/packages/charts/src/components/TimelineChart/TimeLineChart.stories.tsx @@ -9,11 +9,6 @@ const meta = { title: 'TimelineChart', component: TimelineChart, tags: ['package:@ui5/webcomponents-react-charts', 'experimental', 'deprecated'], - argTypes: { - dataset: { - control: { disable: true }, - }, - }, args: { dataset: dummyDiscreteDataSet }, } satisfies Meta;