Skip to content
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 components overview tool like Storybook. #972

Open
shapkarin opened this issue Jan 13, 2021 · 21 comments
Open

Add components overview tool like Storybook. #972

shapkarin opened this issue Jan 13, 2021 · 21 comments
Labels
area/ui documentation Improvements or additions to documentation kind/improvement

Comments

@shapkarin
Copy link
Contributor

shapkarin commented Jan 13, 2021

It will be good to have components overview tool like Storybook. Because from time to time project is on maintenance, also that's pretty handy for the check the whole rebranding and overview the all components.

Storybook's blog post:

Code examples:

Video example:

video example

@shapkarin shapkarin added area/ui documentation Improvements or additions to documentation kind/improvement labels Jan 13, 2021
@davidyuk
Copy link
Member

We have been used Storybook in the Base aepp. It was useful in developing some common components. But we were frequently accidentally breaking the components from there. So, it requires some additional maintenance.

@shapkarin
Copy link
Contributor Author

shapkarin commented Jan 13, 2021

@davidyuk What means But we were frequently accidentally breaking the components from there, how it can be Storybook fault?

@davidyuk
Copy link
Member

davidyuk commented Jan 13, 2021

I mean, making a change in a component you have to check how it looks in Storybook even if it looks not necessary. Otherwise, a Storybook page may become broken and unusable. But maybe it can be checked automatically somehow.

@shapkarin
Copy link
Contributor Author

@davidyuk what if I create some test to check that?

@shapkarin
Copy link
Contributor Author

shapkarin commented Jan 13, 2021

At least it can be a test with node.js that parse files:

  • grab all components properties scopes
  • save the uniq names
  • match that with Storybook file

@shapkarin
Copy link
Contributor Author

At least it can be a test with node.js that parse files:

  • grab all components components property scope
  • save the uniq names
  • match that with Storybook file

but it can be overhead due some components include other sub-components as parts that doesn't mean much without parent component. so maybe it can be some manually tracked list of components...

@davidyuk
Copy link
Member

@davidyuk what if I create some test to check that?

I think the script can just open each storybook page in the browser and ensure that there are no exceptions.

@shapkarin
Copy link
Contributor Author

I suggest such test with node.js:

  • get all list of the pages from src/views
  • check their "components" properties
  • grab that all and uniq the array
  • match it with the Storybook

@shapkarin
Copy link
Contributor Author

shapkarin commented Jan 13, 2021

@davidyuk what if I create some test to check that?

I think the script can just open each storybook page in the browser and ensure that there are no exceptions.

It can be done with Cypress.

@shapkarin
Copy link
Contributor Author

I suggest such test with node.js:

  • get all list of the pages from src/views
  • check their "components" properties
  • grab that all and uniq the array
  • match it with the Storybook

But I'm still not sure how to automatically get the list of the all components. Because sometimes one component include other and some of them are useless without the parent one and I'm not sure hot to determinate that programatically.

@shapkarin
Copy link
Contributor Author

@davidyuk the main problem with such test is to find out what components are needs to be included in the Storybook and which are pages or the parts of other components that are useless without parent component.

@davidyuk
Copy link
Member

I don't think so. As I know, Storybook renders only pages defined by the developer, to check them script just needs to open each one. It shouldn't care about which components are referenced on these pages.

@shapkarin
Copy link
Contributor Author

shapkarin commented Jan 13, 2021

I understand that but I want to find the answer for that question:

Witch components match by a test with the Storybook defined.

@davidyuk
Copy link
Member

Why do you need that?

@shapkarin
Copy link
Contributor Author

But maybe it can be checked automatically somehow.

You mean only to check if Storybook is not broken? I thought to check if all components are present at the Storybook.

@shapkarin
Copy link
Contributor Author

So if to check only if Storybook is not broken it's pretty easy.

@shapkarin
Copy link
Contributor Author

@davidyuk as far as I can see together we finally formalize this task in:

  • add storybook
  • create a test to check if Storybook is works fine itself and included components as well

I will assign this task to myself.

@shapkarin shapkarin self-assigned this Jan 14, 2021
@davidyuk
Copy link
Member

I'm proposing to add some pages as well. Ensure that this is approved before starting to work on it.

@shapkarin
Copy link
Contributor Author

shapkarin commented Jan 17, 2021

@davidyuk what exactly that pages is about?

@davidyuk
Copy link
Member

Actually, they are called stories. See the example in the Base aepp repo.

@shapkarin
Copy link
Contributor Author

@davidyuk @mradkov I think it will be nice to have such thing for the rebranding. Not sure about priority, maybe can be done later.

@shapkarin shapkarin removed their assignment Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui documentation Improvements or additions to documentation kind/improvement
Projects
None yet
Development

No branches or pull requests

2 participants