komponent icon indicating copy to clipboard operation
komponent copied to clipboard

Styleguide generator improvements

Open nicolas-brousse opened this issue 5 years ago • 1 comments

  • [x] don't do nested css on komponent styleguide components, since postcss-nested (or postcss-nesting) is not installed by default with webpacker
  • [x] Add a style.css stylesheet file at frontend/components/komponent/ to have generic css like (body { margin: 0; }
  • [x] Add link to Styleguide in header
  • [ ] Use rouge or an other, to colorize cdoc printed code

Others ideas

  • [ ] List properties as table with required and default value at beginning or end of a component page

nicolas-brousse avatar Nov 20 '19 13:11 nicolas-brousse

I was thinking a bit more about the styleguide those days and I'm not sure if having styleguide always in application side is a good idea.
Having it customizable is a good idea, but not sure it is by default. I think that I could be a pain to keep styleguide up-to-date in future.

I've an alternative proposal.

  • Stop using components for headers, sidebar, footer, header. All this html could be in layout.
  • Having all styleguide component html, css in gem
  • Having generator only update routes and create the pack file that load js and css present in gem (not sure if that is easy)

To let user do customization, we could do the following

  • Having an option in generator to create views files (like devise do)
  • Use css variables for colors and fonts
  • Make views should be loaded from app first, then gem. To be sure we can overwrite views from app.

nicolas-brousse avatar Nov 25 '19 16:11 nicolas-brousse