Replies: 2 comments 4 replies
-
As reference some documentation sites of different frameworks etc. |
Beta Was this translation helpful? Give feedback.
-
There was an API With a bit of back and forth between @JReinhold and me in discord, he convinced me the removal of that API is the correct decision for now
That said, there are plenty of examples of other documentations that offer a version switcher. My personal takeWho needs a version selector in Storybook?Probably not apps but definitely libraries that are consumed by many apps and need to support multiple major and minor versions (same as e.g. Tailwind, Bootstrap, ...) ProposalStorybook should offer no slot where addon creators can do whatever they want (for the above mentioned reason) but instead an API where the core team can freely decide where to put such a version switcher in the future. A list of versions can be either provided locally or requested asynchronously - both should work IMO I'm not sure if this is the best place but it could be another field in // main.ts
const config = {
framework: {
name: '@storybook/...'
},
versionAPI: async () => { // ignore the naming
const versions = await fetch("https://...");
return versions.map(version => ({
name: "v" + version.number, // used to visually show (stable) or (next) alongside the version
version: version.number, // used to sort it correctly
url: version.url, // points to another deployed storybook instance
});
}
} Alternatively, a const versions: VersionFn = async () => {
const versions = await fetch("https://...");
return versions.map(version => ({
name: "v" + version.number,
version: version.number,
url: version.url,
});
};
export default versions; |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem? Please describe.
The current problem is that it is difficult for me to show the developers in storybook which versions of this UI library are available.
Describe the solution you'd like
It would be greate if there is a selector next to the brand or underneath where you can switch the versions
Describe alternatives you've considered
Describing it in a mdx file which is not that intuitive
Are you able to assist to bring the feature to reality?
no
Additional context
Would be a nice too have feature i guess.
Should also be simple to implement.
P.S. i searched for a familiar request but did not found one, so please if you have one in mind we can close this discussion or feature request
Beta Was this translation helpful? Give feedback.
All reactions