question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Navigation broken after adding showRoots option

See original GitHub issue

Describe the bug First time loading the site doesn’t show showRoots group titles. Refreshing the page after first load shows the group titles but now navigation doesn’t work.

This is only a problem here storybook.canopytax.com. Running this locally works.

To Reproduce Steps to reproduce the behavior:

  1. Go to storybook.canopytax.com
  2. Notice showRoots groups are not there, but navigation works
  3. Refresh page
  4. showRoots group titles are now there
  5. try clicking on other stories - navigation doesn’t work - requires a page refresh to load correct page

Expected behavior

  • I expect the showRoots group titles to show on first load
  • I expect navigation to work

Code snippets

addParameters({
  options: {
    showRoots: true,
  },
});

System:

System:
    OS: macOS 10.15.5
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
  Binaries:
    Node: 12.16.0 - ~/.nvm/versions/node/v12.16.0/bin/node
    Yarn: 1.22.0 - ~/.nvm/versions/node/v12.16.0/bin/yarn
    npm: 6.13.7 - ~/.nvm/versions/node/v12.16.0/bin/npm
  Browsers:
    Chrome: 83.0.4103.116
    Firefox: 74.0
    Safari: 13.1.1
  npmPackages:
    @storybook/addon-actions: ^6.0.0-beta.38 => 6.0.0-beta.38 
    @storybook/addon-docs: ^6.0.0-beta.38 => 6.0.0-beta.38 
    @storybook/addon-knobs: ^6.0.0-beta.38 => 6.0.0-beta.38 
    @storybook/addon-links: ^6.0.0-beta.38 => 6.0.0-beta.38 
    @storybook/addon-notes: ^5.3.19 => 5.3.19 
    @storybook/addon-storysource: ^6.0.0-beta.38 => 6.0.0-beta.38 
    @storybook/addons: ^6.0.0-beta.38 => 6.0.0-beta.38 
    @storybook/cli: ^6.0.0-beta.38 => 6.0.0-beta.38 
    @storybook/preset-scss: ^1.0.2 => 1.0.2 
    @storybook/react: ^6.0.0-beta.38 => 6.0.0-beta.38 

Additional context

  • Running it locally works
  • sometimes stories don’t render
  • sometimes the docs tab doesn’t render

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
alexchantasticcommented, Apr 30, 2021

I ran into a similar issue today on 6.2.8. My initial setup had showRoots: false which worked fine. Later on, I decided that I actually wanted to show top level headings. I removed the line and restarted Storybook, but the root headings still didn’t show up. I re-added the line but set it to true instead and restarted Storybook – still no headings.

I dug around and discovered the --no-manager-cache flag. I restarted Storybook with this flag and they finally showed up 🎉 ! Removing the showRoots line also worked and I was able to launch Storybook without the flag later on.

0reactions
geoctrlcommented, Sep 15, 2020

reverting back to 5.3.19 fixed the issue (version disparity somewhere?)

then we followed the migration instructions to update to v6 and there’s still no issue 🤷‍♀️

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sidebar & URLS - Storybook - JS.ORG
Storybook's sidebar lists all your stories grouped by component. When you have many components, you may also wish to group those components.
Read more >
Common mistakes - React Navigation
Common mistakes. This section attempts to outline issues that users frequently encounter when first getting accustomed to using React Navigation and serves ...
Read more >
Visualizing Your Portal Navigation - Oracle Help Center
Typically, you add navigation visualization to page templates, so that it can be defined in one place and propagated consistently across the whole...
Read more >
MIGRATION.md - Storybook - Fossies
Removed Legacy Story APIs; Can no longer add decorators/parameters after stories ... The top-level showRoots option will be removed in Storybook 7.0.
Read more >
Storybook: emphasize top-level grouping (!50) · Merge requests ...
This adds top-level grouping in the storybook navigation by adding a showRoots parameter option to storybook configuration: before: image. after:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found