Replies: 2 comments 1 reply
-
We would also like to able to do this, as the stories themselves are usually what people are after rather than the docs page. I haven't found any way of doing this so far. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@sneko did you find a solution ? In my side the only solution i found is like bellow. But this is not allow you to use a complexe array order like you can have with the basic storySort configuration
storySort: (a, b) => {
// Order for the root categories
const order = [
'Atoms',
'Molecules',
'Organisms',
];
const aPaths = a.title.split('/');
const bPaths = a.title.split('/');
const rootA = aPaths[0];
const rootB = bPaths[0];
const indexA = order.indexOf(rootA);
const indexB = order.indexOf(rootB);
if (indexA === indexB) {
if (a.type === 'docs') {
return 1;
} else if (b.type === 'docs') {
return -1;
}
return 0;
}
return indexA > indexB ? 1 : -1;
}, |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Currently by default I have:
But I would like to have instead:
Normal
Docs
Since I'm on Storybook v7 the
storySort
does not work, it seems there are possibilities to enable legacy feature to make it working but I would like to avoid "workarounds".Do you know a way to just tell the Docs addon to display as the last item each time?
Thank you,
EDIT: other acceptable solution would be when clicking
AgentCard
it opens always the story just afterDocs
.Beta Was this translation helpful? Give feedback.
All reactions