Story module not-showing/replaced by similar module
See original GitHub issueDescribe 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:
- Using the provided code snippet, launch Storybook app and navigate to the module “Part”
- The listed modules only display “G clef, C# major, Common time”
Expected behavior It should show both listed modules.
Screenshots
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:
- Created 4 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@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.
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