-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Essentials: Add measure and outline addons #15107
Conversation
Nx Cloud ReportCI ran the following commands for commit d302502. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch
Sent with 💌 from NxCloud. |
This is super awesome! The only concern I have, which I don't really know if it's a valid one, is that now with these addons, out of the box, Storybook already contains 5 toolbar icons. As soon as people start adding a couple more addons, it gets really crowded. Example of a crowded toolbar (3 from essentials, 3 custom): I'm unsure whether having too many items there becomes a challenging UI for the user. I guess it is, when people access via mobile. What are your thoughts? |
@yannbf the user always has the option to disable essential addons that they are not using. But, I think in the long term we need a tweak to the toolbar to support more addons. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple minor issues
@shilman updated, could you take another look please |
840c5d7
to
0b2f716
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@winkerVSbecks There are a couple issues here.
- the PnP tests are failing because
addon-outline
usests-dedent
but doesn't declare it as a dependency inpackage.json
. Adding it & republishing the addon should fix it. - Chromatic is failing on some measure-related error
Home stretch!
6afa96b
to
d58d381
Compare
d58d381
to
d302502
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! I checked the perf and there is a slight uptick in install size & manager bundle size, which is to be expected. Merging & will release later today.
It might be good to update the docs (or at least readme) too, it seems there are a few more essentials than are indicated on https://storybook.js.org/addons/tag/essentials/ and https://github.com/storybookjs/storybook/tree/next/addons/essentials#contents. |
Thanks @IanVS. We'll be sure to update everything as part of the 6.3 release cc @winkerVSbecks @jonniebigodes |
Why this cool feature is disabled in |
@hckhanh it's enabled in |
Hi @shilman, I don't know why but when I upgrade from main.jsmodule.exports = {
stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/preset-create-react-app",
],
core: {
// builder: 'webpack5',
},
}; manager.jsimport { addons } from "@storybook/addons";
import { themes } from "@storybook/theming";
addons.setConfig({
theme: themes.dark,
}); preview.jsimport { themes as storybookThemes } from "@storybook/theming";
import { ThemeProvider } from "styled-components";
import themes, { GlobalStyles } from "../src/themes";
export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
docs: {
theme: storybookThemes.dark,
},
};
export const decorators = [
(Story) => (
<ThemeProvider theme={themes}>
<GlobalStyles />
<Story />
</ThemeProvider>
),
]; |
@hckhanh Did you try removing |
Ops I am using Yarn 2 with plug'nplay |
Issue:
What I did
Added the Measure and Outline addons to
@storybook/addon-essentials
How to test
Build
@storybook/addon-essentials
and load up any of the example StorybooksIs this testable with Jest or Chromatic screenshots?
No
Does this need a new example in the kitchen sink apps?
No
Does this need an update to the documentation?
Yes, should add Measure and Outline to the list of essential addons
If your answer is yes to any of these, please make sure to include it in your PR.