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.

Story module not-showing/replaced by similar module

See original GitHub issue

Describe the bug Having two modules with a matching starting name, and one of them with a # symbol, makes one of the modules disappear.

To Reproduce Steps to reproduce the behavior:

  1. Using the provided code snippet, launch Storybook app and navigate to the module “Part”
  2. The listed modules only display “G clef, C# major, Common time”

Expected behavior It should show both listed modules.

Screenshots Screenshot 2019-09-16 at 07 32 44

Code snippets

import React from 'react';
import { storiesOf } from '@storybook/react';
// import Part from './part';

storiesOf('Part', module)
  .add('G clef, C major, Common time', () => {
    return (
      <div style={{ margin: '3rem 0' }}>
        {/* <Part
          clef="G-clef"
          keySignature="C"
          keyQuality="major"
          commonTime
          staveType="stave"
        /> */}
      </div>
    );
  })
  .add('G clef, C# major, Common time', () => {
    return (
      <div style={{ margin: '3rem 0' }}>
        {/* <Part
          clef="G-clef"
          keySignature="C#"
          keyQuality="major"
          commonTime
          staveType="stave"
        /> */}
      </div>
    );
  });

System: Version: @storybook/react: ^5.0.6

Additional context Removing the # symbol, or changing the name of the missing module up to # character position, makes the module reappear.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
amypellegrinicommented, Sep 19, 2019

@shilman To debug this I removed all the stories leaving only two, one with the hash and the other without, like in the provided code snippet. If understand correctly the id is generated from the text string used to describe the module, so in this case the collision is generated by SB parsing the text string and removing the hash special character.

To workaround the issue for now I just removed the special characters and used plain words (“sharp”, “flat”) so it’s not like this is a major issue, maybe a note could be added in the documentation to warn users about this?

An ideal scenario would be that this doesn’t happen and I can use special characters, or alternatively I can provide a custom valid id so I can still use special characters without producing the issue.

0reactions
jonniebigodescommented, Feb 15, 2022

Closing this as it’s now documented. Thanks for raising the issue and the long waiting period before being addressed.

Hope you have a great week!

Stay safe

Read more comments on GitHub >

github_iconTop Results From Across the Web

Storybook - no stories showing up in typescript project with ...
When trying to create a story from my components, I get the error: Module not found: Error: Can't resolve 'esri/Basemap' in '/.../GitHub/20-maps ...
Read more >
How to fix "The following module is missing from the file ...
You moved the module inside your Drupal installation​​ Possible solutions: Clear the site's caches so the new location of the module is registered....
Read more >
Solved: Modules not visible to students - Canvas Community
In my course the Modules section is greyed out. In student view Modules is not visible. Modules are loaded into the student view...
Read more >
Flow modules for reusable functions - Amazon Connect
Flow modules are reusable sections of a flow. You can create them to extract repeatable logic across your flows, and create common functions....
Read more >
Hotlink Module Manager
To replace the selected module with a different one, click Change Module. Note: Not available for Nested Modules. The appearing Select Hotlink Module...
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