Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linking Docs to MDX removes the Storybook Viewer. #17921

Open
vinceclicks opened this issue Apr 8, 2022 · 5 comments
Open

Linking Docs to MDX removes the Storybook Viewer. #17921

vinceclicks opened this issue Apr 8, 2022 · 5 comments

Comments

@vinceclicks
Copy link

Can anyone tell me if this feature is supposed to close the SB viewer in Angular?

If I use this link to go from the stories doc page to an MDX file in the same folder, It opens a new page with the MDX shown but without the storybook viewer.
List Item MDX

The page it goes to is http://localhost:6006/iframe.html?id=basin-components-list-item-list-item-mdx--page&viewMode=story

There is no list of stories to the side or controls below, no window into viewing the page, just the MDX page itself. I would like to be able to link the two without completely removing the viewer from Storybook

image

@nnmax
Copy link

nnmax commented Apr 9, 2022

I have the same issue.

@MikeMatusz
Copy link

MikeMatusz commented Aug 22, 2022

I'm also running into this problem.

If I specify the markup like this:

[FormControlService](/docs/components-form-control-services-formcontrolservice--page)

The output looks like this:

<a href="?path=/docs/components-form-control-services-formcontrolservice--page" target="_top" class="sbdocs sbdocs-a css-19nbuh3">FormControlService</a>

And generates the following link (running locally):

http://localhost:4400/iframe.html?path=/docs/components-form-control-services-formcontrolservice--page

If I were to manually change the href to add a / before the ?, the link works almost perfectly except it causes a full page reload, but I can't seem to find a way to write the markup to make it work. I always get an extra ?path= prefixing anything I do.

I also noted a difference depending on where I specific the link. If I have it directly in the mdx, the link works fine (unless you try to open in a new tab as described by #9502), but if it's in markdown linked using <Description markdown={myMarkdown} /> it behaves as the OP describes.

@dimitrieh
Copy link

dimitrieh commented Feb 14, 2023

This issue continues to exist. Is the storybook development team aware of this navigation issue with their platform?

Also: #9502

Edit: Will be looking into if this issue persists in 7.0

cc: @yannbf

@dimitrieh
Copy link

dimitrieh commented Feb 15, 2023

I have created a test for internal linking for storybook 7.0 using beta 48 as this issue seems to persist there.

Other related issues:

cc: @yannbf

@dzbo
Copy link

dzbo commented Feb 16, 2023

Any plans on fixing this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants