Comments (5)
With 7.0.0-beta.43
, where I checked there's an improved logging:
Error: Error sorting stories with sort parameter (story1, story2) => sort(order, story1, story2);
> sort is not defined
Are you using a V6-style sort function in V7 mode?
More info: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#v7-style-story-sort
at sortStoriesV7 (./node_modules/@storybook/core-server/node_modules/@storybook/preview-api/dist/index.js:36:2333)
at StoryIndexGenerator.sortStories (./node_modules/@storybook/core-server/dist/index.js:10:15604)
at async StoryIndexGenerator.getIndex (./node_modules/@storybook/core-server/dist/index.js:10:15834)
at async ./node_modules/@storybook/core-server/dist/index.js:20:1513
ERROR: "storybook:dev" exited with 1.
ERROR: "storybook" exited with 1.
from storybook-multilevel-sort.
Anyone else having an issue forcing the sorting function to be inlined and not use anything from outside the function definition?
from storybook-multilevel-sort.
Yes, the versions 1.x of this package don't work with Storybook 7. I'm working on it. Thanks for the kind words! I'm sorry for the delay.
@gatsbimantico, yes, the limitation of the code usable in preview.js
is exactly what makes the migration difficult. You'd have to inline everything, function and configuration. The only ugly solution that occurred to me is to abuse another Storybook initialisation file, like main.js
, for example, set the data to globalThis
there and then access them from there in storySort
, which is luckily executed later.
from storybook-multilevel-sort.
Let's continue about this problem and the progress of the migration to the new framework API at the issue #8.
Storybook 7 will be supported by versions 2.x
of this package. Versions 1.x
will remain supporting Storybook 6 and older. The parameter storyStoreV7
opens the door to the new API and its enabling will need a version 2.x
of this package too.
from storybook-multilevel-sort.
Let's continue about this problem and the progress of the migration to the new framework API at the issue #8.
👍
from storybook-multilevel-sort.
Related Issues (7)
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 storybook-multilevel-sort.