twenty/packages/twenty-front/.storybook/main.ts
Jérémy M e8d96cfd10
feat: view groups (#7176)
Fix #4244 and #4356

This pull request introduces the new "view groups" capability, enabling
the reordering, hiding, and showing of columns in Kanban mode. The core
enhancement includes the addition of a new entity named `ViewGroup`,
which manages column behaviors and interactions.

#### Key Changes:
1. **ViewGroup Entity**:  
The newly added `ViewGroup` entity is responsible for handling the
organization and state of columns.
This includes:
   - The ability to reorder columns.
- The option to hide or show specific columns based on user preferences.

#### Conclusion:
This PR adds a significant new feature that enhances the flexibility of
Kanban views through the `ViewGroup` entity.
We'll later add the view group logic to table view too.

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-10-24 15:38:52 +02:00

63 lines
1.6 KiB
TypeScript

import { StorybookConfig } from '@storybook/react-vite';
const computeStoriesGlob = () => {
if (process.env.STORYBOOK_SCOPE === 'pages') {
return [
'../src/pages/**/*.stories.@(js|jsx|ts|tsx)',
'../src/__stories__/*.stories.@(js|jsx|ts|tsx)',
'../src/pages/**/*.docs.mdx',
'../src/__stories__/*.docs.mdx',
];
}
if (process.env.STORYBOOK_SCOPE === 'modules') {
return [
'../src/modules/**/!(perf)/*.stories.@(js|jsx|ts|tsx)',
'../src/modules/**/*.docs.mdx',
];
}
if (process.env.STORYBOOK_SCOPE === 'performance') {
return ['../src/modules/**/perf/*.perf.stories.@(js|jsx|ts|tsx)'];
}
if (process.env.STORYBOOK_SCOPE === 'ui-docs') {
return ['../src/modules/ui/**/*.docs.mdx'];
}
return ['../src/**/*.docs.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'];
};
const config: StorybookConfig = {
stories: computeStoriesGlob(),
staticDirs: ['../public'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-onboarding',
'@storybook/addon-interactions',
'@storybook/addon-coverage',
'storybook-dark-mode',
'storybook-addon-cookie',
'storybook-addon-pseudo-states',
],
framework: {
name: '@storybook/react-vite',
options: {},
},
viteFinal: async (config) => {
// Merge custom configuration into the default config
const { mergeConfig } = await import('vite');
return mergeConfig(config, {
resolve: {
alias: {
'react-dom/client': 'react-dom/profiling',
},
},
});
},
logLevel: 'error',
};
export default config;