Comments (10)
The rendering itself seems to be the bottleneck. Some sort of virtualized scrolling for longer tables should fix it. I'll put it on the list, and try to get to it as soon as possible.
from storybook-design-token.
Hey @Sqrrl ! Tested 2.0.0-beta.0 on a repo with roughly 1100 tokens and the performance was great. Your changes seemed to have worked to returning performance to normal.
from storybook-design-token.
Hey @Sqrrl - having a similar problem here. The SB is getting slower as we scale - any pro tips here?
from storybook-design-token.
It would be helpful to be able to disable the panel as I see less benefit in that than using the doc blocks anyway.
from storybook-design-token.
I'm looking into the performance issues.
@laddi-netapp You can deactivate the addon panel by removing it from your main.js. The doc blocks should still work. See #44 (comment)
from storybook-design-token.
Yes and no, when I do that, I get all kinds of problems, it seems:
css-syntax-error.js:37 Uncaught (in promise) CssSyntaxError: ./components/elements/button/button.css:1:1: Unknown word
at Input.error (input.js:148:1)
at Parser.unknownWord (parser.js:520:1)
at Parser.other (parser.js:151:1)
at Parser.parse (parser.js:59:1)
at parse (parse.js:11:1)
at new LazyResult (lazy-result.js:133:1)
at Processor.process (processor.js:28:1)
at postcss.parser.js:214:1
at Array.map (<anonymous>)
at postcss.parser.js:212:1
from storybook-design-token.
Also, DesignTokenDocBlock
doesn't display anything once the plugin has been disabled, at least not for me.
from storybook-design-token.
Thanks @Sqrrl!
from storybook-design-token.
Hey. Just published v2.0.0-beta.0 with some "experimental" changes. It also implements virtual scrolling for tables and pagination for card views to get rid of the performance issues.
Would be great if you check it out.
Migration:
- Bump addon version to
v2.0.0-beta.0
- Get rid of the token file loading in your
.storybook/preview.js
Before:
const tokenContext = require.context(
'!!raw-loader!../src',
true,
/.\.(css|less|scss|svg)$/
);
const tokenFiles = tokenContext.keys().map(function (filename) {
return { filename: filename, content: tokenContext(filename).default };
});
export const parameters = {
designToken: {
defaultTab: 'Colors',
files: tokenFiles
}
};
After:
export const parameters = {
designToken: {
defaultTab: 'Colors'
}
};
from storybook-design-token.
It would be helpful to be able to disable the panel as I see less benefit in that than using the doc blocks anyway.
As it came up here. With v2.1.0 you can disable the addon panel. See https://github.com/UX-and-I/storybook-design-token#disable-the-addon-panel
from storybook-design-token.
Related Issues (20)
- issue with enabled feature buildStoriesJson HOT 1
- Allow Control Types Config (ArgTypes) HOT 1
- Issue starting storybook-design-token HOT 6
- Storybook webpack autobuild no longer works with storybook-design-token options HOT 7
- Is there a way to disable scrolling container in table view? HOT 1
- Dependencies on Vite should be optional
- Getting warnings during startup and usage of addon in v3 beta HOT 2
- Monorepo import Css injection not working
- Disabling addon panel does not work HOT 8
- ? HOT 1
- Hide search in doc pages?
- Missing "./dist/doc-blocks" specifier in "storybook-design-token" package? HOT 1
- Is there a way to only show the utilized Design Tokens in a given Story? HOT 5
- Getting React error when importing DesignTokenDocBlock HOT 1
- Issue with Managing Theme Switching HOT 2
- Storybook 8 compatibility HOT 4
- Tokens that change based on breakpoint do not update in the UI
- Tokens reset once the tab is re-selected
- Tokens that depend on other tokens don't work HOT 1
- Sizing Tokens
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-design-token.