carteb / carte-blanche

An isolated development space with integrated fuzz testing for your components. See them individually, explore them in different states and quickly and confidently develop them.
https://www.youtube.com/watch?v=6g3-TQ6aaw8
MIT License
1.5k stars 47 forks source link

Add Components to Homepage #237

Open DavidWells opened 8 years ago

DavidWells commented 8 years ago

I was trying to figure out how to get the first example from each component to render on the homepage here: https://github.com/pure-ui/styleguide/blob/master/client/components/App/index.js#L131

Looks like this.props.components has the data but I'm not sure if this is the right place to hook in (b/c the react stuff is coming in via the plugin setup)

Is this something that is wanted? -> Listing the first example from each component

I have a similar setup on this style guide I built from scratch =) http://ux.mulesoft.com/#/

nikgraf commented 8 years ago

Yes, let's do that. Getting the first path of this.props.components is the right place to get out the path.

nikgraf commented 8 years ago

@DavidWells I'm currently working on subnavigation for components. Shouldn't clash with this, but just to let you know 😄

mxstbr commented 8 years ago

I think we should maybe just show a list of components to keep the client free of ReactPlugin specific code. (or have a hook for plugins to display things on the homepage?)

nikgraf commented 8 years ago

In what way is it related to the ReactPlugin? Redirecting to the first component as default should be only client (webpack plugin) related. Did I miss something?

mxstbr commented 8 years ago

Oh I thought the idea was to render the first variation of each component on the homepage!

nikgraf commented 8 years ago

Ups, sorry my fault. I misunderstood. Yeah I wouldn't do that either. Makes the whole system tied together too much … Actually that might be quite tricky to implement as you need to fetch a lot of variation files.

We can expose an API for such a thing on the client and then do. I like the idea 👍