Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storybook: Fix default source visibility #53749

Merged
merged 1 commit into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/components/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ Given a component folder (e.g. `packages/components/src/unit-control`):
const meta: ComponentMeta< typeof MyComponent > = {
parameters: {
controls: { expanded: true },
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const meta: ComponentMeta< typeof AlignmentMatrixControl > = {
},
parameters: {
controls: { expanded: true },
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};
export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const meta: ComponentMeta< typeof AnglePickerControl > = {
controls: {
expanded: true,
},
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};

Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/animate/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const meta: ComponentMeta< typeof Animate > = {
component: Animate,
parameters: {
controls: { expanded: true },
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};
export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const meta: ComponentMeta< typeof BaseControl > = {
},
parameters: {
controls: { expanded: true },
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};
export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const meta: ComponentMeta< typeof BorderBoxControl > = {
},
parameters: {
controls: { expanded: true },
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};
export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const meta: ComponentMeta< typeof BorderControl > = {
},
parameters: {
controls: { expanded: true },
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};
export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const meta: ComponentMeta< typeof ButtonGroup > = {
},
parameters: {
controls: { expanded: true },
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};
export default meta;
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/button/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const meta: Meta< typeof Button > = {
},
parameters: {
controls: { expanded: true },
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};
export default meta;
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/card/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const meta: ComponentMeta< typeof Card > = {
controls: {
expanded: true,
},
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const meta: ComponentMeta< typeof CheckboxControl > = {
expanded: true,
exclude: [ 'heading' ],
},
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};
export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ const meta: ComponentMeta< typeof CircularOptionPicker > = {
parameters: {
actions: { argTypesRegex: '^on.*' },
controls: { expanded: true },
docs: { source: { state: 'open', excludeDecorators: true } },
docs: {
canvas: { sourceState: 'shown' },
source: { excludeDecorators: true },
},
},
decorators: [
// Share current color state between main component, `actions` and `options`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const meta: ComponentMeta< typeof ColorIndicator > = {
controls: {
expanded: true,
},
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};
export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const meta: ComponentMeta< typeof ColorPalette > = {
},
parameters: {
controls: { expanded: true },
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};
export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const meta: ComponentMeta< typeof ColorPicker > = {
controls: {
expanded: true,
},
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};
export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const meta: ComponentMeta< typeof ComboboxControl > = {
parameters: {
actions: { argTypesRegex: '^on.*' },
controls: { expanded: true },
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};
export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const meta = {
children: 'Would you like to privately publish the post now?',
},
parameters: {
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const meta: ComponentMeta< typeof CustomGradientPicker > = {
parameters: {
actions: { argTypesRegex: '^on.*' },
controls: { expanded: true },
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};
export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const meta: ComponentMeta< typeof DateTimePicker > = {
},
parameters: {
controls: { expanded: true },
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};
export default meta;
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/date-time/stories/date.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const meta: ComponentMeta< typeof DatePicker > = {
},
parameters: {
controls: { expanded: true },
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};
export default meta;
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/date-time/stories/time.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const meta: ComponentMeta< typeof TimePicker > = {
},
parameters: {
controls: { expanded: true },
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};
export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default {
},
parameters: {
controls: { expanded: true },
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
},
} as ComponentMeta< typeof DimensionControl >;
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/disabled/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const meta: ComponentMeta< typeof Disabled > = {
controls: {
expanded: true,
},
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};

Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/divider/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const meta: ComponentMeta< typeof Divider > = {
},
parameters: {
controls: { expanded: true },
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};
export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const meta: ComponentMeta< typeof DropZone > = {
parameters: {
actions: { argTypesRegex: '^on.*' },
controls: { expanded: true },
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};
export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ const meta: Meta< typeof DropdownMenu > = {
parameters: {
actions: { argTypesRegex: '^on.*' },
controls: { expanded: true },
docs: { source: { state: 'open', excludeDecorators: true } },
docs: {
canvas: { sourceState: 'shown' },
source: { excludeDecorators: true },
},
},
decorators: [
// Layout wrapper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const meta: ComponentMeta< typeof DropdownMenu > = {
component: DropdownMenu,
parameters: {
controls: { expanded: true },
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
argTypes: {
icon: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const meta: ComponentMeta< typeof DuotonePicker > = {
},
parameters: {
controls: { expanded: true },
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};
export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const meta: ComponentMeta< typeof DuotoneSwatch > = {
component: DuotoneSwatch,
parameters: {
controls: { expanded: true },
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};
export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const meta: ComponentMeta< typeof Elevation > = {
controls: {
expanded: true,
},
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};
export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const meta: ComponentMeta< typeof ExternalLink > = {
controls: {
expanded: true,
},
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};
export default meta;
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/flex/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const meta: ComponentMeta< typeof Flex > = {
controls: {
expanded: true,
},
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};
export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const meta: ComponentMeta< typeof FocalPointPicker > = {
parameters: {
actions: { argTypesRegex: '^on.*' },
controls: { expanded: true },
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};
export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const meta: ComponentMeta< typeof FontSizePicker > = {
parameters: {
actions: { argTypesRegex: '^on.*' },
controls: { expanded: true },
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};
export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const meta: ComponentMeta< typeof FormFileUpload > = {
},
parameters: {
controls: { expanded: true },
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};
export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const meta: ComponentMeta< typeof FormToggle > = {
controls: {
expanded: true,
},
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};
export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const meta: ComponentMeta< typeof FormTokenField > = {
controls: {
expanded: true,
},
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};
export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const meta: ComponentMeta< typeof GradientPicker > = {
component: GradientPicker,
parameters: {
controls: { expanded: true },
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
actions: { argTypesRegex: '^on.*' },
},
argTypes: {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/grid/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const meta: ComponentMeta< typeof Grid > = {
controls: {
expanded: true,
},
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};
export default meta;
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/h-stack/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const meta: ComponentMeta< typeof HStack > = {
},
parameters: {
controls: { expanded: true },
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};
export default meta;
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/heading/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const meta: ComponentMeta< typeof Heading > = {
},
parameters: {
controls: { expanded: true },
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};
export default meta;
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/icon/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const meta: ComponentMeta< typeof Icon > = {
component: Icon,
parameters: {
controls: { expanded: true },
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};
export default meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const meta: ComponentMeta< typeof InputControl > = {
},
parameters: {
controls: { expanded: true },
docs: { source: { state: 'open' } },
docs: { canvas: { sourceState: 'shown' } },
},
};
export default meta;
Expand Down
Loading