-
-
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
CHANGE to use getDataForManager over extract api on storyStore #11584
CHANGE to use getDataForManager over extract api on storyStore #11584
Conversation
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.
I think maybe you want to do the earlier parameter filtering to globalParameter
, each of the kindParameters
and all the stories' individual parameters.
Although maybe we should add that code to the store itself so you call call |
maybe just |
…ANGE cli extract command to use it
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.
LGTM with a couple suggestions
lib/client-api/src/story_store.ts
Outdated
@@ -569,6 +570,35 @@ export default class StoryStore { | |||
}; | |||
}; | |||
|
|||
getStoriesJsonData = () => { | |||
const value = this.getDataForManager(); | |||
const allowed = ['fileName', 'docsOnly', 'framework', '__id']; |
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.
__isArgsStory
?
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.
Do we need to know that for the sidebar?
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.
LGTM now! I agree mapValues
is better. Also maybe we can type it?
Cool I added a test as well |
Issue: #11302
What I did
I improved the
sb extract
cli command to use a better StoryStore api.