-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Make addon-options work with story parameters #3958
Conversation
Generated by 🚫 dangerJS |
Attempting to make addon-options use parameters. Few things,
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SUPER AWESOME!
setOptions being persistent is expected behavior I think? I don't see this as a big problem. |
name: 'withOptions', | ||
parameterName: 'options', | ||
skipIfNoParametersOrOptions: false, | ||
allowDeprecatedUsage: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nm123github -- was there a particular reason why you decided to allow deprecated usage for this decorator?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noticed bunch of other add-ons that had set it to true, so presumed this was the pattern to follow and maybe there was a plan to set them to false at a later date.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha. That option is to allow add('story', withOptions(() => <Story />))
style usage (which is the old way addons did it pre-4.0). Given this API never existed for withOptions
I don't think we need it.
What I did
How to test
I've added usage to some stories in the marko-cli
If your answer is yes to any of these, please make sure to include it in your PR.
For maintainers only: Please tag your pull request with at least one of the following:
["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]