Storybook: Feature Request: Versioned documentation for components

Created on 13 Nov 2018  路  13Comments  路  Source: storybookjs/storybook

Introduction
As developers of the TELUS Design System's component catalog, we would like our users to be able to view documentation for previous versions of the components if they want.
This will allow us to continue to publish patches and features to our components, without completely dropping support for our users who need to use an older version of our component for any reason.

Describe the solution you'd like
We would like the ability to view and select any of the component's available versions and view the live preview, props and documentation accordingly.

Describe alternatives you've considered
We've been unable to find any existing addons or features that allows us to do this

Are you able to assist bring the feature to reality?
Yes, we are willing to work with Storybook to help build this feature.

feature request inactive needs more info

Most helpful comment

Also on the current addons page you still link to the unmaintained version which was last updated in 2017.

A new one is mentioned at https://github.com/buildit/storybook-addon-versions/issues/15#issuecomment-504153706

All 13 comments

we would like our users to be able to view documentation for previous versions of the components

If I understand correctly, you're specifically looking to keep the documentation of previous components version available right? Did you have any concrete implementation or workflow in mind regarding this? What kind of documentation are you referring to?

I am currently in the process of trying to figure out how to do this for my own company's shared/common component library as well.

My initial thought process was to make a custom addon to provide a dropdown in a given component's story which would let the user select a version of the component. The stories for each component would live with the component in its repo, thus story versions should match the component version. If there are major changes between versions (different props, etc), the stories would likely need to reflect that.

The question is how to (with some automation ideally) provide to Storybook the available versions for each component, add them via package manager, and be able to dynamically include new versions without requiring a new build of the storybook project (assuming it lives in its own repo). Ideally if I publish a new version of common component X, when that's available the existing build should see the new version.

The reason this needs to be per-component is because, with tools like Lerna, you could have multiple components individually versioned that live in the same common component repository.

So, if I understand you well, you have something like @my/button@1, @my/button@2. And you want to see both in Storybook? Like this:

Button v1
  - simple
  - complex
Button v2
  - simple
  - complex
  - new state only in button 2

Then you publish a new @my/button@3, and this should be reflected in the running SB instance?

Yes, I would ideally like to be able to simply write a single story per component, and then I want to be able to choose from a drop down or something which allows me to render different versions of the component for the same story.

This add-on seems to be handling the requirement well:
https://medium.com/buildit/versioned-style-guides-with-react-storybook-aed6eebc585d

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. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!

reopen please

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. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!

I think this is still relevant.

Also on the current addons page you still link to the unmaintained version which was last updated in 2017.

A new one is mentioned at https://github.com/buildit/storybook-addon-versions/issues/15#issuecomment-504153706

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. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!

Was this page helpful?
0 / 5 - 0 ratings