- Consolidate addon API
- Ensure where possible addons are framework independent.
- Provide guidance around avoiding anti-patterns (addon-info, etc)
The key plan is to try and make addons run in the manager context rather than the preview context where possible.
This has some advantages:
- Addons are framework independent by default
- Users only have to load the addon in one context
- It stops people messing with the preview, which is generally good.
(and how we'll make it possible in the manager)
- Show an addon panel
- Receive per-story information
- We will add the long-awaited options API:
.add(name, story, options)
- We will add the long-awaited options API:
- Modify inputs to stories
- Add an API to allow addons to provide (serializable) contextual props to stories (cf. knobs)
- Read the list of stories
- We will improve the manager API
- Change the currently displayed story
- (Use the manager API)
- Modify the list of stories
- (With the manager API, only via serializable stories, or contextual modifications of existing stories)
- Alter the display of the preview area
- We should have an API for this
- Show more than one preview area
- We should have an API for this
- Inspect runtime properties of a story [inspectors]
- Wrap a story in extra components [decorators]
9+10 require running in the preview context, but we will limit them in the following ways:
Inspectors can work much like addons do now, but they will not have the ability to alter stories. Either use a pure decorator (if wrapping), or alter the story via manager-driven contextual changes.
Are not seen as true addons. Do not have access to the addon channel etc. Can be communicated with via contextual props.