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

[K7] Add KUI Yeoman generator. Support creation of components and documentation. #12951

Merged
merged 10 commits into from
Jul 19, 2017

Conversation

cjcenizal
Copy link
Contributor

@snide This generator focuses on the creation of components as a collection of JS and SCSS files. You can just use the default "Stateless function" option for the first prompt. Let me know if you'd like any changes to this or if there's anything else we can do to make the SCSS side of things easier.

@cjcenizal cjcenizal added the Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins. label Jul 18, 2017
@cjcenizal cjcenizal requested a review from snide July 18, 2017 18:01
@cjcenizal cjcenizal mentioned this pull request Jul 19, 2017
51 tasks
@cjcenizal cjcenizal changed the title [K7] Add KUI Yeoman generator. Support creation of components. [K7] Add KUI Yeoman generator. Support creation of components and documentation. Jul 19, 2017
@snide
Copy link
Contributor

snide commented Jul 19, 2017

Gonna leave comments as I test it out.

  • The where should I go prompt is pretty confusing. The first time you run it it's just empty. From the instructions I assumed it would use the component name to build a dir, so I hit enter. This caused it to fail in the process, might want some error detection here.
  • When I ran it the second time it showed an empty () since that was the last one I used.
  • Once I figured out it was asking to type it a path name I assumed it meant relative to ui_framework/src/components so i just typed mycomponentname. This of course built it down in Kibana root instead.
  • Assume you're trying to make this more generic and usable beyond KUI, but for ease of use, I just expected it to ask for a name, and then build out everything in kui for me.

@snide
Copy link
Contributor

snide commented Jul 19, 2017

The snippet comments look like they aren't colored properly. The comments themselves could be a bit more useful.

  • The export snippet assumes an name\index.js file is built, but it actually creates a name\name.js
  • Maybe at least give the file locations of where you should be adding these snippets? Sorry, I'm probably more familiar with this stuff than most and I still had to hunt around a bit to remember which JS files I needed to touch for both the docs and the components themselves. Ok... router, the component index.js file...etc.

@snide
Copy link
Contributor

snide commented Jul 19, 2017

That said, this is pretty dope. Thanks.

@snide
Copy link
Contributor

snide commented Jul 19, 2017

Oh. Looks like you should add .yo-rc.json to .gitignore as well.

Copy link
Contributor

@snide snide left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love this. Thanks so much for adding it. Changes look great.

@cjcenizal cjcenizal merged this pull request into elastic:k7-ui-framework Jul 19, 2017
@cjcenizal cjcenizal deleted the k7/kui-generator branch July 19, 2017 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants