mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 17:02:49 +03:00
console: improve storybook folder structure
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5167 GitOrigin-RevId: 384f86dda2ae7e759659a920aba2263cf36e0310
This commit is contained in:
parent
c7a9589bdc
commit
a4652848e1
@ -8,7 +8,7 @@ import { TemplateStoriesFactory } from '@/utils/StoryUtils';
|
||||
import { RestEndpointForm } from '@/components/Services/ApiExplorer/Rest/Form/RestEndpointForm';
|
||||
|
||||
<Meta
|
||||
title="REST endpoints/Form ✨"
|
||||
title="Features/REST endpoints/Form ✨"
|
||||
component={RestEndpointForm}
|
||||
parameters={{
|
||||
docs: { source: { type: 'code' } },
|
||||
|
@ -7,7 +7,7 @@ import { DatabaseRelationshipsTab } from './DatabaseRelationshipsTab';
|
||||
import { handlers } from './__mocks__';
|
||||
|
||||
export default {
|
||||
title: 'Data Relationships/Database Relationships Tab',
|
||||
title: 'Features/Data Relationships/Database Relationships Tab',
|
||||
component: DatabaseRelationshipsTab,
|
||||
decorators: [ReactQueryDecorator()],
|
||||
parameters: {
|
||||
|
@ -4,7 +4,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';
|
||||
import { Form } from './Form';
|
||||
|
||||
export default {
|
||||
title: 'Data Relationships/Form',
|
||||
title: 'Features/Data Relationships/Form',
|
||||
decorators: [ReactQueryDecorator()],
|
||||
component: Form,
|
||||
} as ComponentMeta<typeof Form>;
|
||||
|
@ -11,7 +11,7 @@ import { handlers } from '../../../RemoteRelationships/RemoteSchemaRelationships
|
||||
|
||||
export default {
|
||||
title:
|
||||
'Data Relationships/Local DB Relationships/Local DB Relationships Form',
|
||||
'Features/Data Relationships/Local DB Relationships/Local DB Relationships Form',
|
||||
component: LocalRelationshipWidget,
|
||||
decorators: [ReactQueryDecorator()],
|
||||
parameters: {
|
||||
|
@ -11,7 +11,7 @@ import { handlers } from '../../../RemoteRelationships/RemoteSchemaRelationships
|
||||
|
||||
export default {
|
||||
title:
|
||||
'Data Relationships/Remote DB Relationships/Remote DB Relationships Form',
|
||||
'Features/Data Relationships/Remote DB Relationships/Remote DB Relationships Form',
|
||||
component: RemoteDBRelationshipWidget,
|
||||
decorators: [ReactQueryDecorator()],
|
||||
parameters: {
|
||||
|
@ -80,7 +80,7 @@ const UseSuggestedArrayRelationshipsComponent = () => {
|
||||
};
|
||||
|
||||
export default {
|
||||
title: 'Data Relationships/useSuggestedRelationships',
|
||||
title: 'Features/Data Relationships/useSuggestedRelationships',
|
||||
decorators: [ReactQueryDecorator()],
|
||||
component: UseSuggestedRelationshipsComponent,
|
||||
parameters: {
|
||||
|
@ -3,7 +3,7 @@ import React from 'react';
|
||||
import { FeatureFlagFloatingButton } from './FeatureFlagFloatingButton';
|
||||
|
||||
export default {
|
||||
title: 'feature/FeatureFlags/FeatureFlagFloatingButton',
|
||||
title: 'features/FeatureFlags/FeatureFlagFloatingButton',
|
||||
component: FeatureFlagFloatingButton,
|
||||
} as ComponentMeta<typeof FeatureFlagFloatingButton>;
|
||||
|
||||
|
@ -5,7 +5,7 @@ import { FeatureFlagToast } from './FeatureFlagToast';
|
||||
import { FeatureFlagDefinition } from '../../types';
|
||||
|
||||
export default {
|
||||
title: 'feature/FeatureFlags/FeatureFlagToast',
|
||||
title: 'features/FeatureFlags/FeatureFlagToast',
|
||||
component: FeatureFlagToast,
|
||||
decorators: [ReactQueryDecorator()],
|
||||
} as ComponentMeta<typeof FeatureFlagToast>;
|
||||
|
@ -5,7 +5,7 @@ import { FeatureFlags } from './FeatureFlags';
|
||||
import { FeatureFlagDefinition } from '../../types';
|
||||
|
||||
export default {
|
||||
title: 'feature/FeatureFlags',
|
||||
title: 'features/FeatureFlags',
|
||||
component: FeatureFlags,
|
||||
decorators: [ReactQueryDecorator()],
|
||||
} as ComponentMeta<typeof FeatureFlags>;
|
||||
|
@ -8,7 +8,7 @@ import { BulkDelete, BulkDeleteProps } from './BulkDelete';
|
||||
import { handlers } from './mocks/handlers.mock';
|
||||
|
||||
export default {
|
||||
title: 'Permissions Form/Bulk Update',
|
||||
title: 'Features/Permissions Form/Bulk Update',
|
||||
component: BulkDelete,
|
||||
decorators: [ReactQueryDecorator()],
|
||||
} as Meta;
|
||||
|
@ -6,7 +6,7 @@ import { PermissionsForm, PermissionsFormProps } from './PermissionsForm';
|
||||
import { handlers } from './mocks/handlers.mock';
|
||||
|
||||
export default {
|
||||
title: 'Permissions Form/Form',
|
||||
title: 'Features/Permissions Form/Form',
|
||||
component: PermissionsForm,
|
||||
decorators: [ReactQueryDecorator()],
|
||||
parameters: {
|
||||
|
@ -6,7 +6,7 @@ import { Form } from '@/new-components/Form';
|
||||
import { AggregationSection, AggregationProps } from './Aggregation';
|
||||
|
||||
export default {
|
||||
title: 'Permissions Form/Components/Aggregation Section',
|
||||
title: 'Features/Permissions Form/Components/Aggregation Section',
|
||||
component: AggregationSection,
|
||||
parameters: {
|
||||
// Disable storybook for playground stories
|
||||
|
@ -6,7 +6,7 @@ import { Form } from '@/new-components/Form';
|
||||
import { BackendOnlySection, BackEndOnlySectionProps } from './BackendOnly';
|
||||
|
||||
export default {
|
||||
title: 'Permissions Form/Components/Backend Only Section',
|
||||
title: 'Features/Permissions Form/Components/Backend Only Section',
|
||||
component: BackendOnlySection,
|
||||
parameters: {
|
||||
// Disable storybook for playground stories
|
||||
|
@ -10,7 +10,7 @@ import {
|
||||
} from './ClonePermissions';
|
||||
|
||||
export default {
|
||||
title: 'Permissions Form/Components/Clone Permissions',
|
||||
title: 'Features/Permissions Form/Components/Clone Permissions',
|
||||
component: ClonePermissionsSection,
|
||||
decorators: [
|
||||
(StoryComponent: React.FC) => (
|
||||
|
@ -11,7 +11,7 @@ import {
|
||||
const schema = z.object({ columns: z.record(z.optional(z.boolean())) });
|
||||
|
||||
export default {
|
||||
title: 'Permissions Form/Components/Column Section',
|
||||
title: 'Features/Permissions Form/Components/Column Section',
|
||||
component: ColumnPermissionsSection,
|
||||
decorators: [
|
||||
(StoryComponent: React.FC) => (
|
||||
|
@ -9,7 +9,7 @@ import {
|
||||
} from './ColumnPresets';
|
||||
|
||||
export default {
|
||||
title: 'Permissions Form/Components/Presets Section',
|
||||
title: 'Features/Permissions Form/Components/Presets Section',
|
||||
component: ColumnPresetsSection,
|
||||
decorators: [
|
||||
(StoryComponent: React.FC) => (
|
||||
|
@ -4,7 +4,7 @@ import { Story, Meta } from '@storybook/react';
|
||||
import { JSONEditor, JSONEditorProps } from './JSONEditor';
|
||||
|
||||
export default {
|
||||
title: 'Permissions Form/Components/JSON Editor',
|
||||
title: 'Features/Permissions Form/Components/JSON Editor',
|
||||
component: JSONEditor,
|
||||
} as Meta;
|
||||
|
||||
|
@ -14,7 +14,7 @@ import { allSchemas, allFunctions } from '../mocks/mockData';
|
||||
import { QueryType } from '../types';
|
||||
|
||||
export default {
|
||||
title: 'Permissions Form/Components/Row Section',
|
||||
title: 'Features/Permissions Form/Components/Row Section',
|
||||
component: RowPermissionsSection,
|
||||
decorators: [
|
||||
(StoryComponent: React.FC) => (
|
||||
|
@ -22,7 +22,7 @@ const UseDefaultValuesComponent = ({
|
||||
};
|
||||
|
||||
export default {
|
||||
title: 'Permissions Form/hooks/useDefaultValues',
|
||||
title: 'Features/Permissions Form/hooks/useDefaultValues',
|
||||
component: UseDefaultValuesComponent,
|
||||
decorators: [ReactQueryDecorator()],
|
||||
parameters: {
|
||||
|
@ -17,7 +17,7 @@ const UseFormDataComponent = ({
|
||||
};
|
||||
|
||||
export default {
|
||||
title: 'Permissions Form/hooks/useFormData',
|
||||
title: 'Features/Permissions Form/hooks/useFormData',
|
||||
component: UseFormDataComponent,
|
||||
decorators: [ReactQueryDecorator()],
|
||||
parameters: {
|
||||
|
@ -67,7 +67,7 @@ const UseUpdatePermissionsComponent = ({
|
||||
};
|
||||
|
||||
export default {
|
||||
title: 'Permissions Form/hooks/useUpdatePermissions',
|
||||
title: 'Features/Permissions Form/hooks/useUpdatePermissions',
|
||||
component: UseUpdatePermissionsComponent,
|
||||
decorators: [ReactQueryDecorator()],
|
||||
parameters: {
|
||||
|
@ -9,7 +9,7 @@ import { PermissionsTab, PermissionsTabProps } from './PermissionsTab';
|
||||
import { handlers } from '../PermissionsForm/mocks/handlers.mock';
|
||||
|
||||
export default {
|
||||
title: 'Permissions Tab/Permissions Tab',
|
||||
title: 'Features/Permissions Tab/Permissions Tab',
|
||||
component: PermissionsTab,
|
||||
decorators: [ReactQueryDecorator()],
|
||||
} as Meta;
|
||||
|
@ -7,7 +7,7 @@ import { handlers } from '../PermissionsForm/mocks/handlers.mock';
|
||||
import { useTableMachine } from './hooks';
|
||||
|
||||
export default {
|
||||
title: 'Permissions Table/Table',
|
||||
title: 'Features/Permissions Table/Table',
|
||||
component: PermissionsTable,
|
||||
decorators: [ReactQueryDecorator()],
|
||||
} as Meta;
|
||||
|
@ -12,7 +12,7 @@ import {
|
||||
} from './Cells';
|
||||
|
||||
export default {
|
||||
title: 'Permissions Table/Components/Cells',
|
||||
title: 'Features/Permissions Table/Components/Cells',
|
||||
component: InputCell,
|
||||
decorators: [
|
||||
(StoryComponent: React.FC) => (
|
||||
|
@ -4,7 +4,7 @@ import { Story, Meta } from '@storybook/react';
|
||||
import { PermissionsLegend } from './PermissionsLegend';
|
||||
|
||||
export default {
|
||||
title: 'Permissions Table/Components/Permissions Legend',
|
||||
title: 'Features/Permissions Table/Components/Permissions Legend',
|
||||
component: PermissionsLegend,
|
||||
parameters: { chromatic: { disableSnapshot: true } },
|
||||
} as Meta;
|
||||
|
@ -13,7 +13,7 @@ import { metadata, relationshipQueryResponse } from './mocks';
|
||||
const url = 'http://localhost:8080';
|
||||
|
||||
export default {
|
||||
title: 'Relationships/Database Relationship Table',
|
||||
title: 'Features/Relationships/Database Relationship Table',
|
||||
component: DatabaseRelationshipsTable,
|
||||
decorators: [ReactQueryDecorator()],
|
||||
parameters: {
|
||||
|
@ -80,7 +80,7 @@ const tableWithLegacyAndNewRemoteSchemaRelations: any = {
|
||||
};
|
||||
|
||||
export default {
|
||||
title: 'Relationships/RemoteSchemaRelationshipTable',
|
||||
title: 'Features/Relationships/RemoteSchemaRelationshipTable',
|
||||
component: RemoteSchemaRelationshipTable,
|
||||
argTypes: {
|
||||
onClick: { action: 'clicked' },
|
||||
|
@ -7,7 +7,7 @@ import { handlers } from '../../../RemoteRelationships/RemoteSchemaRelationships
|
||||
import { DbToRsForm, DbToRsFormProps } from './DbToRsForm';
|
||||
|
||||
export default {
|
||||
title: 'Data Relationships/DB to RS Relationship Form',
|
||||
title: 'Features/Data Relationships/DB to RS Relationship Form',
|
||||
component: DbToRsForm,
|
||||
decorators: [ReactQueryDecorator()],
|
||||
parameters: {
|
||||
|
@ -13,7 +13,8 @@ const defaultValues = {
|
||||
};
|
||||
|
||||
export default {
|
||||
title: 'Remote Relationships/Components/Reference Remote Schema Selector',
|
||||
title:
|
||||
'Features/Remote Relationships/Components/Reference Remote Schema Selector',
|
||||
component: RefRsSelector,
|
||||
decorators: [
|
||||
StoryComponent => (
|
||||
|
@ -15,7 +15,7 @@ const defaultValues = {
|
||||
};
|
||||
|
||||
export default {
|
||||
title: 'Remote Relationships/Components/Remote Database Widget',
|
||||
title: 'Features/Remote Relationships/Components/Remote Database Widget',
|
||||
component: RemoteDatabaseWidget,
|
||||
decorators: [
|
||||
ReactQueryDecorator(),
|
||||
|
@ -14,7 +14,7 @@ import {
|
||||
import { handlers } from '../../__mocks__';
|
||||
|
||||
export default {
|
||||
title: 'Remote Relationships/Components/Remote Schema To Db Form',
|
||||
title: 'Features/Remote Relationships/Components/Remote Schema To Db Form',
|
||||
component: RemoteSchemaToDbForm,
|
||||
decorators: [
|
||||
ReactQueryDecorator(),
|
||||
|
@ -13,7 +13,8 @@ import {
|
||||
import { handlers } from '../../__mocks__';
|
||||
|
||||
export default {
|
||||
title: 'Remote Relationships/Components/Remote Schema To Remote Schema Form',
|
||||
title:
|
||||
'Features/Remote Relationships/Components/Remote Schema To Remote Schema Form',
|
||||
component: RemoteSchemaToRemoteSchemaForm,
|
||||
decorators: [ReactQueryDecorator()],
|
||||
parameters: {
|
||||
|
@ -25,7 +25,7 @@ const defaultValues = {
|
||||
};
|
||||
|
||||
export default {
|
||||
title: 'Remote Relationships/Components/Remote Schema Widget',
|
||||
title: 'Features/Remote Relationships/Components/Remote Schema Widget',
|
||||
component: RemoteSchemaWidget,
|
||||
decorators: [
|
||||
ReactQueryDecorator(),
|
||||
|
@ -14,7 +14,8 @@ const defaultValues = {
|
||||
};
|
||||
|
||||
export default {
|
||||
title: 'Remote Relationships/Components/Remote Schema Source Type Selector',
|
||||
title:
|
||||
'Features/Remote Relationships/Components/Remote Schema Source Type Selector',
|
||||
component: RsSourceTypeSelector,
|
||||
decorators: [
|
||||
StoryComponent => (
|
||||
|
@ -8,7 +8,7 @@ import { expect } from '@storybook/jest';
|
||||
import { handlers } from './mocks/handlers.mock';
|
||||
|
||||
export default {
|
||||
title: 'RemoteSchema/components/Create',
|
||||
title: 'Features/Remote Schema/components/Create',
|
||||
component: RemoteSchema.Create,
|
||||
decorators: [ReactQueryDecorator(), ReduxDecorator({})],
|
||||
parameters: {
|
||||
|
Loading…
Reference in New Issue
Block a user