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

Allow local decorators via params #5806

Merged
merged 2 commits into from
Mar 1, 2019
Merged

Conversation

tmeasday
Copy link
Member

@tmeasday tmeasday commented Mar 1, 2019

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.

@vercel
Copy link

vercel bot commented Mar 1, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

@@ -203,7 +203,12 @@ export default class ClientApi {
},
{
applyDecorators: this._decorateStory,
getDecorators: () => [...localDecorators, ..._globalDecorators, withSubscriptionTracking],
getDecorators: () => [
...(allParam.decorators || []),
Copy link
Member

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?

Copy link
Member Author

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?

Copy link
Member Author

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] })

@tmeasday
Copy link
Member Author

tmeasday commented Mar 1, 2019 via email

@shilman shilman merged commit cc54a7c into next Mar 1, 2019
@shilman shilman deleted the 5781-document-decorator-changes branch March 1, 2019 14:41
@shilman shilman added release patch:done Patch/release PRs already cherry-picked to main/release branch labels Mar 1, 2019
shilman added a commit that referenced this pull request Mar 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: stories core feature request patch:done Patch/release PRs already cherry-picked to main/release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants