-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
Add a storybook for the ui package #2504
Conversation
.storybook/addons.js
Outdated
@@ -0,0 +1,3 @@ | |||
/* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions */ |
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.
Can we not use a /examples/<any>
here? Do we really have to add something to the root of the project?
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.
I would be happy with an examples/official
or something, where we have a storybook to demo storybook's UI components.
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.
I don't have any problem with that. The only thing is potentially wanting to combine all react-based storybooks in a single storybook (components, ui, cra-vanilla).
[This works better for chromatic for instance. I'm not sure it helps much else -- maybe storyshots?]
Maybe examples/offical-storybook
or something?
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.
Or examples/meta[-storybook]
?
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.
examples/offical-storybook
would get my vote
Lot's of love here, This will be fantastic to have! Just hoping we can move the files away from the project root, since we're already crowding the project root folder a lot. |
In fact, I originally put them to |
I actually kind of feel like a |
I don't that will convey meaning to anyone just browsing through the code, where-as a folder Of course this is really subjective, Personally I feel fairly strongly, that grouping the examples together is the right approach, but I can change my mind, if 3/4 others vote in favour of your proposal @tmeasday. To me, it's just another example of storybook that we use internally to develop and test our work on. |
Maybe, but only if we move all the other sample stories there I'm strongly inclined into having all the React examples in one place. Currently it's One of the cool parts about it is that we deploy kitchen-sink apps to netlify for each PR, so there's a way to test things without actually cheking out the code locally |
I'm not very opinionated about this, but I would say as a new developer I would probably not expect to find the stories about the storybook UI in the "kitchen sink" example. I think we all agree that all the react-based stories (ui, components, various addons, other stuff in KS) should be in the one storybook. My vote would be |
Sounds good |
On the case. |
That chromatic is fantastic @tmeasday ! Will Chromatic also show up as a github status? |
@ndelangen sure does! Check out the chromatic PR: #2505 I'll take the lack of negative comments as a positive and I'll get the tests passing on this branch. |
I'm getting this error from storyshots:
Have you guys seen this before? |
Codecov Report
@@ Coverage Diff @@
## release/3.3 #2504 +/- ##
===============================================
+ Coverage 19.45% 20.18% +0.73%
===============================================
Files 387 398 +11
Lines 8733 8838 +105
Branches 940 961 +21
===============================================
+ Hits 1699 1784 +85
+ Misses 6303 6300 -3
- Partials 731 754 +23
Continue to review full report at Codecov.
|
Definitely the right the direction @tmeasday, fantastic work! |
Don't compile (i.e. copy) them w/ babel
The segfault was something to do with |
Fun times! babel/babel#6226 We don't want to copy `.storyshots` files even though babel doesn't think they are JS
ae4ed52
to
e4be9f5
Compare
@ndelangen shall I merge this? |
Yes merge when ready, after, we should add a netlify site for the newly created example! |
Why UI and components stories are not part of |
How do you mean? Aren’t they?
…On Fri, 22 Dec 2017 at 7:41 pm, Filipp Riabchun ***@***.***> wrote:
Why UI and components stories are not part of "official"?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#2504 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAIFyp1XP-nkfQK8vPXWvyHGqivrYb6Qks5tC2stgaJpZM4RFAuq>
.
|
Oh, now I see that they are. But their sources are in packages. We probably should use a single approach then. That is, either move CC: @ndelangen |
Move all stories into the examples please. Our packages shouldn't contain stories I think. Please let me know if you disagree on that. I think co-locating the stories makes a bit more sense in this case. Reason for this is that we want to use the |
Hmm, I can see the argument for this but it'd be a bit weird -- in particular the Maybe we should use a symlink or something? |
🤔 |
I'm stumped too ;) |
@ndelangen still willing to make whichever changes make sense here, I'm just not sure what's best |
Issue:
No storybook exists for storybook's UI itself 😮
What I did
Added stories for the
lib/ui
packageHow to test
Run
yarn storybook
from the top level.I'm not sure if this is the best approach. We could also add a storybook inside
lib/ui
but we'd have a circular dependency issue.Note as well that I added the stories for the
lib/components
package to this storybook; I note they've also been added to thecra-kitchen-sink
app -- perhaps this is a better approach?Let me know what you think.
Is this testable with jest or storyshots?
Potentially we could use storyshots?
Does this need a new example in the kitchen sink apps?
NO
Does this need an update to the documentation?
NO