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

Support skip via story parameters #228

Merged
merged 2 commits into from
Jul 2, 2020
Merged

Support skip via story parameters #228

merged 2 commits into from
Jul 2, 2020

Conversation

oblador
Copy link
Owner

@oblador oblador commented Apr 2, 2020

This PR moves the configuration of skipping individual stories to the story parameter field, deprecating the lokiSkip method. Additionally it drops the deprecated use of kind+story combination and uses the id introduced in SB 5.

Fixes #176 #190 #198

This is a breaking change, dropping support for storybook prior to version 5.0 which was released about one year ago. It is probably possible to keep backwards support, but it would be a bit messy and would have to rely on heuristics.

<Welcome showApp={linkTo('Button')} />
));
storiesOf('Welcome', module)
.lokiSkip('to Storybook', () => <Welcome showApp={linkTo('Button')} />)
Copy link
Collaborator

Choose a reason for hiding this comment

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

So lokiSkip will continue to exist and behave like add?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Yeah, i'll add warnings for now and remove it some time in the future.

warnedSkipDeprecation = true;
console.warn(
'[DEPRECATED] `.add.skip(...)` is deprecated. Please use `.lokiSkip(...)` instead.'
'[DEPRECATED] `.add.skip(...)` and `.lokiSkip(...)` are deprecated. Please pass `{ loki: { skip: true } }` in the third parameter instead.'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice warning! 💯

@Tobi-mmt
Copy link

Tobi-mmt commented Jul 1, 2020

@oblador this will probably also close #103 – if we use the parameters instead of skip() – since the stories are filtered by there parameters without a blocking, extra function.

I am excited for this update 🥳

@johannespfeiffer
Copy link
Contributor

Here too 😄
Any eta for this update?

@oblador oblador merged commit 5c30515 into master Jul 2, 2020
@oblador oblador deleted the skip-param branch July 2, 2020 22:10
@techeverri techeverri mentioned this pull request Jul 14, 2020
72636c added a commit to seek-oss/scoobie that referenced this pull request Jul 14, 2020
The `lokiSkip` method is deprecated.

oblador/loki#228
72636c added a commit to seek-oss/scoobie that referenced this pull request Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No way to skip a story using CSF (Storybook 5.2)
4 participants