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

Initial commit. Merge propTypeData with custom meta data. #210

Closed busypeoples closed 8 years ago

nikgraf commented 8 years ago

nice, will take a look a bit later today! thx @busypeoples

mxstbr commented 8 years ago

This is a great start!

IMO making this a shared util with unit tests would be necessary to land it. I reckon there's tons of edge cases that need to be taken care which we can't accurately asses are taken care of just from looking at it. Would you mind doing that?

busypeoples commented 8 years ago

This should give you a high level idea of what's going on. Maybe @steos could optimize the enum and shape generation with a randomizer?

nikgraf commented 8 years ago

@busypeoples I'm thinking about preventing people to pick nested structures like objects & arrays in the interface. It introduces so much complexity. Defining it in your code as Flow or PropTypes should be ok.

Changing an avatarUrl prop to avatar was the use-case why we need this in the first place and this is already covered …

What do you think?

busypeoples commented 8 years ago

@nikgraf preventing nested structures makes sense.

nikgraf commented 8 years ago

I cherry picked one change, but left out the other stuff.