-
Notifications
You must be signed in to change notification settings - Fork 45
feat(Storybook): extend storybook for developer focused demo - #315 #382
feat(Storybook): extend storybook for developer focused demo - #315 #382
Conversation
Signed-off-by: lenvi <lenvin@oykuapp.com>
Signed-off-by: lenvi <lenvin@oykuapp.com>
Signed-off-by: lenvi <lenvin@oykuapp.com>
Signed-off-by: lenvi <lenvin@oykuapp.com>
Signed-off-by: lenvi <lenvin@oykuapp.com>
Signed-off-by: lenvi <lenvin@oykuapp.com>
Signed-off-by: lenvi <lenvin@oykuapp.com>
@irmerk, I hope it's complete now. Can you please go through it and let me know if anything needs to be added / modified |
Signed-off-by: lenvi <lenvin@oykuapp.com>
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.
Added a few comments. Also, is there a way to see the netlify build of storybook for this PR?
.storybook/main.js
Outdated
template: "demo/src/index.html", | ||
mountId: "demo", | ||
title: "YES" |
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 make the title something like "Cicero UI Components Demo"?
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.
Sure, Will do it right away!
demo/src/index.js
Outdated
@@ -203,3 +203,6 @@ function Demo() { | |||
} | |||
|
|||
render(<Demo/>, document.querySelector('#root')); | |||
|
|||
//For usage with Storybook (temporary) |
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.
What does this comment mean? Is it temporary because we will make a new "Demo" component for storybook instead of using the existing one?
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 had added lines 207 & 208 in this commit. It was added to export the Demo component to be used with storybook for testing.
I have now reverted the changes (i.e. I have now removed line 207 & 208) now as Demo is no longer needed in Storybook.
Signed-off-by: lenvi <lenvin@oykuapp.com>
Signed-off-by: lenvi <lenvin@oykuapp.com>
@DianaLease I will be adding a |
Signed-off-by: lenvi <lenvin@oykuapp.com>
…build - i315 Signed-off-by: lenvi <lenvin@oykuapp.com>
This is super exciting @98lenvi, great work. Looking into the code now. |
In the Notes tab for most of these, we'll want to make sure to format some things to make it consistent with the |
Let's try to avoid duplication as much as possible to keep things maintainable. E.g. link to the existing README.md. |
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.
LGTM. Question about the netlify configuration.
@@ -0,0 +1,43 @@ | |||
# Settings in the [build] context are global and are applied to all contexts |
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.
Do we need a netlify configuration? We don't do that on any of our projects -- should it be instead done within netlify itself.
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.
Yes, it can be done in Netlify instead.
Signed-off-by: lenvi <lenvin@oykuapp.com>
I will look into that, can't understand why the formatting looks off. @irmerk
Done in the latest commit. @dselman |
I'm thinking we get this in and start iterating on it to stop blocking this PR. Just need to make sure local development of |
@irmerk Sure! I just need to work on one more commit to add knobs to ContractEditor story ( I missed the lockText and readOnly props) |
Signed-off-by: Lenvin Gonsalves <lenvin@oykuapp.com>
@irmerk, I made the changes, i.e. add readOnly knob. For some reason, lockText doesn't work via a knob. Even if I declare it as a state variable and change its value, there is no effect on the ContractEditor. |
This sounds similar to an issue we had with the old version of slate where prop changes wouldn't re-render the editor. It was working for me with the new slate when we had a toggle switch though that updated the value of lockText. Let me try again locally with a toggle and reconfirm. EDIT: @98lenvi looks like this is a separate issue. I'll look into it! |
Confirming this works for local development ( |
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 think this is a good first step, second 👀 @DianaLease?
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.
Awesome!
Issue #315 #376
Complete support added for
Cicero-UI
components inStorybook
.Preview available here
Changes
webpackconfig
ofstorybook
's default configuartionjsdom
fs
,net
,tls
) during build.netlify.toml
to netlify to storybook buildPreviously added, now removed-
CleanWebpackPlugin()
HtmlWebpackPlugin
MiniCssExtractPlugin
Flags
Need to add the following (DONE)
Related Issues