Skip to content

Commit 3c9e598

Browse files
committed
fix: resolve duplicate story IDs in visual-stories executor
- Use theme.value instead of theme.title in story titles for consistency - Add theme identifier to export names to ensure uniqueness across themes - Export names now include theme: BusyIndicatorSapHorizonVisuals vs BusyIndicatorSapFiori3Visuals - Resolves 'Duplicate stories with id' errors in Chromatic builds - Storybook build now completes successfully without conflicts [ci visual]
1 parent b3c40ca commit 3c9e598

File tree

1 file changed

+2
-2
lines changed
  • packages/workspace-plugins/src/executors/visual-stories

1 file changed

+2
-2
lines changed

packages/workspace-plugins/src/executors/visual-stories/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@ export default async function(schema: VisualStoriesSchema, context: ExecutorCont
5757
import { visualStory, withThemeProvider } from 'fundamental-styles/storybook';
5858
5959
export default {
60-
title: ${JSON.stringify('Visuals/' + fullTitle + '/' + theme.title)},
60+
title: ${JSON.stringify('Visuals/' + fullTitle + '/' + theme.value)},
6161
parameters: {
6262
theme: ${JSON.stringify(theme.value)},
6363
packageId: ${JSON.stringify(projectName)},
6464
},
6565
decorators: [withThemeProvider]
6666
};
67-
export const ${className}Visuals = visualStory(stories as any);
67+
export const ${className}${names(theme.value).className}Visuals = visualStory(stories as any);
6868
`,
6969
{ parser: 'typescript' }
7070
);

0 commit comments

Comments
 (0)