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

Core: Add preview.js default export support #21227

Merged
merged 10 commits into from
Feb 24, 2023
Merged

Conversation

kasperpeulen
Copy link
Contributor

@kasperpeulen kasperpeulen commented Feb 23, 2023

Make sure that users can use export default in a preview.ts/js file as well, as alternative of named exports.

@kasperpeulen kasperpeulen force-pushed the rollback-preview-ts-template branch from b7cc2d3 to 2ca966c Compare February 23, 2023 16:21
@kasperpeulen kasperpeulen added the ci:daily Run the CI jobs that normally run in the daily job. label Feb 23, 2023
@kasperpeulen kasperpeulen force-pushed the rollback-preview-ts-template branch from 6050b8e to daeb65f Compare February 23, 2023 17:20
@kasperpeulen kasperpeulen force-pushed the rollback-preview-ts-template branch from daeb65f to 9b6b6b4 Compare February 23, 2023 17:20
@kasperpeulen kasperpeulen changed the title Rollback preview.ts template Allow preview to have a default export with all preview options Feb 23, 2023
@shilman shilman changed the title Allow preview to have a default export with all preview options Core: Add preview.js default export support Feb 23, 2023
@shilman shilman changed the title Core: Add preview.js default export support Core: Add preview.js default export support Feb 23, 2023
argTypes: { x: '2', z: '2', obj: { a: '2', c: '2' } },
globals: { x: '2', z: '2', obj: { a: '2', c: '2' } },
globalTypes: { x: '2', z: '2', obj: { a: '2', c: '2' } },
default: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a case where this is mixed? We are composing configs that could come from users, addons, presets and frameworks, which will definitely be mixed and the composing of it all should work correctly

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do once CI finishes & merge

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's all good – I tested that and added a telescoping PR for after we merge this: #21230

@shilman shilman added the core label Feb 23, 2023
@yannbf
Copy link
Member

yannbf commented Feb 23, 2023

Edit: nevermind, it's all good!

Hey @tmeasday if you have time, could you assist in getting Storybook in storyStoreV6 to support preview.js files that contain a default export?

export default {
  parameters: { actions: { argTypesRegex: 'on.*' }
}

@tmeasday tmeasday force-pushed the rollback-preview-ts-template branch from cef776d to 70a9e93 Compare February 24, 2023 01:43
@tmeasday tmeasday merged commit 0523223 into next Feb 24, 2023
@tmeasday tmeasday deleted the rollback-preview-ts-template branch February 24, 2023 04:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:daily Run the CI jobs that normally run in the daily job. core feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants