-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Allow local decorators via params #5806
Conversation
This pull request is automatically deployed with Now. |
fd02020
to
1e0016c
Compare
@@ -203,7 +203,12 @@ export default class ClientApi { | |||
}, | |||
{ | |||
applyDecorators: this._decorateStory, | |||
getDecorators: () => [...localDecorators, ..._globalDecorators, withSubscriptionTracking], | |||
getDecorators: () => [ | |||
...(allParam.decorators || []), |
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.
@tmeasday not part of the change per se, but why is this called allParam
?
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.
@shilman I guess it's a combination of all parameters (local global etc) in a similar way?
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.
This is why I meant that addDecorator
could just be redefined to addDecorator(d) => addParameters({ decorators: [d] })
🤷♀️
…On 1 Mar 2019, 4:42 PM +1100, Michael Shilman ***@***.***>, wrote:
@shilman commented on this pull request.
In lib/client-api/src/client_api.js:
> @@ -203,7 +203,12 @@ export default class ClientApi {
},
{
applyDecorators: this._decorateStory,
- getDecorators: () => [...localDecorators, ..._globalDecorators, withSubscriptionTracking],
+ getDecorators: () => [
+ ...(allParam.decorators || []),
@tmeasday not part of the change per se, but why is this called allParam?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Allow local decorators via params
for #5781
What I did
I added support for local decorators via a parameter. This doesn't resolve the issue but at least it provides a palatable alternative.