ember-freestyle icon indicating copy to clipboard operation
ember-freestyle copied to clipboard

Simplify freestyle-usage component slugs

Open chrisvdp opened this issue 8 years ago • 4 comments

Goals

  • Simplify freestyle-usage slugs
  • Provide better control for component usage snippets

To Do

  • [ ] Make freestyle-usage slugs optional
  • [ ] Document how adding a slug to a freestyle-usage component enables the focus feature
  • [ ] Document how adding a slug to a freestyle-usage component results in a usage snippet in the style guide (and provide a component property to disable this)
  • [x] Warn if duplicate slugs are detected
  • [ ] Document how usage snippets work

Use Case

I want to render code, but not the snippet in some cases as it doesn’t add much to the styleguide. ie Headings, Typography, Color Palette.

chrisvdp avatar Apr 22 '16 17:04 chrisvdp

I'm thinking we should have a display property that defaults to 'toggle' but can be set to 'none' or 'off'... something like that.

chrislopresto avatar Apr 22 '16 18:04 chrislopresto

display: none would be how my brain works

chrisvdp avatar Apr 22 '16 18:04 chrisvdp

what about using the component's built in isVisible property?

grapho avatar May 03 '16 17:05 grapho

The idea here is to provide a way to opt out of the automatic usage snippet. For example, we never want to see the usage snippets for things like the freestyle-palette component.

chrislopresto avatar May 03 '16 17:05 chrislopresto