Comments (4)
Imagine having a vast number of templates, and you want to generate stories without repeating the tedious process of generating simple stories for them.
That sounds like a use-case for controls (args/argTypes) or similar API. If you insist on having separate stories (extra items in the sidebar), macros would be way to go.
from ladle.
Ladle doesn't support this for the same reason Storybook is trying to deprecate it now. Ladle was built around static analysis, automatic code-splitting, automatic story naming and meta.json.
I think the fact Storybook is moving in the same direction now is a proof that it was the correct architectural decision.
I also just went over Indexer API proposal. That's something that could fit into Ladle's architecture as well. However, that's still a build time feature, it doesn't replace/solve programmatically added stories. Also, it might not be as value to us since we only support React/MDX.
from ladle.
I think the only path here would be to introduce some sort of declarative macros. However, it's a foreign concept to JS developers so not sure if it would be successful.
from ladle.
I still believe being able to provide such functionality will be of value — especially since Storybook does not.
Imagine having a vast number of templates, and you want to generate stories without repeating the tedious process of generating simple stories for them.
I thought about creating story files for each glob match, either on the filesystem or on memory, on startup — and perhaps when a watcher triggers a needed change — but that feels like a hack.
In any case, I wish such a feature will "Land on Ladle" one day ;)
from ladle.
Related Issues (20)
- 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
- Allow duplicate story name HOT 2
- 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
- RTL config using MDX code block breaks formatting HOT 1
- Stylesheet ordering bug with @mui/material and styled-components HOT 6
- Head elements not being synchronized between the iframe and its parent
- Range control with a default value of zero does not adopt default value
- Source maps are broken
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.