Comments (2)
ah. I understand why there is a problem in my situation.
The problem seems to be the file layout of my project.
In my project I have components located in "%ComponentName%/indext.tsx" and all stories located in "%ComponentName%/index.stories.tsx".
(There are also "page.tsx" and "page.stories.tsx".)
I would consider changing the file layout or specifying the story name explicitly.
thank you for your answer.
from ladle.
It's the combination of filename/storyName/title (whichever is present) and exported name that needs to be unique. This unique story ID is not only used internally for code-splitting but it also directly translates into the sidebar navigation.
In theory, we could add the filepath in but
- it would expose the file structure in the URL
- it would be confusing to have 2 identically named stories in the same sidebar slot
I don't think this is something we want to support. It should be pretty easy to make sure that these IDs are unique by adding/changing
export default {
title: "..."
}
or
Story.storyName = "..."
If there are a lot of clashing stories, a codemod could be written.
from ladle.
Related Issues (20)
- Any plan to allow user to create custom plugins ? HOT 2
- Keyboard navigation between stories HOT 2
- Disable Shortcuts HOT 2
- Add support for other units in `width` addon HOT 2
- Ladle + Next.js (app router) - invariant expected app router to be mounted HOT 5
- Side navigation icons zIndex should not be above the stories
- HMR does not seem to work on .ladle/components.tsx HOT 1
- Allow for user defined query parameters HOT 12
- After the upgrade 2.17.2 -> 3.0.0 our Jest snapshots have a new prop HOT 6
- Chevron icons in sidebar seem switched
- Way to verify that all stories render without errors HOT 6
- Side panel story name not readable when using longer names or folder nesting HOT 1
- Version 3 supports only React 18+, it's an undocumented breaking change HOT 1
- Deno support HOT 1
- Missing Accessibility Report button with @ladle/react v3.1.0 and up HOT 2
- ladle.css leaks on @reach/dialog inside stories HOT 1
- Internal server error: Header name must be a valid HTTP token [":path"] HOT 2
- ladle build error HOT 3
- Should the msw implementation be created as an independent plugin? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ladle.