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

Story Index: Fix storySort parsing for parameters variable #21481

Merged
merged 1 commit into from Mar 8, 2023

Conversation

shilman
Copy link
Member

@shilman shilman commented Mar 8, 2023

Closes #21455

What I did

Fixed handling of parameters defined as a variable in the default export & added test cases

I also changed the behavior to be a little less strict about other cases & assume that some other part of Storybook will catch issues with, say, invalid parameters

Self-merging @tmeasday

How to test

  • See attached unit tests

@shilman shilman merged commit ebd0128 into next Mar 8, 2023
32 checks passed
@shilman shilman deleted the shilman/21455-fix-storysort-extraction branch March 8, 2023 16:59
@@ -76,15 +76,18 @@ const parseParameters = (params: t.Expression): t.Expression | undefined => {
unsupported('options', true);
}
} else {
unsupported('parameters', true);
console.log({ paramsObject });
Copy link
Member

Choose a reason for hiding this comment

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

@shilman is this log intentional?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: unexpected 'parameters'. Parameters 'options.storySort' should be defined inline e.g. ...
2 participants