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

Sidebar navigation does not work in production (6.0.0-rc.5 + addon-docs) #11590

Closed
koop-stripe opened this issue Jul 16, 2020 · 6 comments
Closed

Comments

@koop-stripe
Copy link

koop-stripe commented Jul 16, 2020

Describe the bug
Sidebar navigation does not work when building addon-docs for production.

To Reproduce
Steps to reproduce the behavior:

  1. Build storybook for production build-storybook --docs -c .storybook -o .storybook-dist
  2. Start the server, load a page in your browser.
  3. Try to navigate to another page by clicking a page title in the sidebar.

Expected behavior
The browser URL changes and storybook navigates to the new page.

Actual behavior
The browser URL changes but the preview doesn’t change.

System:

System:
OS: macOS 10.15.4
CPU: (8) x64 Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
Binaries:
Node: 10.16.0 - ~/.nodenv/versions/10.16.0/bin/node
Yarn: 1.19.1 - ~/.yarn/bin/yarn
npm: 6.9.0 - ~/.nodenv/versions/10.16.0/bin/npm
Browsers:
Chrome: 83.0.4103.116
Firefox: 78.0.1
Safari: 13.1
npmPackages:
@storybook/addon-docs: 6.0.0-rc.5 => 6.0.0-rc.5
@storybook/react: 6.0.0-rc.5 => 6.0.0-rc.5

@shilman
Copy link
Member

shilman commented Jul 16, 2020

Looks like a regression due to #11537. @ndelangen can you investigate?

@ndelangen
Copy link
Member

I'm investigating!

@ndelangen
Copy link
Member

I'm trying to reproduce, but I'm unable to. The navigation seems to work for me, in both dev & prod mode.

Could you make me a reproduction repo?

@blaine-stripe
Copy link

blaine-stripe commented Jul 21, 2020

@ndelangen This was happening on rc.5 but I upgraded to rc.13 and I can't reproduce. Where you checking rc.5? Anyway, might have been fixed in between!

@blaine-stripe
Copy link

blaine-stripe commented Jul 21, 2020

Edit: The issue below seems to be related to another issue (#10846)

Doing some more digging here, so might continue to update with some information:

When I navigate, an error is thrown in my console that says

TypeError: Cannot read property 'toLowerCase' of null
    at sanitize (index.js:66)
    at sanitizeSafe (index.js:73)
    at toId (index.js:87)

It looks like null values are being passed to the sanitize method through toId

@shilman
Copy link
Member

shilman commented Jul 22, 2020

Thanks @blaine-stripe. Closing this & will follow up on the other issue.

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

4 participants