Storybook: API V2

Created on 7 Jun 2017  路  8Comments  路  Source: storybookjs/storybook

Work

TODO

  • [ ] support async components
  • [ ] adding a group | story | item at runtime should re-render hierarchy
  • [x] support groups
  • [x] support stateful functional components
  • [x] create new api for getting complete hierarchy
  • [x] create new api for getting sub hierarchy
  • [x] create new api for subscribing to hierarchy changes
  • [x] create new api for adding stories separating the real story from any decorators, connectors/options for addons.
  • [x] more covfefe
  • [x] create UI for navigating groups | stories | items
  • [x] choose a good name for 'group' and 'item'

DONE

  • [x] Write todo list

Choices made

-none so far-

Use cases

-I will put them in different comments for link-ability-

addons stories in progress

Most helpful comment

It would be cool to handle auto load for stories

At the least I think we change the default setup to load *.story.js or the like.

All 8 comments

Auto update UI after async story addition

// This should just update UI automatically
import('../App').then(({ default: App }) =>
  storiesOf('App', module).add('with text', () => <App />)
);

a quick tentative to resume the conversation on slack about the addon API, feel free to add more

1212

@ndelangen I've looked into the auto update thing; If you want to make a separate issue I'm happy to take a crack at it.

It would be cool to handle auto load for stories. going into the .config to add every story is tedious and can be avoided i think. Maybe we can specify on the config which folder needs to be loader or by allowing to put a pattern file matching :)

Something like jest could be nice too. A "dev-watch" mode that allow you to only see the modified story to render/iterate more quickly during development.

It would be cool to handle auto load for stories

At the least I think we change the default setup to load *.story.js or the like.

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. We do try to do some housekeeping every once in a while so inactive issues will get closed after 90 days. Thanks!

Any news on adding support for async components?

@wcastand

It would be cool to handle auto load for stories. going into the .config to add every story is tedious and can be avoided i think. Maybe we can specify on the config which folder needs to be loader or by allowing to put a pattern file matching :)

Something like jest could be nice too. A "dev-watch" mode that allow you to only see the modified story to render/iterate more quickly during development.

Isn't this already supported using require.context ?

Was this page helpful?
0 / 5 - 0 ratings